diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:30:16 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:30:16 -0400 |
commit | 15dbb5a3f971a28040ae6cbcd8bbdf19b629fa83 (patch) | |
tree | e65562d7300ac653207b1e45ec7e5960ddf78fff /security | |
parent | be697c3f137c9ed808753bbbc5d7751c6e5303fc (diff) | |
parent | 5fadd053d9bb4345ec6f405d24db4e7eb49cf81e (diff) |
Merge branch 'master'
Diffstat (limited to 'security')
-rw-r--r-- | security/dummy.c | 2 | ||||
-rw-r--r-- | security/selinux/hooks.c | 4 | ||||
-rw-r--r-- | security/selinux/selinuxfs.c | 4 | ||||
-rw-r--r-- | security/selinux/ss/policydb.c | 6 |
4 files changed, 10 insertions, 6 deletions
diff --git a/security/dummy.c b/security/dummy.c index 9623a61dfc76..3d34f3de7e82 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -768,7 +768,7 @@ static int dummy_socket_getpeersec(struct socket *sock, char __user *optval, | |||
768 | return -ENOPROTOOPT; | 768 | return -ENOPROTOOPT; |
769 | } | 769 | } |
770 | 770 | ||
771 | static inline int dummy_sk_alloc_security (struct sock *sk, int family, int priority) | 771 | static inline int dummy_sk_alloc_security (struct sock *sk, int family, gfp_t priority) |
772 | { | 772 | { |
773 | return 0; | 773 | return 0; |
774 | } | 774 | } |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b13be15165f5..447a1e0f48cb 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -262,7 +262,7 @@ static void superblock_free_security(struct super_block *sb) | |||
262 | } | 262 | } |
263 | 263 | ||
264 | #ifdef CONFIG_SECURITY_NETWORK | 264 | #ifdef CONFIG_SECURITY_NETWORK |
265 | static int sk_alloc_security(struct sock *sk, int family, int priority) | 265 | static int sk_alloc_security(struct sock *sk, int family, gfp_t priority) |
266 | { | 266 | { |
267 | struct sk_security_struct *ssec; | 267 | struct sk_security_struct *ssec; |
268 | 268 | ||
@@ -3380,7 +3380,7 @@ out: | |||
3380 | return err; | 3380 | return err; |
3381 | } | 3381 | } |
3382 | 3382 | ||
3383 | static int selinux_sk_alloc_security(struct sock *sk, int family, int priority) | 3383 | static int selinux_sk_alloc_security(struct sock *sk, int family, gfp_t priority) |
3384 | { | 3384 | { |
3385 | return sk_alloc_security(sk, family, priority); | 3385 | return sk_alloc_security(sk, family, priority); |
3386 | } | 3386 | } |
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 8eb140dd2e4b..a45cc971e735 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -879,7 +879,7 @@ static ssize_t sel_commit_bools_write(struct file *filep, | |||
879 | if (sscanf(page, "%d", &new_value) != 1) | 879 | if (sscanf(page, "%d", &new_value) != 1) |
880 | goto out; | 880 | goto out; |
881 | 881 | ||
882 | if (new_value) { | 882 | if (new_value && bool_pending_values) { |
883 | security_set_bools(bool_num, bool_pending_values); | 883 | security_set_bools(bool_num, bool_pending_values); |
884 | } | 884 | } |
885 | 885 | ||
@@ -952,6 +952,7 @@ static int sel_make_bools(void) | |||
952 | 952 | ||
953 | /* remove any existing files */ | 953 | /* remove any existing files */ |
954 | kfree(bool_pending_values); | 954 | kfree(bool_pending_values); |
955 | bool_pending_values = NULL; | ||
955 | 956 | ||
956 | sel_remove_bools(dir); | 957 | sel_remove_bools(dir); |
957 | 958 | ||
@@ -1002,6 +1003,7 @@ out: | |||
1002 | } | 1003 | } |
1003 | return ret; | 1004 | return ret; |
1004 | err: | 1005 | err: |
1006 | kfree(values); | ||
1005 | d_genocide(dir); | 1007 | d_genocide(dir); |
1006 | ret = -ENOMEM; | 1008 | ret = -ENOMEM; |
1007 | goto out; | 1009 | goto out; |
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 0a758323a9cf..8e6262d12aa9 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -650,8 +650,10 @@ void policydb_destroy(struct policydb *p) | |||
650 | } | 650 | } |
651 | if (lrt) kfree(lrt); | 651 | if (lrt) kfree(lrt); |
652 | 652 | ||
653 | for (i = 0; i < p->p_types.nprim; i++) | 653 | if (p->type_attr_map) { |
654 | ebitmap_destroy(&p->type_attr_map[i]); | 654 | for (i = 0; i < p->p_types.nprim; i++) |
655 | ebitmap_destroy(&p->type_attr_map[i]); | ||
656 | } | ||
655 | kfree(p->type_attr_map); | 657 | kfree(p->type_attr_map); |
656 | 658 | ||
657 | return; | 659 | return; |