Change how we handle the sudoedit argv. We now require that there

be a "--" in argv to separate the editor and any command line arguments
from the files to be edited.
This commit is contained in:
Todd C. Miller
2010-05-13 17:11:31 -04:00
parent fdd28d411f
commit 7c9c5855fd
4 changed files with 51 additions and 39 deletions

View File

@@ -246,7 +246,7 @@ main(int argc, char *argv[], char *envp[])
#endif /* RLIMIT_CORE && !SUDO_DEVEL */
/* run_command will call the close method for us */
if (sudo_mode & MODE_EDIT) {
exitcode = sudo_edit(&command_details, argv_out, nargv + 1, user_env_out);
exitcode = sudo_edit(&command_details, argv_out, user_env_out);
} else {
exitcode = run_command(&command_details, argv_out, user_env_out);
}