* 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>.
* 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).
This commit is contained in:
nekral-guest 2008-01-05 16:33:43 +00:00
parent cea5c823a1
commit db0dddc6e9
9 changed files with 26 additions and 31 deletions

View File

@ -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> 2008-01-05 Nicolas François <nicolas.francois@centraliens.net>
* lib/groupio.c: Remove prototype of putgrent(), add parameter's * lib/groupio.c: Remove prototype of putgrent(), add parameter's

View 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 \ 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 \ 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) 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 \ AC_CHECK_FUNCS(l64a fchmod fchown fsync getgroups gethostname getspnam \
gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \ gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \
memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \ memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \

View File

@ -12,11 +12,7 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include <pwd.h> #include "nscd.h"
#include <nscd.h>
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
#include <selinux/selinux.h> #include <selinux/selinux.h>
static security_context_t old_context = NULL; static security_context_t old_context = NULL;

View File

@ -101,19 +101,11 @@ char *strchr (), *strrchr (), *strtok ();
* Possible cases: * Possible cases:
* - /usr/include/shadow.h exists and includes the shadow group stuff. * - /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 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> #include <shadow.h>
#if defined(SHADOWGRP) && !defined(GSHADOW) #if defined(SHADOWGRP) && !defined(GSHADOW)
#include "gshadow_.h" #include "gshadow_.h"
#endif #endif
#else /* not HAVE_SHADOW_H */
#include "shadow_.h"
#ifdef SHADOWGRP
#include "gshadow_.h"
#endif
#endif /* not HAVE_SHADOW_H */
#include <limits.h> #include <limits.h>

View File

@ -5,9 +5,7 @@
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#ifdef HAVE_SHADOW_H #include <shadow.h>
# include <shadow.h>
#endif
#include <stdio.h> #include <stdio.h>
#include "commonio.h" #include "commonio.h"
#include "shadowio.h" #include "shadowio.h"

View File

@ -5,9 +5,7 @@
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#ifdef HAVE_SHADOW_H #include <shadow.h>
# include <shadow.h>
#endif
#include <stdio.h> #include <stdio.h>
#include "shadowio.h" #include "shadowio.h"

View File

@ -2,16 +2,14 @@
#ident "$Id$" #ident "$Id$"
#include <pwd.h>
#include <stdio.h> #include <stdio.h>
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#include "pwauth.h"
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif
#ifdef USE_PAM #ifdef USE_PAM
#include "pam_defs.h" #include "pam_defs.h"
#else
#include <shadow.h>
#include "pwauth.h"
#endif #endif
#define WRONGPWD2 "incorrect password for `%s'" #define WRONGPWD2 "incorrect password for `%s'"
void passwd_check (const char *user, const char *passwd, const char *progname) void passwd_check (const char *user, const char *passwd, const char *progname)

View File

@ -36,9 +36,6 @@
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
#include <selinux/selinux.h> #include <selinux/selinux.h>
#include <selinux/av_permissions.h> #include <selinux/av_permissions.h>

View File

@ -41,9 +41,6 @@
#include <selinux/selinux.h> #include <selinux/selinux.h>
#include <selinux/av_permissions.h> #include <selinux/av_permissions.h>
#endif #endif
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif
#include "defines.h" #include "defines.h"
#include "exitcodes.h" #include "exitcodes.h"
#include "getdef.h" #include "getdef.h"