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

Subversion リポジトリの参照

Diff of /trunk/1.7.x/ccs-patch/security/ccsecurity/util.c

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

revision 1006 by kumaneko, Tue Feb 26 08:37:13 2008 UTC revision 1007 by kumaneko, Thu Feb 28 06:42:01 2008 UTC
# Line 5  Line 5 
5   *   *
6   * Copyright (C) 2005-2008  NTT DATA CORPORATION   * Copyright (C) 2005-2008  NTT DATA CORPORATION
7   *   *
8   * Version: 1.6.0-pre   2008/02/26   * Version: 1.6.0-pre   2008/02/28
9   *   *
10   * This file is applicable to both 2.4.30 and 2.6.11 and later.   * This file is applicable to both 2.4.30 and 2.6.11 and later.
11   * See README.ccs for ChangeLog.   * See README.ccs for ChangeLog.
# Line 841  static int AddDomainPolicy(struct io_buf Line 841  static int AddDomainPolicy(struct io_buf
841                  if (profile_ptr[profile] || !sbin_init_started) domain->profile = (u8) profile;                  if (profile_ptr[profile] || !sbin_init_started) domain->profile = (u8) profile;
842                  return 0;                  return 0;
843          }          }
844            if (strcmp(data, KEYWORD_IGNORE_GLOBAL_ALLOW_READ) == 0) {
845                    if (!is_delete) domain->flags |= DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_READ;
846                    else domain->flags &= ~DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_READ;
847                    return 0;
848            }
849            if (strcmp(data, KEYWORD_IGNORE_GLOBAL_ALLOW_ENV) == 0) {
850                    if (!is_delete) domain->flags |= DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_ENV;
851                    else domain->flags &= ~DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_ENV;
852                    return 0;
853            }
854          cp = FindConditionPart(data);          cp = FindConditionPart(data);
855          if (cp && (cond = FindOrAssignNewCondition(cp)) == NULL) return -EINVAL;          if (cp && (cond = FindOrAssignNewCondition(cp)) == NULL) return -EINVAL;
856          if (strncmp(data, KEYWORD_ALLOW_CAPABILITY, KEYWORD_ALLOW_CAPABILITY_LEN) == 0) {          if (strncmp(data, KEYWORD_ALLOW_CAPABILITY, KEYWORD_ALLOW_CAPABILITY_LEN) == 0) {
# Line 1006  static int ReadDomainPolicy(struct io_bu Line 1016  static int ReadDomainPolicy(struct io_bu
1016                  domain = list1_entry(dpos, struct domain_info, list);                  domain = list1_entry(dpos, struct domain_info, list);
1017                  if (head->read_step != 1) goto acl_loop;                  if (head->read_step != 1) goto acl_loop;
1018                  if (domain->is_deleted) continue;                  if (domain->is_deleted) continue;
1019                  if (io_printf(head, "%s\n" KEYWORD_USE_PROFILE "%u\n%s\n", domain->domainname->name, domain->profile, domain->quota_warned ? "quota_exceeded\n" : "")) return 0;                  if (io_printf(head, "%s\n" KEYWORD_USE_PROFILE "%u\n%s\n%s%s", domain->domainname->name, domain->profile, domain->quota_warned ? "quota_exceeded\n" : "", domain->flags & DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_READ ? KEYWORD_IGNORE_GLOBAL_ALLOW_READ "\n" : "", domain->flags & DOMAIN_FLAGS_IGNORE_GLOBAL_ALLOW_ENV ? KEYWORD_IGNORE_GLOBAL_ALLOW_ENV "\n" : "")) return 0;
1020                  head->read_step = 2;                  head->read_step = 2;
1021          acl_loop: ;          acl_loop: ;
1022                  if (head->read_step == 3) goto tail_mark;                  if (head->read_step == 3) goto tail_mark;
# Line 1311  void CCS_LoadPolicy(const char *filename Line 1321  void CCS_LoadPolicy(const char *filename
1321          printk("SAKURA: 1.6.0-pre   2008/02/26\n");          printk("SAKURA: 1.6.0-pre   2008/02/26\n");
1322  #endif  #endif
1323  #ifdef CONFIG_TOMOYO  #ifdef CONFIG_TOMOYO
1324          printk("TOMOYO: 1.6.0-pre   2008/02/26\n");          printk("TOMOYO: 1.6.0-pre   2008/02/28\n");
1325  #endif  #endif
1326          printk("Mandatory Access Control activated.\n");          printk("Mandatory Access Control activated.\n");
1327          sbin_init_started = true;          sbin_init_started = true;

Legend:
Removed from v.1006  
changed lines
  Added in v.1007

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