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

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/security/ccsecurity/domain.c

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

revision 2691 by kumaneko, Wed Jun 24 05:16:15 2009 UTC revision 2703 by kumaneko, Tue Jun 30 04:43:11 2009 UTC
# Line 37  struct ccs_domain_info ccs_kernel_domain Line 37  struct ccs_domain_info ccs_kernel_domain
37  /* The list for "struct ccs_domain_info". */  /* The list for "struct ccs_domain_info". */
38  LIST_HEAD(ccs_domain_list);  LIST_HEAD(ccs_domain_list);
39    
 #ifdef CONFIG_TOMOYO  
   
40  /**  /**
41   * ccs_get_last_name - Get last component of a domainname.   * ccs_get_last_name - Get last component of a domainname.
42   *   *
# Line 123  static int ccs_audit_domain_creation_log Line 121  static int ccs_audit_domain_creation_log
121          struct ccs_request_info r;          struct ccs_request_info r;
122          ccs_init_request_info(&r, domain, CCS_MAC_FOR_FILE);          ccs_init_request_info(&r, domain, CCS_MAC_FOR_FILE);
123          error = ccs_write_audit_log(false, &r, "use_profile %u\n", r.profile);          error = ccs_write_audit_log(false, &r, "use_profile %u\n", r.profile);
         ccs_exit_request_info(&r);  
124          return error;          return error;
125  }  }
126    
# Line 1179  static struct ccs_execve_entry *ccs_allo Line 1176  static struct ccs_execve_entry *ccs_allo
1176                  ccs_free(ee);                  ccs_free(ee);
1177                  return NULL;                  return NULL;
1178          }          }
1179            ee->srcu_idx = srcu_read_lock(&ccs_ss);
1180          /* ee->dump->data is allocated by ccs_dump_page(). */          /* ee->dump->data is allocated by ccs_dump_page(). */
1181          ee->task = current;          ee->task = current;
1182          /***** CRITICAL SECTION START *****/          /***** CRITICAL SECTION START *****/
# Line 1229  static void ccs_free_execve_entry(struct Line 1227  static void ccs_free_execve_entry(struct
1227          ccs_free(ee->program_path);          ccs_free(ee->program_path);
1228          ccs_free(ee->tmp);          ccs_free(ee->tmp);
1229          kfree(ee->dump.data);          kfree(ee->dump.data);
1230            srcu_read_unlock(&ccs_ss, ee->srcu_idx);
1231          ccs_free(ee);          ccs_free(ee);
1232  }  }
1233    
# Line 1625  void ccs_finish_execve(int retval) Line 1624  void ccs_finish_execve(int retval)
1624          else          else
1625                  task->ccs_flags &= ~CCS_TASK_IS_EXECUTE_HANDLER;                  task->ccs_flags &= ~CCS_TASK_IS_EXECUTE_HANDLER;
1626   out:   out:
         ccs_exit_request_info(&ee->r);  
1627          ccs_free_execve_entry(ee);          ccs_free_execve_entry(ee);
1628  }  }
   
 #else  
   
 /**  
  * ccs_start_execve - Prepare for execve() operation.  
  *  
  * @bprm: Pointer to "struct linux_binprm".  
  *  
  * Returns 0.  
  */  
 int ccs_start_execve(struct linux_binprm *bprm)  
 {  
 #ifdef CONFIG_SAKURA  
         /* Clear manager flag. */  
         current->ccs_flags &= ~CCS_TASK_IS_POLICY_MANAGER;  
         if (!ccs_policy_loaded)  
                 ccs_load_policy(bprm->filename);  
 #endif  
         return 0;  
 }  
   
 /**  
  * ccs_finish_execve - Clean up execve() operation.  
  */  
 void ccs_finish_execve(int retval)  
 {  
 }  
   
 #endif  

Legend:
Removed from v.2691  
changed lines
  Added in v.2703

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