Explorar o código

Merge branch 'stable-4.10' of git://git.infradead.org/users/pcmoore/selinux into next

James Morris %!s(int64=8) %!d(string=hai) anos
pai
achega
e2241be62d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      security/selinux/hooks.c

+ 1 - 1
security/selinux/hooks.c

@@ -5887,7 +5887,7 @@ static int selinux_setprocattr(struct task_struct *p,
 		return error;
 		return error;
 
 
 	/* Obtain a SID for the context, if one was specified. */
 	/* Obtain a SID for the context, if one was specified. */
-	if (size && str[1] && str[1] != '\n') {
+	if (size && str[0] && str[0] != '\n') {
 		if (str[size-1] == '\n') {
 		if (str[size-1] == '\n') {
 			str[size-1] = 0;
 			str[size-1] = 0;
 			size--;
 			size--;