Fix last commit, now that argc is not reset we need to explicitly
start the copy from argv[1]. From Daniel Kopecek
This commit is contained in:
@@ -425,7 +425,7 @@ selinux_execve(int fd, const char *path, char *const argv[], char *envp[],
|
|||||||
debug_return;
|
debug_return;
|
||||||
}
|
}
|
||||||
nargv[nargc++] = (char *)path;
|
nargv[nargc++] = (char *)path;
|
||||||
memcpy(&nargv[nargc], &argv[argc], argc * sizeof(char *)); /* copies NULL */
|
memcpy(&nargv[nargc], &argv[1], argc * sizeof(char *)); /* copies NULL */
|
||||||
|
|
||||||
/* sesh will handle noexec for us. */
|
/* sesh will handle noexec for us. */
|
||||||
sudo_execve(-1, sesh, nargv, envp, false);
|
sudo_execve(-1, sesh, nargv, envp, false);
|
||||||
|
Reference in New Issue
Block a user