Move noexec path into sudo.conf now that sudo itself handles noexec.

Currently can be configured in sudoers too but is now undocumented
and will be removed in a future release.
This commit is contained in:
Todd C. Miller
2011-03-10 16:12:33 -05:00
parent dc8012265f
commit 7debf44742
4 changed files with 16 additions and 13 deletions

View File

@@ -52,6 +52,8 @@
# define RTLD_LOCAL 0
#endif
const char *noexec_path = _PATH_SUDO_NOEXEC;
/*
* Read in /etc/sudo.conf
* Returns a list of plugins.
@@ -79,9 +81,10 @@ sudo_read_conf(const char *conf_file)
(path = strtok(NULL, " \t")) == NULL) {
continue;
}
if (strcasecmp(name, "askpass") != 0)
continue;
askpass_path = estrdup(path);
if (strcasecmp(name, "askpass") == 0)
askpass_path = estrdup(path);
else if (strcasecmp(name, "noexec") == 0)
noexec_path = estrdup(path);
continue;
}