]> granicus.if.org Git - shadow/commitdiff
* libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h>
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 5 Jan 2008 16:33:43 +0000 (16:33 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 5 Jan 2008 16:33:43 +0000 (16:33 +0000)
  and "pwauth.h" only when compiled without PAM support.
* src/chfn.c, src/chsh.c: Do not include <shadow.h>
* lib/commonio.c: Do not include <shadow.h>. Do not include
  <pwd.h>. Include "nscd.h" instead of <nscd.h>.
* 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).

ChangeLog
configure.in
lib/commonio.c
lib/defines.h
lib/shadowio.c
lib/shadowmem.c
libmisc/pwdcheck.c
src/chfn.c
src/chsh.c

index 6dea5456ecfabdaf538e49f581adae15f9146d69..f9a6bf15f61c71dd5ce57670bc6b91424fbe6496 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2008-01-05  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h>
+       and "pwauth.h" only when compiled without PAM support.
+       * src/chfn.c, src/chsh.c: Do not include <shadow.h>
+       * lib/commonio.c: Do not include <shadow.h>. Do not include
+       <pwd.h>. Include "nscd.h" instead of <nscd.h>.
+
+2008-01-05  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * 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  <nicolas.francois@centraliens.net>
 
        * lib/groupio.c: Remove prototype of putgrent(), add parameter's
index 574ea67ec328b26b677c0c56b7cf9a0d3f3f29ad..a298ce643b5b2719fbb31326e89befecd3896f45 100644 (file)
@@ -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 \
index 672631fa18712977d930603c0e7eb34fc0d2ae53..67953bdfbc41a159cf998b785cc43dd6b9b4b102 100644 (file)
 #include <errno.h>
 #include <stdio.h>
 #include <signal.h>
-#include <pwd.h>
-#include <nscd.h>
-#ifdef HAVE_SHADOW_H
-#include <shadow.h>
-#endif
+#include "nscd.h"
 #ifdef WITH_SELINUX
 #include <selinux/selinux.h>
 static security_context_t old_context = NULL;
index 6b17f5b151c4e945eedf5fc280868e297adcb569..b3e88e402b72e4e62b10c86ae660d09c9fda3476 100644 (file)
@@ -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 <shadow.h>
 #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 <limits.h>
 
index e83e8ce1b75cd9ada1f2ff70890bbebd0c30f4a2..61b76ac1dbd1723a217395ce49e12d71d13c2409 100644 (file)
@@ -5,9 +5,7 @@
 
 #include "prototypes.h"
 #include "defines.h"
-#ifdef HAVE_SHADOW_H
-# include <shadow.h>
-#endif
+#include <shadow.h>
 #include <stdio.h>
 #include "commonio.h"
 #include "shadowio.h"
index 9a23f3da25005af65606b6a1280e5761a07354be..826728dbe366c21372a8d2520d0686029a9db10e 100644 (file)
@@ -5,9 +5,7 @@
 
 #include "prototypes.h"
 #include "defines.h"
-#ifdef HAVE_SHADOW_H
-# include <shadow.h>
-#endif
+#include <shadow.h>
 #include <stdio.h>
 #include "shadowio.h"
 
index 7cef447dcb1cf766b62a5612dc72be678c6ef979..1750ebf38ad6c0b2daa37b3cc83a32598ec2e0f3 100644 (file)
@@ -2,16 +2,14 @@
 
 #ident "$Id$"
 
-#include <pwd.h>
 #include <stdio.h>
 #include "prototypes.h"
 #include "defines.h"
-#include "pwauth.h"
-#ifdef HAVE_SHADOW_H
-#include <shadow.h>
-#endif
 #ifdef USE_PAM
 #include "pam_defs.h"
+#else
+#include <shadow.h>
+#include "pwauth.h"
 #endif
 #define WRONGPWD2      "incorrect password for `%s'"
 void passwd_check (const char *user, const char *passwd, const char *progname)
index 3b13055294d699ffb62831fa9118b65cf72fd878..04b10d115e7c58f8b523b23c6f17ff1341df1d86 100644 (file)
@@ -36,9 +36,6 @@
 #include <signal.h>
 #include <stdio.h>
 #include <sys/types.h>
-#ifdef HAVE_SHADOW_H
-#include <shadow.h>
-#endif
 #ifdef WITH_SELINUX
 #include <selinux/selinux.h>
 #include <selinux/av_permissions.h>
index b6e63e00bcdb6790db4a8ba02f365a63956102a6..fed6ffe27b8e76fd595d25e75db98de770fc910d 100644 (file)
@@ -41,9 +41,6 @@
 #include <selinux/selinux.h>
 #include <selinux/av_permissions.h>
 #endif
-#ifdef HAVE_SHADOW_H
-#include <shadow.h>
-#endif
 #include "defines.h"
 #include "exitcodes.h"
 #include "getdef.h"