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

Subversion リポジトリの参照

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

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

revision 3167 by kumaneko, Tue Nov 10 11:55:04 2009 UTC revision 3248 by kumaneko, Sat Dec 12 08:47:01 2009 UTC
# Line 846  static bool ccs_is_select_one(struct ccs Line 846  static bool ccs_is_select_one(struct ccs
846          if (sscanf(data, "pid=%u", &pid) == 1 ||          if (sscanf(data, "pid=%u", &pid) == 1 ||
847              (global_pid = true, sscanf(data, "global-pid=%u", &pid) == 1)) {              (global_pid = true, sscanf(data, "global-pid=%u", &pid) == 1)) {
848                  struct task_struct *p;                  struct task_struct *p;
849                  read_lock(&tasklist_lock);                  ccs_tasklist_lock();
850  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
851                  if (global_pid)                  if (global_pid)
852                          p = find_task_by_pid_ns(pid, &init_pid_ns);                          p = find_task_by_pid_ns(pid, &init_pid_ns);
# Line 857  static bool ccs_is_select_one(struct ccs Line 857  static bool ccs_is_select_one(struct ccs
857  #endif  #endif
858                  if (p)                  if (p)
859                          domain = ccs_task_domain(p);                          domain = ccs_task_domain(p);
860                  read_unlock(&tasklist_lock);                  ccs_tasklist_unlock();
861          } else if (!strncmp(data, "domain=", 7)) {          } else if (!strncmp(data, "domain=", 7)) {
862                  if (ccs_is_domain_def(data + 7))                  if (ccs_is_domain_def(data + 7))
863                          domain = ccs_find_domain(data + 7);                          domain = ccs_find_domain(data + 7);
# Line 1807  static void ccs_read_pid(struct ccs_io_b Line 1807  static void ccs_read_pid(struct ccs_io_b
1807          if (ccs_str_starts(&buf, "global-pid "))          if (ccs_str_starts(&buf, "global-pid "))
1808                  global_pid = true;                  global_pid = true;
1809          pid = (unsigned int) simple_strtoul(buf, NULL, 10);          pid = (unsigned int) simple_strtoul(buf, NULL, 10);
1810          read_lock(&tasklist_lock);          ccs_tasklist_lock();
1811  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
1812          if (global_pid)          if (global_pid)
1813                  p = find_task_by_pid_ns(pid, &init_pid_ns);                  p = find_task_by_pid_ns(pid, &init_pid_ns);
# Line 1820  static void ccs_read_pid(struct ccs_io_b Line 1820  static void ccs_read_pid(struct ccs_io_b
1820                  domain = ccs_task_domain(p);                  domain = ccs_task_domain(p);
1821                  ccs_flags = p->ccs_flags;                  ccs_flags = p->ccs_flags;
1822          }          }
1823          read_unlock(&tasklist_lock);          ccs_tasklist_unlock();
1824          if (!domain)          if (!domain)
1825                  return;                  return;
1826          if (!task_info)          if (!task_info)

Legend:
Removed from v.3167  
changed lines
  Added in v.3248

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