From: Todd C. Miller Date: Mon, 17 Jul 1995 04:19:42 +0000 (+0000) Subject: added SUDO_CHECK_SHADOW X-Git-Tag: SUDO_1_4_0~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17a7c74d56341fb44de764398d7332ad13f6bb54;p=sudo added SUDO_CHECK_SHADOW --- diff --git a/aclocal.m4 b/aclocal.m4 index 805fb89c1..3afe163c9 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,5 @@ dnl Local m4 macors for autoconf (used by sudo) +snl XXX - should cache values in all cases!!! dnl dnl checks for programs @@ -110,6 +111,20 @@ else fi ])dnl +dnl +dnl check for shadow passwords +dnl +AC_DEFUN(SUDO_CHECK_SHADOW, [AC_MSG_CHECKING(for shadow passwords) +AC_TRY_RUN([#include +int main() { +struct passwd *pwd; +pwd = getpwuid(getuid()); +return(!(pwd->pw_passwd == (char *) 0 || (pwd->pw_passwd[0] && pwd->pw_passwd [1] == '\0'))); } +], AC_MSG_RESULT(yes) +[$1], AC_MSG_RESULT(no) +[$2])]) + +dnl dnl dnl check for fullly working void dnl @@ -118,6 +133,7 @@ AC_TRY_COMPILE(, [void *foo; foo = (void *)0; foo += 0;], AC_DEFINE(VOID, void) AC_MSG_RESULT(yes), AC_DEFINE(VOID, char) AC_MSG_RESULT(no))]) + dnl dnl SUDO_CHECK_TYPE(TYPE, DEFAULT) dnl XXX - should require the check for unistd.h...