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

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 1564 by kumaneko, Tue Sep 9 05:02:45 2008 UTC revision 1578 by kumaneko, Thu Sep 11 03:40:09 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.5-pre   2008/09/09   * Version: 1.6.5-pre   2008/09/11
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 1363  static bool is_policy_manager(void) Line 1363  static bool is_policy_manager(void)
1363  {  {
1364          struct policy_manager_entry *ptr;          struct policy_manager_entry *ptr;
1365          const char *exe;          const char *exe;
1366          const struct task_struct *task = current;          struct task_struct *task = current;
1367          const struct path_info *domainname = task->domain_info->domainname;          const struct path_info *domainname = task->domain_info->domainname;
1368          bool found = false;          bool found = false;
1369          if (!sbin_init_started)          if (!sbin_init_started)
1370                  return true;                  return true;
1371            if (task->tomoyo_flags & CCS_TASK_IS_POLICY_MANAGER)
1372                    return true;
1373          if (!manage_by_non_root && (task->uid || task->euid))          if (!manage_by_non_root && (task->uid || task->euid))
1374                  return false;                  return false;
1375          list1_for_each_entry(ptr, &policy_manager_list, list) {          list1_for_each_entry(ptr, &policy_manager_list, list) {
1376                  if (!ptr->is_deleted && ptr->is_domain                  if (!ptr->is_deleted && ptr->is_domain
1377                      && !ccs_pathcmp(domainname, ptr->manager))                      && !ccs_pathcmp(domainname, ptr->manager)) {
1378                            /* Set manager flag. */
1379                            task->tomoyo_flags |= CCS_TASK_IS_POLICY_MANAGER;
1380                          return true;                          return true;
1381                    }
1382          }          }
1383          exe = ccs_get_exe();          exe = ccs_get_exe();
1384          if (!exe)          if (!exe)
# Line 1382  static bool is_policy_manager(void) Line 1387  static bool is_policy_manager(void)
1387                  if (!ptr->is_deleted && !ptr->is_domain                  if (!ptr->is_deleted && !ptr->is_domain
1388                      && !strcmp(exe, ptr->manager->name)) {                      && !strcmp(exe, ptr->manager->name)) {
1389                          found = true;                          found = true;
1390                            /* Set manager flag. */
1391                            task->tomoyo_flags |= CCS_TASK_IS_POLICY_MANAGER;
1392                          break;                          break;
1393                  }                  }
1394          }          }

Legend:
Removed from v.1564  
changed lines
  Added in v.1578

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