diff options
author | Paul Moore <paul.moore@hp.com> | 2008-02-05 02:31:00 +0300 |
---|---|---|
committer | James Morris <jmorris@localhost.localdomain> | 2008-02-06 16:40:59 +0300 |
commit | 394c6753978a75cab7558a377f2551a3c1101027 (patch) | |
tree | c2712cb2d52ecae5db1d9ae417241154fe7a0808 /security/selinux/ss/services.c | |
parent | a5ecbcb8c13ea8a822d243bf782d0dc9525b4f84 (diff) | |
download | linux-394c6753978a75cab7558a377f2551a3c1101027.tar.xz |
SELinux: Remove security_get_policycaps()
The security_get_policycaps() functions has a couple of bugs in it and it
isn't currently used by any in-tree code, so get rid of it and all of it's
bugginess.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@localhost.localdomain>
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 * |