with_noexec
with_netsvc
enable_sia
+with_pam_login
enable_pam_session
enable_zlib
'
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-noexec=PATH fully qualified pathname of sudo_noexec.so
--with-netsvc[=PATH] path to netsvc.conf
+ --with-pam-login enable specific PAM session for sudo -i
Some influential environment variables:
CC C compiler command
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:6622: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6624: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:6625: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6627: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:6628: output\"" >&5)
+ (eval echo "\"\$as_me:6630: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 7833 "configure"' > conftest.$ac_ext
+ echo '#line 7835 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-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:9226: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9228: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9230: \$? = $ac_status" >&5
+ echo "$as_me:9232: \$? = $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.
-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:9565: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9567: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9569: \$? = $ac_status" >&5
+ echo "$as_me:9571: \$? = $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.
-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:9670: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9672: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9674: \$? = $ac_status" >&5
+ echo "$as_me:9676: \$? = $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
-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:9725: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9727: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9729: \$? = $ac_status" >&5
+ echo "$as_me:9731: \$? = $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
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12092 "configure"
+#line 12094 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12188 "configure"
+#line 12190 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
AUTH_OBJS="$AUTH_OBJS pam.o";
AUTH_EXCL=PAM
+
+
+# Check whether --with-pam-login was given.
+if test "${with_pam_login+set}" = set; then :
+ withval=$with_pam_login; case $with_pam_login in
+ yes) $as_echo "#define HAVE_PAM_LOGIN 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use PAM login" >&5
+$as_echo_n "checking whether to use PAM login... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ no) ;;
+ *) as_fn_error "\"--with-pam-login does not take an argument.\"" "$LINENO" 5
+ ;;
+ esac
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use PAM session support" >&5
$as_echo_n "checking whether to use PAM session support... " >&6; }
# Check whether --enable-pam_session was given.
$as_echo "yes" >&6; }
fi
+
case $host in
*-*-linux*|*-*-solaris*)
# dgettext() may be defined to dgettext_libintl in the
+
AC_DEFINE(HAVE_PAM)
AUTH_OBJS="$AUTH_OBJS pam.o";
AUTH_EXCL=PAM
+
+ AC_ARG_WITH(pam-login, [AS_HELP_STRING([--with-pam-login], [enable specific PAM session for sudo -i])],
+ [case $with_pam_login in
+ yes) AC_DEFINE([HAVE_PAM_LOGIN])
+ AC_MSG_CHECKING(whether to use PAM login)
+ AC_MSG_RESULT(yes)
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR(["--with-pam-login does not take an argument."])
+ ;;
+ esac])
+
AC_MSG_CHECKING(whether to use PAM session support)
AC_ARG_ENABLE(pam_session,
[AS_HELP_STRING([--disable-pam-session], [Disable PAM session support])],
AC_MSG_WARN([Ignoring unknown argument to --enable-pam-session: $enableval])
;;
esac], AC_MSG_RESULT(yes))
+
case $host in
*-*-linux*|*-*-solaris*)
# dgettext() may be defined to dgettext_libintl in the
AH_TEMPLATE(HAVE_LINUX_AUDIT, [Define to 1 to enable Linux audit support.])
AH_TEMPLATE(HAVE_OPIE, [Define to 1 if you use NRL OPIE.])
AH_TEMPLATE(HAVE_PAM, [Define to 1 if you use PAM authentication.])
+AH_TEMPLATE(HAVE_PAM_LOGIN, [Define to 1 if you use a specific PAM session for sudo -i.])
AH_TEMPLATE(HAVE_PROJECT_H, [Define to 1 if you have the <project.h> header file.])
AH_TEMPLATE(HAVE_SECURID, [Define to 1 if you use SecurID for authentication.])
AH_TEMPLATE(HAVE_SELINUX, [Define to 1 to enable SELinux RBAC support.])
/*
* Prototypes
*/
-static void init_vars __P((int, char **));
+static void init_vars __P((char **));
static int set_cmnd __P((int));
static void initial_setup __P((void));
static void set_loginclass __P((struct passwd *));
char *runas_user;
char *runas_group;
static struct sudo_nss_list *snl;
-static int sudo_mode;
+int sudo_mode;
/* For getopt(3) */
extern char *optarg;
if (user_cmnd == NULL && NewArgc == 0)
usage(1);
- init_vars(sudo_mode, envp); /* XXX - move this later? */
+ init_vars(envp); /* XXX - move this later? */
#ifdef USING_NONUNIX_GROUPS
sudo_nonunix_groupcheck_init(); /* initialise nonunix groups impl */
def_env_reset = FALSE;
/* Build a new environment that avoids any nasty bits. */
- rebuild_env(sudo_mode, def_noexec);
+ rebuild_env(def_noexec);
/* Fill in passwd struct based on user we are authenticating as. */
auth_pw = get_authpw();
* load the ``interfaces'' array.
*/
static void
-init_vars(sudo_mode, envp)
- int sudo_mode;
+init_vars(envp)
char **envp;
{
char *p, **ep, thost[MAXHOSTNAMELEN + 1];