Skip to content

Commit e24737e

Browse files
committed
Add --with-secure-path-value option
This can be used by package maintainers to set the value of secure_path that is substituted into the default sudoers file.
1 parent 986fdec commit e24737e

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

INSTALL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,13 @@ Defaults are listed in brackets after the description.
10031003
is used.
10041004
Sudoers option: secure_path
10051005

1006+
--with-secure-path-value[=PATH]
1007+
Sets the value of "secure_path" that is substituted into
1008+
the default sudoers file. This option is intended to be
1009+
used by package maintainers who wish to set "secure_path"
1010+
to a system-specific value in the default sudoers file.
1011+
It does not actually enable "secure-path".
1012+
10061013
--with-sendmail=PATH
10071014
Override configure's guess as to the location of sendmail.
10081015
Sudoers option: mailerpath

configure

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,7 @@ with_nsswitch
10021002
with_ldap
10031003
with_ldap_conf_file
10041004
with_ldap_secret_file
1005+
with_secure_path_value
10051006
with_secure_path
10061007
with_interfaces
10071008
with_askpass
@@ -1883,6 +1884,8 @@ Optional Packages:
18831884
--with-ldap[=DIR] enable LDAP support
18841885
--with-ldap-conf-file path to LDAP configuration file
18851886
--with-ldap-secret-file path to LDAP secret password file
1887+
--with-secure-path-value
1888+
value of secure_path in the default sudoers file
18861889
--with-secure-path override the user's path with a built-in one
18871890
--without-interfaces don't try to read the ip addr of network interfaces
18881891
--with-askpass=PATH Fully qualified pathname of askpass helper
@@ -6307,6 +6310,19 @@ EOF
63076310

63086311

63096312

6313+
# Check whether --with-secure-path-value was given.
6314+
if test ${with_secure_path_value+y}
6315+
then :
6316+
withval=$with_secure_path_value; case $with_secure_path_value in
6317+
yes|no) as_fn_error $? "must give --secure-path-value an argument." "$LINENO" 5
6318+
;;
6319+
*) secure_path="$with_secure_path_value"
6320+
;;
6321+
esac
6322+
fi
6323+
6324+
6325+
63106326
# Check whether --with-secure-path was given.
63116327
if test ${with_secure_path+y}
63126328
then :

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,14 @@ AC_ARG_WITH(ldap-secret-file, [AS_HELP_STRING([--with-ldap-secret-file], [path t
10681068
test -n "$with_ldap_secret_file" && ldap_secret="$with_ldap_secret_file"
10691069
SUDO_DEFINE_UNQUOTED(_PATH_LDAP_SECRET, "$ldap_secret", [Path to the ldap.secret file])
10701070

1071+
AC_ARG_WITH(secure-path-value, [AS_HELP_STRING([--with-secure-path-value], [value of secure_path in the default sudoers file])],
1072+
[case $with_secure_path_value in
1073+
yes|no) AC_MSG_ERROR([must give --secure-path-value an argument.])
1074+
;;
1075+
*) secure_path="$with_secure_path_value"
1076+
;;
1077+
esac])
1078+
10711079
AC_ARG_WITH(secure-path, [AS_HELP_STRING([--with-secure-path], [override the user's path with a built-in one])],
10721080
[case $with_secure_path in
10731081
yes) with_secure_path="$secure_path"

0 commit comments

Comments
 (0)