Add CHROOT and CWD sudoers options.

Also matching runchroot and runcwd Defaults settings.
This commit is contained in:
Todd C. Miller
2020-09-01 06:26:00 -06:00
parent c4a579cf8a
commit 6bdfd010d2
35 changed files with 3189 additions and 2162 deletions

View File

@@ -249,7 +249,8 @@ parse_default_entry(struct sudo_defs_types *def, const char *val, int op,
rc = store_syslogpri(val, &def->sd_un);
break;
case T_STR:
if (ISSET(def->type, T_PATH) && val != NULL && *val != '/') {
if (ISSET(def->type, T_PATH) && val != NULL && *val != '/' &&
(!ISSET(def->type, T_TILDE) || *val != '~')) {
if (!quiet) {
if (lineno > 0) {
sudo_warnx(U_("%s:%d: values for \"%s\" must start with a '/'"),