* configure.in: Added option --enable-account-tools-setuid to
enable/disable the usage of PAM to authenticate the callers of account management tools: chage, chgpasswd, chpasswd, groupadd, groupdel, groupmod, useradd, userdel, usermod. * src/Makefile.am: Do not link the above tools with libpam if account-tools-setuid is disabled. * src/userdel.c, src/newusers.c, src/chpasswd.c, src/usermod.c, src/groupdel.c, src/chgpasswd.c, src/useradd.c, src/groupmod.c, src/groupadd.c, src/chage.c: Implement ACCT_TOOLS_SETUID (--enable-account-tools-setuid). * etc/pam.d/Makefile.am: Install the pam service file for the above tools only when needed. * src/useradd.c, src/userdel.c, src/usermod.c: It is no more needed to initialize retval to PAM_SUCCESS.
This commit is contained in:
25
configure.in
25
configure.in
@@ -219,6 +219,18 @@ AC_ARG_ENABLE(man,
|
||||
[enable_man=no]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(account-tools-setuid,
|
||||
[AC_HELP_STRING([--enable-account-tools-setuid],
|
||||
[Install the user and group management tools setuid and authenticate the callers. This requires --with-pam.])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_acct_tools_setuid="yes" ;;
|
||||
no) enable_acct_tools_setuid="no" ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid)
|
||||
;;
|
||||
esac],
|
||||
[enable_acct_tools_setuid="yes"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(audit,
|
||||
[AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])],
|
||||
[with_audit=$withval], [with_audit=maybe])
|
||||
@@ -417,6 +429,16 @@ else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
if test "$enable_acct_tools_setuid" = "yes"; then
|
||||
if test "$with_libpam" != "yes"; then
|
||||
AC_MSG_ERROR(PAM support is required for --enable-account-tools-setuid)
|
||||
fi
|
||||
AC_DEFINE(ACCT_TOOLS_SETUID,
|
||||
1,
|
||||
[Define if account management tools should be installed setuid and authenticate the callers])
|
||||
fi
|
||||
AM_CONDITIONAL(ACCT_TOOLS_SETUID, test "x$enable_acct_tools_setuid" = "xyes")
|
||||
|
||||
AC_SUBST(LIBSKEY)
|
||||
AC_SUBST(LIBMD)
|
||||
if test "$with_skey" = "yes"; then
|
||||
@@ -475,6 +497,9 @@ echo
|
||||
echo " auditing support: $with_audit"
|
||||
echo " CrackLib support: $with_libcrack"
|
||||
echo " PAM support: $with_libpam"
|
||||
if test "$with_libpam" = "yes"; then
|
||||
echo " suid account management tools: $enable_acct_tools_setuid"
|
||||
fi
|
||||
echo " SELinux support: $with_selinux"
|
||||
echo " shadow group support: $enable_shadowgrp"
|
||||
echo " S/Key support: $with_skey"
|
||||
|
Reference in New Issue
Block a user