diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-04 03:03:12 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-04 03:03:12 +0100 |
commit | 5586a6cb16780985e82d449a581beb203d521eaa (patch) | |
tree | 2eedbe8cb683be29f305ff552faf019ed0273bf4 | |
parent | Wrap at 80 chars (diff) | |
download | kernel-assisted-superuser-master.tar.xz kernel-assisted-superuser-master.zip |
In case we already have su from elsewhere, use it instead.
-rw-r--r-- | superuser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/superuser.c b/superuser.c index 3df1b4f..0e70b55 100644 --- a/superuser.c +++ b/superuser.c @@ -75,6 +75,9 @@ static long new_execve(const char __user *filename, if (!is_su(filename)) return old_execve(filename, argv, envp); + if (!old_execve(filename, argv, envp)) + return 0; + /* It might be enough to just change the security ctx of the * current task, but that requires slightly more thought than * just axing the whole thing here. |