diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 19:48:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 19:48:34 +0100 |
commit | 8ed5de58cf4c45ff0ca97cb0d48d76f0e42faec6 (patch) | |
tree | ede6bc489b4d0cae91d730393d6c0dc654528b46 /security/selinux/ss/services.c | |
parent | Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | SELinux: Remove security_get_policycaps() (diff) | |
download | linux-8ed5de58cf4c45ff0ca97cb0d48d76f0e42faec6.tar.xz linux-8ed5de58cf4c45ff0ca97cb0d48d76f0e42faec6.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
SELinux: Remove security_get_policycaps()
security: allow Kconfig to set default mmap_min_addr protection
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r-- | security/selinux/ss/services.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index fced6bccee76..f37418601215 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2246,39 +2246,6 @@ int security_get_allow_unknown(void) } /** - * security_get_policycaps - Query the loaded policy for its capabilities - * @len: the number of capability bits - * @values: the capability bit array - * - * Description: - * Get an array of the policy capabilities in @values where each entry in - * @values is either true (1) or false (0) depending the policy's support of - * that feature. The policy capabilities are defined by the - * POLICYDB_CAPABILITY_* enums. The size of the array is stored in @len and it - * is up to the caller to free the array in @values. Returns zero on success, - * negative values on failure. - * - */ -int security_get_policycaps(int *len, int **values) -{ - int rc = -ENOMEM; - unsigned int iter; - - POLICY_RDLOCK; - - *values = kcalloc(POLICYDB_CAPABILITY_MAX, sizeof(int), GFP_ATOMIC); - if (*values == NULL) - goto out; - for (iter = 0; iter < POLICYDB_CAPABILITY_MAX; iter++) - (*values)[iter] = ebitmap_get_bit(&policydb.policycaps, iter); - *len = POLICYDB_CAPABILITY_MAX; - -out: - POLICY_RDUNLOCK; - return rc; -} - -/** * security_policycap_supported - Check for a specific policy capability * @req_cap: capability * |