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

Subversion リポジトリの参照

Diff of /trunk/1.6.x/ccs-patch/fs/tomoyo_domain.c

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

revision 1007 by kumaneko, Thu Feb 28 06:42:01 2008 UTC revision 1012 by kumaneko, Mon Mar 3 05:07:11 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/28   * Version: 1.6.0-pre   2008/03/03
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 992  static int try_alt_exec(struct linux_bin Line 992  static int try_alt_exec(struct linux_bin
992          return retval;          return retval;
993  }  }
994    
 #endif  
   
995  int search_binary_handler_with_transition(struct linux_binprm *bprm, struct pt_regs *regs)  int search_binary_handler_with_transition(struct linux_binprm *bprm, struct pt_regs *regs)
996  {  {
997          struct domain_info *next_domain = NULL, *prev_domain = current->domain_info;          struct domain_info *next_domain = NULL, *prev_domain = current->domain_info;
998          int retval;          int retval;
999          char *work = NULL; /* Keep valid until search_binary_handler() finishes. */          char *work = NULL; /* Keep valid until search_binary_handler() finishes. */
 #if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO)  
         extern void CCS_LoadPolicy(const char *filename);  
1000          CCS_LoadPolicy(bprm->filename);          CCS_LoadPolicy(bprm->filename);
1001  #endif          if (prev_domain->flags & DOMAIN_FLAGS_FORCE_ALT_EXEC) retval = -EPERM;
1002  #if defined(CONFIG_TOMOYO)          else retval = FindNextDomain(bprm, &next_domain, 1);
         retval = FindNextDomain(bprm, &next_domain, 1);  
1003          if (retval == -EPERM && try_alt_exec(bprm, &work) == 0 && prepare_binprm(bprm) >= 0) {          if (retval == -EPERM && try_alt_exec(bprm, &work) == 0 && prepare_binprm(bprm) >= 0) {
1004                  current->tomoyo_flags |= CCS_DONT_SLEEP_ON_ENFORCE_ERROR;                  current->tomoyo_flags |= CCS_DONT_SLEEP_ON_ENFORCE_ERROR;
1005                  retval = FindNextDomain(bprm, &next_domain, 0);                  retval = FindNextDomain(bprm, &next_domain, 0);
# Line 1020  int search_binary_handler_with_transitio Line 1015  int search_binary_handler_with_transitio
1015          }          }
1016          ccs_free(work);          ccs_free(work);
1017          return retval;          return retval;
 #else  
         return search_binary_handler(bprm, regs);  
 #endif  
1018  }  }
1019    
1020    #endif
1021    
1022  /***** TOMOYO Linux end. *****/  /***** TOMOYO Linux end. *****/

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

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