diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2016-05-13 06:40:59 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 2016-05-13 06:40:59 -0600 |
commit | f0e80d9bc7af51906a633925009d9efb435c60d6 (patch) | |
tree | dfaa786fb6a331b810831f153c5b1f790759c6dc /src/selinux.c | |
parent | a8a967acf9e46e9e90d202c25f88a3c491a7d4d0 (diff) | |
download | sudo-f0e80d9bc7af51906a633925009d9efb435c60d6.tar.gz |
Fix last commit, now that argc is not reset we need to explicitly
start the copy from argv[1]. From Daniel Kopecek
Diffstat (limited to 'src/selinux.c')
-rw-r--r-- | src/selinux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selinux.c b/src/selinux.c index 522610e32..f0b9fbc02 100644 --- a/src/selinux.c +++ b/src/selinux.c @@ -425,7 +425,7 @@ selinux_execve(int fd, const char *path, char *const argv[], char *envp[], debug_return; } 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. */ sudo_execve(-1, sesh, nargv, envp, false); |