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

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 366 by kumaneko, Fri Aug 17 04:44:33 2007 UTC revision 461 by kumaneko, Thu Sep 13 04:38:15 2007 UTC
# Line 5  Line 5 
5   *   *
6   * Copyright (C) 2005-2007  NTT DATA CORPORATION   * Copyright (C) 2005-2007  NTT DATA CORPORATION
7   *   *
8   * Version: 1.5.0-pre   2007/08/17   * Version: 1.5.0-pre   2007/09/13
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 85  static DECLARE_MUTEX(new_domain_assign_l Line 85  static DECLARE_MUTEX(new_domain_assign_l
85    
86  /*************************  UTILITY FUNCTIONS  *************************/  /*************************  UTILITY FUNCTIONS  *************************/
87    
 int IsDomainDef(const unsigned char *buffer)  
 {  
         /* while (*buffer && (*buffer <= ' ' || *buffer >= 127)) buffer++; */  
         return strncmp(buffer, ROOT_NAME, ROOT_NAME_LEN) == 0;  
 }  
   
88  const char *GetLastName(const struct domain_info *domain)  const char *GetLastName(const struct domain_info *domain)
89  {  {
90          const char *cp0 = domain->domainname->name, *cp1;          const char *cp0 = domain->domainname->name, *cp1;
# Line 98  const char *GetLastName(const struct dom Line 92  const char *GetLastName(const struct dom
92          return cp0;          return cp0;
93  }  }
94    
 int ReadSelfDomain(struct io_buffer *head)  
 {  
         if (!head->read_eof) {  
                 io_printf(head, "%s", current->domain_info->domainname->name);  
                 head->read_eof = 1;  
         }  
         return 0;  
 }  
   
95  int AddDomainACL(struct acl_info *ptr, struct domain_info *domain, struct acl_info *new_ptr)  int AddDomainACL(struct acl_info *ptr, struct domain_info *domain, struct acl_info *new_ptr)
96  {  {
97          mb(); /* Instead of using spinlock. */          mb(); /* Instead of using spinlock. */
# Line 535  struct domain_info *UndeleteDomain(const Line 520  struct domain_info *UndeleteDomain(const
520    
521  /*************************  DOMAIN TRANSITION HANDLER  *************************/  /*************************  DOMAIN TRANSITION HANDLER  *************************/
522    
 struct domain_info *FindDomain(const char *domainname0)  
 {  
         struct domain_info *domain;  
         static int first = 1;  
         struct path_info domainname;  
         domainname.name = domainname0;  
         fill_path_info(&domainname);  
         if (first) {  
                 KERNEL_DOMAIN.domainname = SaveName(ROOT_NAME);  
                 first = 0;  
         }  
         for (domain = &KERNEL_DOMAIN; domain; domain = domain->next) {  
                 if (!domain->is_deleted && !pathcmp(&domainname, domain->domainname)) return domain;  
         }  
         return NULL;  
 }  
   
523  struct domain_info *FindOrAssignNewDomain(const char *domainname, const u8 profile)  struct domain_info *FindOrAssignNewDomain(const char *domainname, const u8 profile)
524  {  {
525          struct domain_info *domain = NULL;          struct domain_info *domain = NULL;

Legend:
Removed from v.366  
changed lines
  Added in v.461

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