aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-11-15 20:39:48 -0500
committerJames Morris <jmorris@namei.org>2011-11-15 20:39:48 -0500
commit24942c8e5cc8696064ee207ff29d4cf21f70dafc (patch)
tree08a8221eb72ec3da7746d7d76f6f5915ce77cde7 /security
parente163bc8e4a0cd1cdffadb58253f7651201722d56 (diff)
parentff0ff78068dd8a962358dbbdafa9d6f24540d3e5 (diff)
Merge branch 'master'; commit 'v3.2-rc2' into next
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/Kconfig2
-rw-r--r--security/keys/compat.c2
-rw-r--r--security/keys/encrypted-keys/encrypted.c2
-rw-r--r--security/keys/keyctl.c2
-rw-r--r--security/keys/trusted.c2
-rw-r--r--security/keys/user_defined.c3
-rw-r--r--security/security.c1
-rw-r--r--security/selinux/hooks.c1
-rw-r--r--security/selinux/netlink.c1
-rw-r--r--security/tomoyo/common.c5
10 files changed, 14 insertions, 7 deletions
diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 19c053b82303..4f554f20dc97 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -9,7 +9,7 @@ config IMA
9 select CRYPTO_HMAC 9 select CRYPTO_HMAC
10 select CRYPTO_MD5 10 select CRYPTO_MD5
11 select CRYPTO_SHA1 11 select CRYPTO_SHA1
12 select TCG_TPM if !S390 12 select TCG_TPM if !S390 && !UML
13 select TCG_TIS if TCG_TPM 13 select TCG_TIS if TCG_TPM
14 help 14 help
15 The Trusted Computing Group(TCG) runtime Integrity 15 The Trusted Computing Group(TCG) runtime Integrity
diff --git a/security/keys/compat.c b/security/keys/compat.c
index 338b510e9027..4c48e13448f8 100644
--- a/security/keys/compat.c
+++ b/security/keys/compat.c
@@ -38,7 +38,7 @@ long compat_keyctl_instantiate_key_iov(
38 38
39 ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc, 39 ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc,
40 ARRAY_SIZE(iovstack), 40 ARRAY_SIZE(iovstack),
41 iovstack, &iov); 41 iovstack, &iov, 1);
42 if (ret < 0) 42 if (ret < 0)
43 return ret; 43 return ret;
44 if (ret == 0) 44 if (ret == 0)
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c
index f33804c1b4c8..dcc843cb0f80 100644
--- a/security/keys/encrypted-keys/encrypted.c
+++ b/security/keys/encrypted-keys/encrypted.c
@@ -293,7 +293,7 @@ static char *datablob_format(struct encrypted_key_payload *epayload,
293 /* convert the hex encoded iv, encrypted-data and HMAC to ascii */ 293 /* convert the hex encoded iv, encrypted-data and HMAC to ascii */
294 bufp = &ascii_buf[len]; 294 bufp = &ascii_buf[len];
295 for (i = 0; i < (asciiblob_len - len) / 2; i++) 295 for (i = 0; i < (asciiblob_len - len) / 2; i++)
296 bufp = pack_hex_byte(bufp, iv[i]); 296 bufp = hex_byte_pack(bufp, iv[i]);
297out: 297out:
298 return ascii_buf; 298 return ascii_buf;
299} 299}
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index eca51918c951..0b3f5d72af1c 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -1065,7 +1065,7 @@ long keyctl_instantiate_key_iov(key_serial_t id,
1065 goto no_payload; 1065 goto no_payload;
1066 1066
1067 ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc, 1067 ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc,
1068 ARRAY_SIZE(iovstack), iovstack, &iov); 1068 ARRAY_SIZE(iovstack), iovstack, &iov, 1);
1069 if (ret < 0) 1069 if (ret < 0)
1070 return ret; 1070 return ret;
1071 if (ret == 0) 1071 if (ret == 0)
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 0964fc236946..0ed5fdf238a2 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1098,7 +1098,7 @@ static long trusted_read(const struct key *key, char __user *buffer,
1098 1098
1099 bufp = ascii_buf; 1099 bufp = ascii_buf;
1100 for (i = 0; i < p->blob_len; i++) 1100 for (i = 0; i < p->blob_len; i++)
1101 bufp = pack_hex_byte(bufp, p->blob[i]); 1101 bufp = hex_byte_pack(bufp, p->blob[i]);
1102 if ((copy_to_user(buffer, ascii_buf, 2 * p->blob_len)) != 0) { 1102 if ((copy_to_user(buffer, ascii_buf, 2 * p->blob_len)) != 0) {
1103 kfree(ascii_buf); 1103 kfree(ascii_buf);
1104 return -EFAULT; 1104 return -EFAULT;
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c
index 5b366d7af3c4..69ff52c08e97 100644
--- a/security/keys/user_defined.c
+++ b/security/keys/user_defined.c
@@ -102,7 +102,8 @@ int user_update(struct key *key, const void *data, size_t datalen)
102 key->expiry = 0; 102 key->expiry = 0;
103 } 103 }
104 104
105 kfree_rcu(zap, rcu); 105 if (zap)
106 kfree_rcu(zap, rcu);
106 107
107error: 108error:
108 return ret; 109 return ret;
diff --git a/security/security.c b/security/security.c
index c1d69875db6c..0c6cc69c8f86 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1151,6 +1151,7 @@ void security_sk_clone(const struct sock *sk, struct sock *newsk)
1151{ 1151{
1152 security_ops->sk_clone_security(sk, newsk); 1152 security_ops->sk_clone_security(sk, newsk);
1153} 1153}
1154EXPORT_SYMBOL(security_sk_clone);
1154 1155
1155void security_sk_classify_flow(struct sock *sk, struct flowi *fl) 1156void security_sk_classify_flow(struct sock *sk, struct flowi *fl)
1156{ 1157{
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index e545b9f67072..1126c10a5e82 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -80,6 +80,7 @@
80#include <linux/posix-timers.h> 80#include <linux/posix-timers.h>
81#include <linux/syslog.h> 81#include <linux/syslog.h>
82#include <linux/user_namespace.h> 82#include <linux/user_namespace.h>
83#include <linux/export.h>
83 84
84#include "avc.h" 85#include "avc.h"
85#include "objsec.h" 86#include "objsec.h"
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
index ce3f481558d8..161e01a6c7ef 100644
--- a/security/selinux/netlink.c
+++ b/security/selinux/netlink.c
@@ -14,6 +14,7 @@
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/stddef.h> 15#include <linux/stddef.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/export.h>
17#include <linux/skbuff.h> 18#include <linux/skbuff.h>
18#include <linux/netlink.h> 19#include <linux/netlink.h>
19#include <linux/selinux_netlink.h> 20#include <linux/selinux_netlink.h>
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 610b535108af..c47d3ce6c733 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -748,8 +748,10 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
748 head->r.index++) 748 head->r.index++)
749 if (ns->profile_ptr[head->r.index]) 749 if (ns->profile_ptr[head->r.index])
750 break; 750 break;
751 if (head->r.index == TOMOYO_MAX_PROFILES) 751 if (head->r.index == TOMOYO_MAX_PROFILES) {
752 head->r.eof = true;
752 return; 753 return;
754 }
753 head->r.step++; 755 head->r.step++;
754 break; 756 break;
755 case 2: 757 case 2:
@@ -761,6 +763,7 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
761 tomoyo_io_printf(head, "%u-COMMENT=", index); 763 tomoyo_io_printf(head, "%u-COMMENT=", index);
762 tomoyo_set_string(head, comment ? comment->name : ""); 764 tomoyo_set_string(head, comment ? comment->name : "");
763 tomoyo_set_lf(head); 765 tomoyo_set_lf(head);
766 tomoyo_print_namespace(head);
764 tomoyo_io_printf(head, "%u-PREFERENCE={ ", index); 767 tomoyo_io_printf(head, "%u-PREFERENCE={ ", index);
765 for (i = 0; i < TOMOYO_MAX_PREF; i++) 768 for (i = 0; i < TOMOYO_MAX_PREF; i++)
766 tomoyo_io_printf(head, "%s=%u ", 769 tomoyo_io_printf(head, "%s=%u ",