diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:41:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:41:19 -0400 |
commit | a8fe1500986c32b46b36118aa250f6badca11bfc (patch) | |
tree | d5517e16e633fa0c54248f27b5921e8ac4e4a459 /security/tomoyo/common.c | |
parent | 94ebd235c493f43681f609b0e02733337053e8f0 (diff) | |
parent | f0d3d9894e43fc68d47948e2c6f03e32da88b799 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (26 commits)
selinux: include vmalloc.h for vmalloc_user
secmark: fix config problem when CONFIG_NF_CONNTRACK_SECMARK is not set
selinux: implement mmap on /selinux/policy
SELinux: allow userspace to read policy back out of the kernel
SELinux: drop useless (and incorrect) AVTAB_MAX_SIZE
SELinux: deterministic ordering of range transition rules
kernel: roundup should only reference arguments once
kernel: rounddown helper function
secmark: export secctx, drop secmark in procfs
conntrack: export lsm context rather than internal secid via netlink
security: secid_to_secctx returns len when data is NULL
secmark: make secmark object handling generic
secmark: do not return early if there was no error
AppArmor: Ensure the size of the copy is < the buffer allocated to hold it
TOMOYO: Print URL information before panic().
security: remove unused parameter from security_task_setscheduler()
tpm: change 'tpm_suspend_pcr' to be module parameter
selinux: fix up style problem on /selinux/status
selinux: change to new flag variable
selinux: really fix dependency causing parallel compile failure.
...
Diffstat (limited to 'security/tomoyo/common.c')
-rw-r--r-- | security/tomoyo/common.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index c668b447c725..7556315c1978 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -768,8 +768,10 @@ static bool tomoyo_select_one(struct tomoyo_io_buffer *head, const char *data) | |||
768 | return true; /* Do nothing if open(O_WRONLY). */ | 768 | return true; /* Do nothing if open(O_WRONLY). */ |
769 | memset(&head->r, 0, sizeof(head->r)); | 769 | memset(&head->r, 0, sizeof(head->r)); |
770 | head->r.print_this_domain_only = true; | 770 | head->r.print_this_domain_only = true; |
771 | head->r.eof = !domain; | 771 | if (domain) |
772 | head->r.domain = &domain->list; | 772 | head->r.domain = &domain->list; |
773 | else | ||
774 | head->r.eof = 1; | ||
773 | tomoyo_io_printf(head, "# select %s\n", data); | 775 | tomoyo_io_printf(head, "# select %s\n", data); |
774 | if (domain && domain->is_deleted) | 776 | if (domain && domain->is_deleted) |
775 | tomoyo_io_printf(head, "# This is a deleted domain.\n"); | 777 | tomoyo_io_printf(head, "# This is a deleted domain.\n"); |
@@ -2051,13 +2053,22 @@ void tomoyo_check_profile(void) | |||
2051 | const u8 profile = domain->profile; | 2053 | const u8 profile = domain->profile; |
2052 | if (tomoyo_profile_ptr[profile]) | 2054 | if (tomoyo_profile_ptr[profile]) |
2053 | continue; | 2055 | continue; |
2056 | printk(KERN_ERR "You need to define profile %u before using it.\n", | ||
2057 | profile); | ||
2058 | printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ " | ||
2059 | "for more information.\n"); | ||
2054 | panic("Profile %u (used by '%s') not defined.\n", | 2060 | panic("Profile %u (used by '%s') not defined.\n", |
2055 | profile, domain->domainname->name); | 2061 | profile, domain->domainname->name); |
2056 | } | 2062 | } |
2057 | tomoyo_read_unlock(idx); | 2063 | tomoyo_read_unlock(idx); |
2058 | if (tomoyo_profile_version != 20090903) | 2064 | if (tomoyo_profile_version != 20090903) { |
2065 | printk(KERN_ERR "You need to install userland programs for " | ||
2066 | "TOMOYO 2.3 and initialize policy configuration.\n"); | ||
2067 | printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ " | ||
2068 | "for more information.\n"); | ||
2059 | panic("Profile version %u is not supported.\n", | 2069 | panic("Profile version %u is not supported.\n", |
2060 | tomoyo_profile_version); | 2070 | tomoyo_profile_version); |
2071 | } | ||
2061 | printk(KERN_INFO "TOMOYO: 2.3.0\n"); | 2072 | printk(KERN_INFO "TOMOYO: 2.3.0\n"); |
2062 | printk(KERN_INFO "Mandatory Access Control activated.\n"); | 2073 | printk(KERN_INFO "Mandatory Access Control activated.\n"); |
2063 | } | 2074 | } |