diff --git a/ChangeLog b/ChangeLog index 6dea5456..f9a6bf15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-01-05 Nicolas François + + * libmisc/pwdcheck.c: Do not include . Include + and "pwauth.h" only when compiled without PAM support. + * src/chfn.c, src/chsh.c: Do not include + * lib/commonio.c: Do not include . Do not include + . Include "nscd.h" instead of . + +2008-01-05 Nicolas François + + * configure.in: Do not check if shadow.h exist, but make sure it + exists. + * libmisc/pwdcheck.c, src/chfn.c, src/chsh.c, lib/defines.h, + lib/shadowmem.c, lib/shadowio.c, lib/commonio.c: + HAVE_SHADOW_H is no more needed (shadow.h should always exist). + 2008-01-05 Nicolas François * lib/groupio.c: Remove prototype of putgrent(), add parameter's diff --git a/configure.in b/configure.in index 574ea67e..a298ce64 100644 --- a/configure.in +++ b/configure.in @@ -31,9 +31,12 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \ utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \ - utime.h ulimit.h sys/resource.h gshadow.h shadow.h lastlog.h \ + utime.h ulimit.h sys/resource.h gshadow.h lastlog.h \ locale.h rpc/key_prot.h netdb.h) +dnl shadow now uses the libc's shadow implementation +AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])]) + AC_CHECK_FUNCS(l64a fchmod fchown fsync getgroups gethostname getspnam \ gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \ memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \ diff --git a/lib/commonio.c b/lib/commonio.c index 672631fa..67953bdf 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -12,11 +12,7 @@ #include #include #include -#include -#include -#ifdef HAVE_SHADOW_H -#include -#endif +#include "nscd.h" #ifdef WITH_SELINUX #include static security_context_t old_context = NULL; diff --git a/lib/defines.h b/lib/defines.h index 6b17f5b1..b3e88e40 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -101,19 +101,11 @@ char *strchr (), *strrchr (), *strtok (); * Possible cases: * - /usr/include/shadow.h exists and includes the shadow group stuff. * - /usr/include/shadow.h exists, but we use our own gshadow.h. - * - /usr/include/shadow.h doesn't exist, use our own shadow.h and gshadow.h. */ -#if HAVE_SHADOW_H #include #if defined(SHADOWGRP) && !defined(GSHADOW) #include "gshadow_.h" #endif -#else /* not HAVE_SHADOW_H */ -#include "shadow_.h" -#ifdef SHADOWGRP -#include "gshadow_.h" -#endif -#endif /* not HAVE_SHADOW_H */ #include diff --git a/lib/shadowio.c b/lib/shadowio.c index e83e8ce1..61b76ac1 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c @@ -5,9 +5,7 @@ #include "prototypes.h" #include "defines.h" -#ifdef HAVE_SHADOW_H -# include -#endif +#include #include #include "commonio.h" #include "shadowio.h" diff --git a/lib/shadowmem.c b/lib/shadowmem.c index 9a23f3da..826728db 100644 --- a/lib/shadowmem.c +++ b/lib/shadowmem.c @@ -5,9 +5,7 @@ #include "prototypes.h" #include "defines.h" -#ifdef HAVE_SHADOW_H -# include -#endif +#include #include #include "shadowio.h" diff --git a/libmisc/pwdcheck.c b/libmisc/pwdcheck.c index 7cef447d..1750ebf3 100644 --- a/libmisc/pwdcheck.c +++ b/libmisc/pwdcheck.c @@ -2,16 +2,14 @@ #ident "$Id$" -#include #include #include "prototypes.h" #include "defines.h" -#include "pwauth.h" -#ifdef HAVE_SHADOW_H -#include -#endif #ifdef USE_PAM #include "pam_defs.h" +#else +#include +#include "pwauth.h" #endif #define WRONGPWD2 "incorrect password for `%s'" void passwd_check (const char *user, const char *passwd, const char *progname) diff --git a/src/chfn.c b/src/chfn.c index 3b130552..04b10d11 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -36,9 +36,6 @@ #include #include #include -#ifdef HAVE_SHADOW_H -#include -#endif #ifdef WITH_SELINUX #include #include diff --git a/src/chsh.c b/src/chsh.c index b6e63e00..fed6ffe2 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -41,9 +41,6 @@ #include #include #endif -#ifdef HAVE_SHADOW_H -#include -#endif #include "defines.h" #include "exitcodes.h" #include "getdef.h"