Implement --with-umask-override configure flag.

This commit is contained in:
Todd C. Miller
2010-09-14 17:18:55 -04:00
parent ed45e68da9
commit b51afe6249
8 changed files with 241 additions and 124 deletions

51
configure vendored
View File

@@ -812,6 +812,7 @@ logfac
lecture
long_otp_prompt
passprompt
umask_override
sudo_umask
password_timeout
timeout
@@ -956,6 +957,7 @@ with_sudoers_mode
with_sudoers_uid
with_sudoers_gid
with_umask
with_umask_override
with_runas_default
with_exempt
with_editor
@@ -1717,6 +1719,8 @@ Optional Packages:
--with-umask umask with which the prog should run (default is
022)
--without-umask Preserves the umask of the user invoking sudo.
--with-umask-override Use the umask specified in sudoers even if it is
less restrictive than the user's.
--with-runas-default User to run commands as (default is "root")
--with-exempt=group no passwd needed for users in this group
--with-editor=path Default editor for visudo (defaults to vi)
@@ -2961,6 +2965,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
#
@@ -2971,6 +2976,7 @@ timedir=/var/adm/sudo
timeout=5
password_timeout=5
sudo_umask=0022
umask_override=off
passprompt="Password:"
long_otp_prompt=off
lecture=once
@@ -4787,6 +4793,22 @@ else
$as_echo "$sudo_umask" >&6; }
fi
# Check whether --with-umask-override was given.
if test "${with_umask_override+set}" = set; then :
withval=$with_umask_override; case $with_umask_override in
yes) $as_echo "#define UMASK_OVERRIDE 1" >>confdefs.h
umask_override=on
;;
no) umask_override=off
;;
*) as_fn_error "\"--with-umask-override does not take an argument.\"" "$LINENO" 5
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default user to run commands as" >&5
$as_echo_n "checking for default user to run commands as... " >&6; }
@@ -6748,13 +6770,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:6751: $ac_compile\"" >&5)
(eval echo "\"\$as_me:6773: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:6754: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:6776: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:6757: output\"" >&5)
(eval echo "\"\$as_me:6779: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -7959,7 +7981,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 7962 "configure"' > conftest.$ac_ext
echo '#line 7984 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9351,11 +9373,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:9354: $lt_compile\"" >&5)
(eval echo "\"\$as_me:9376: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:9358: \$? = $ac_status" >&5
echo "$as_me:9380: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9690,11 +9712,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:9693: $lt_compile\"" >&5)
(eval echo "\"\$as_me:9715: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:9697: \$? = $ac_status" >&5
echo "$as_me:9719: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9795,11 +9817,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:9798: $lt_compile\"" >&5)
(eval echo "\"\$as_me:9820: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:9802: \$? = $ac_status" >&5
echo "$as_me:9824: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9850,11 +9872,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:9853: $lt_compile\"" >&5)
(eval echo "\"\$as_me:9875: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:9857: \$? = $ac_status" >&5
echo "$as_me:9879: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12217,7 +12239,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12220 "configure"
#line 12242 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12313,7 +12335,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12316 "configure"
#line 12338 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20537,5 +20559,6 @@ fi