Skip to content

Commit

Permalink
selinux: fix sel_write_enforce broken return value
Browse files Browse the repository at this point in the history
commit 6436a123a147db51a0b06024a8350f4c230e73ff upstream.

Return a negative error value like the rest of the entries in this function.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
[PM: tweaked subject line]
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
JoePerches authored and AndroiableDroid committed Jan 2, 2018
1 parent d9b0bfc commit 8b9203f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/selinuxfs.c
Expand Up @@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
goto out;

/* No partial writes. */
length = EINVAL;
length = -EINVAL;
if (*ppos != 0)
goto out;

Expand Down

0 comments on commit 8b9203f

Please sign in to comment.