5 |
* |
* |
6 |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
7 |
* |
* |
8 |
* Version: 1.6.4 2008/09/03 |
* Version: 1.6.5-pre 2008/09/09 |
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. |
2411 |
} |
} |
2412 |
#endif |
#endif |
2413 |
#ifdef CONFIG_SAKURA |
#ifdef CONFIG_SAKURA |
2414 |
printk(KERN_INFO "SAKURA: 1.6.4 2008/09/03\n"); |
printk(KERN_INFO "SAKURA: 1.6.5-pre 2008/09/09\n"); |
2415 |
#endif |
#endif |
2416 |
#ifdef CONFIG_TOMOYO |
#ifdef CONFIG_TOMOYO |
2417 |
printk(KERN_INFO "TOMOYO: 1.6.4 2008/09/03\n"); |
printk(KERN_INFO "TOMOYO: 1.6.5-pre 2008/09/09\n"); |
2418 |
#endif |
#endif |
2419 |
printk(KERN_INFO "Mandatory Access Control activated.\n"); |
printk(KERN_INFO "Mandatory Access Control activated.\n"); |
2420 |
sbin_init_started = true; |
sbin_init_started = true; |
2460 |
* @fmt: The printf()'s format string, followed by parameters. |
* @fmt: The printf()'s format string, followed by parameters. |
2461 |
* |
* |
2462 |
* Returns 0 if the supervisor decided to permit the access request which |
* Returns 0 if the supervisor decided to permit the access request which |
2463 |
* violated the policy in enforcing mode, -EPERM otherwise. |
* violated the policy in enforcing mode, 1 if the supervisor decided to |
2464 |
|
* retry the access request which violated the policy in enforcing mode, |
2465 |
|
* -EPERM otherwise. |
2466 |
*/ |
*/ |
2467 |
int ccs_check_supervisor(struct linux_binprm *bprm, const char *fmt, ...) |
int ccs_check_supervisor(struct linux_binprm *bprm, const char *fmt, ...) |
2468 |
{ |
{ |
2536 |
spin_unlock(&query_lock); |
spin_unlock(&query_lock); |
2537 |
/***** CRITICAL SECTION END *****/ |
/***** CRITICAL SECTION END *****/ |
2538 |
switch (query_entry->answer) { |
switch (query_entry->answer) { |
2539 |
|
case 2: /* Asked to retry by administrator. */ |
2540 |
|
error = 1; |
2541 |
|
break; |
2542 |
case 1: |
case 1: |
2543 |
/* Granted by administrator. */ |
/* Granted by administrator. */ |
2544 |
error = 0; |
error = 0; |