mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
new SUDO_CHECK_SHADOW_GENERIC
This commit is contained in:
30
aclocal.m4
vendored
30
aclocal.m4
vendored
@@ -152,16 +152,26 @@ fi
|
|||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl check for shadow passwords
|
dnl check for shadow passwords
|
||||||
|
dnl NOTE: not verbose
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN(SUDO_CHECK_SHADOW_GENERIC, [AC_MSG_CHECKING(for shadow passwords)
|
AC_DEFUN(SUDO_CHECK_SHADOW_GENERIC, [
|
||||||
AC_TRY_RUN([#include <pwd.h>
|
if test -z "$SHADOW_TYPE" -a -d /tcb/files/auth; then
|
||||||
int main() {
|
AC_CHECK_FUNC(getprpwuid, SHADOW_TYPE="SPW_SECUREWARE")
|
||||||
struct passwd *pwd;
|
fi
|
||||||
pwd = getpwuid(getuid());
|
if test -z "$SHADOW_TYPE" -a -s /etc/shadow; then
|
||||||
return(!(pwd->pw_passwd == (char *) 0 || (pwd->pw_passwd[0] && pwd->pw_passwd [1] == '\0'))); }
|
AC_CHECK_FUNC(getspnam, SHADOW_TYPE="SPW_SVR4")
|
||||||
], AC_MSG_RESULT(yes)
|
fi
|
||||||
[$1], AC_MSG_RESULT(no)
|
if test -z "$SHADOW_TYPE" -a -s /etc/master.passwd; then
|
||||||
[$2])])
|
SHADOW_TYPE="SPW_BSD"
|
||||||
|
fi
|
||||||
|
if test -z "$SHADOW_TYPE"; then
|
||||||
|
SHADOW_TYPE="SPW_NONE"
|
||||||
|
$2
|
||||||
|
else
|
||||||
|
$1
|
||||||
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(SHADOW_TYPE, $SHADOW_TYPE)
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN(SUDO_CHECK_SHADOW_SUNOS4, [AC_MSG_CHECKING(for shadow passwords)
|
AC_DEFUN(SUDO_CHECK_SHADOW_SUNOS4, [AC_MSG_CHECKING(for shadow passwords)
|
||||||
if test -s /etc/security/passwd.adjunct; then
|
if test -s /etc/security/passwd.adjunct; then
|
||||||
@@ -204,7 +214,7 @@ fi
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN(SUDO_CHECK_SHADOW_SVR4, [AC_MSG_CHECKING(for shadow passwords)
|
AC_DEFUN(SUDO_CHECK_SHADOW_SVR4, [AC_MSG_CHECKING(for shadow passwords)
|
||||||
if test -s /etc/master; then
|
if test -s /etc/shadow; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
[$1]
|
[$1]
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user