Add cwd_optional to command details and enable it in the sudoers plugin.

If cwd_optional is set to true, a failure to set the cwd will be a
warning, not an error, and the command will still run.
Debian bug #598519
This commit is contained in:
Todd C. Miller
2020-03-31 19:43:48 -06:00
parent 9dea4bb244
commit 93aa9f9e90
7 changed files with 55 additions and 6 deletions

View File

@@ -157,6 +157,7 @@ struct command_details {
int closefrom;
int flags;
int execfd;
int cwd_optional;
struct preserved_fd_list preserved_fds;
struct passwd *pw;
GETGROUPS_T *groups;