aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
commit35eeacf1820a08305c2b0960febfa190f5a6dd63 (patch)
treef1227c7384ee01d3f029cc5f82223234e6456c5f /security/selinux/hooks.c
parentbed45f79a2afc9d7c279b880dfcac8f27d513b50 (diff)
parent1ee18329fae936089c6c599250ae92482ff2b81f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 53cb6da5f1c6..5eebce1af9a4 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5888,7 +5888,7 @@ static int selinux_setprocattr(struct task_struct *p,
5888 return error; 5888 return error;
5889 5889
5890 /* Obtain a SID for the context, if one was specified. */ 5890 /* Obtain a SID for the context, if one was specified. */
5891 if (size && str[1] && str[1] != '\n') { 5891 if (size && str[0] && str[0] != '\n') {
5892 if (str[size-1] == '\n') { 5892 if (str[size-1] == '\n') {
5893 str[size-1] = 0; 5893 str[size-1] = 0;
5894 size--; 5894 size--;