オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /branches/ccs-patch/security/ccsecurity/policy_io.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3046 by kumaneko, Wed Sep 16 06:15:44 2009 UTC revision 3064 by kumaneko, Fri Sep 25 08:55:35 2009 UTC
# Line 21  static struct ccs_profile ccs_default_pr Line 21  static struct ccs_profile ccs_default_pr
21          .preference.audit_max_grant_log = CONFIG_CCSECURITY_MAX_GRANT_LOG,          .preference.audit_max_grant_log = CONFIG_CCSECURITY_MAX_GRANT_LOG,
22          .preference.audit_max_reject_log = CONFIG_CCSECURITY_MAX_REJECT_LOG,          .preference.audit_max_reject_log = CONFIG_CCSECURITY_MAX_REJECT_LOG,
23  #endif  #endif
24            .preference.audit_task_info = true,
25            .preference.audit_path_info = true,
26          .preference.enforcing_penalty = 0,          .preference.enforcing_penalty = 0,
27          .preference.enforcing_verbose = true,          .preference.enforcing_verbose = true,
28          .preference.learning_max_entry = CONFIG_CCSECURITY_MAX_ACCEPT_ENTRY,          .preference.learning_max_entry = CONFIG_CCSECURITY_MAX_ACCEPT_ENTRY,
# Line 370  static int ccs_write_profile(struct ccs_ Line 372  static int ccs_write_profile(struct ccs_
372                  if (cp2)                  if (cp2)
373                          sscanf(cp2 + 15, "%u",                          sscanf(cp2 + 15, "%u",
374                                 &profile->preference.audit_max_reject_log);                                 &profile->preference.audit_max_reject_log);
375                    if (strstr(cp, "task_info=yes"))
376                            profile->preference.audit_task_info = true;
377                    else if (strstr(cp, "task_info=no"))
378                            profile->preference.audit_task_info = false;
379                    if (strstr(cp, "path_info=yes"))
380                            profile->preference.audit_path_info = true;
381                    else if (strstr(cp, "path_info=no"))
382                            profile->preference.audit_path_info = false;
383                  return 0;                  return 0;
384          }          }
385  #endif  #endif
# Line 503  static void ccs_read_profile(struct ccs_ Line 513  static void ccs_read_profile(struct ccs_
513          ccs_io_printf(head, "PROFILE_VERSION=%s\n", "20090903");          ccs_io_printf(head, "PROFILE_VERSION=%s\n", "20090903");
514  #ifdef CONFIG_CCSECURITY_AUDIT  #ifdef CONFIG_CCSECURITY_AUDIT
515          ccs_io_printf(head, "PREFERENCE::audit={ max_grant_log=%u "          ccs_io_printf(head, "PREFERENCE::audit={ max_grant_log=%u "
516                        "max_reject_log=%u }\n",                        "max_reject_log=%u task_info=%s path_info=%s }\n",
517                        ccs_default_profile.preference.audit_max_grant_log,                        ccs_default_profile.preference.audit_max_grant_log,
518                        ccs_default_profile.preference.audit_max_reject_log);                        ccs_default_profile.preference.audit_max_reject_log,
519                          ccs_yesno(ccs_default_profile.preference.
520                                    audit_task_info),
521                          ccs_yesno(ccs_default_profile.preference.
522                                    audit_path_info));
523  #endif  #endif
524          ccs_io_printf(head, "PREFERENCE::learning={ verbose=%s max_entry=%u "          ccs_io_printf(head, "PREFERENCE::learning={ verbose=%s max_entry=%u "
525                        "exec.realpath=%s exec.argv0=%s symlink.target=%s }\n",                        "exec.realpath=%s exec.argv0=%s symlink.target=%s }\n",
# Line 587  static void ccs_read_profile(struct ccs_ Line 601  static void ccs_read_profile(struct ccs_
601  #ifdef CONFIG_CCSECURITY_AUDIT  #ifdef CONFIG_CCSECURITY_AUDIT
602                  if (profile->audit != &ccs_default_profile.preference &&                  if (profile->audit != &ccs_default_profile.preference &&
603                      !ccs_io_printf(head, "%u-PREFERENCE::audit={ "                      !ccs_io_printf(head, "%u-PREFERENCE::audit={ "
604                                     "max_grant_log=%u max_reject_log=%u }\n",                                     "max_grant_log=%u max_reject_log=%u "
605                                     index,                                     "task_info=%s path_info=%s }\n", index,
606                                     profile->preference.audit_max_grant_log,                                     profile->preference.audit_max_grant_log,
607                                     profile->preference.audit_max_reject_log))                                     profile->preference.audit_max_reject_log,
608                                       ccs_yesno(profile->preference.
609                                                 audit_task_info),
610                                       ccs_yesno(profile->preference.
611                                                 audit_path_info)))
612                          goto out;                          goto out;
613  #endif  #endif
614                  if (profile->learning != &ccs_default_profile.preference &&                  if (profile->learning != &ccs_default_profile.preference &&

Legend:
Removed from v.3046  
changed lines
  Added in v.3064

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26