[svn-upgrade] Integrating new upstream version, shadow (4.0.10)

This commit is contained in:
nekral-guest
2007-10-07 11:46:25 +00:00
parent 7c47e0fde3
commit 8c50e06102
243 changed files with 17723 additions and 20142 deletions

View File

@@ -41,11 +41,7 @@ host_triplet = @host@
subdir = lib
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

View File

@@ -1,4 +1,4 @@
/* $Id: defines.h,v 1.25 2005/03/31 05:14:49 kloczek Exp $ */
/* $Id: defines.h,v 1.26 2005/05/25 18:20:22 kloczek Exp $ */
/* some useful defines */
#ifndef _DEFINES_H_
@@ -95,7 +95,6 @@ char *strchr (), *strrchr (), *strtok ();
# define DIRECT direct
#endif
#ifdef SHADOWPWD
/*
* Possible cases:
* - /usr/include/shadow.h exists and includes the shadow group stuff.
@@ -113,7 +112,6 @@ char *strchr (), *strrchr (), *strtok ();
#include "gshadow_.h"
#endif
#endif /* not HAVE_SHADOW_H */
#endif /* SHADOWPWD */
#include <limits.h>
@@ -291,11 +289,9 @@ char *strchr (), *strrchr (), *strtok ();
#define GROUP_FILE "/etc/group"
#endif
#ifdef SHADOWPWD
#ifndef SHADOW_FILE
#define SHADOW_FILE "/etc/shadow"
#endif
#endif
#ifdef SHADOWGRP
#ifndef SGROUP_FILE

View File

@@ -30,11 +30,10 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: encrypt.c,v 1.12 2005/05/19 12:05:03 kloczek Exp $")
RCSID ("$Id: encrypt.c,v 1.13 2005/05/25 19:31:50 kloczek Exp $")
#include <unistd.h>
#include "prototypes.h"
#include "defines.h"
char *pw_encrypt (const char *clear, const char *salt)
{
static char cipher[128];

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: getdef.c,v 1.29 2005/05/09 10:45:26 kloczek Exp $")
RCSID ("$Id: getdef.c,v 1.30 2005/05/25 19:31:50 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
@@ -292,7 +292,7 @@ static struct itemdef *def_find (const char *name)
for (ptr = def_table; ptr->name; ptr++) {
if (!(n = strcmp (ptr->name, name)))
return ptr;
}
}
/*
* Item was never found.

View File

@@ -2,7 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: groupio.c,v 1.11 2005/03/31 05:14:49 kloczek Exp $")
RCSID ("$Id: groupio.c,v 1.12 2005/06/20 09:56:37 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include "commonio.h"
@@ -188,7 +188,7 @@ static int gr_cmp (const void *p1, const void *p2)
return 0;
}
/* Sort entries by gid */
/* Sort entries by GID */
int gr_sort ()
{
return commonio_sort (&group_db, gr_cmp);

View File

@@ -33,11 +33,10 @@
#if defined(SHADOWGRP) && !defined(HAVE_SHADOWGRP) /*{ */
#include "rcsid.h"
RCSID ("$Id: gshadow.c,v 1.9 2005/04/06 04:26:05 kloczek Exp $")
RCSID ("$Id: gshadow.c,v 1.10 2005/05/25 19:31:50 kloczek Exp $")
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
static FILE *shadow;
static char sgrbuf[BUFSIZ * 4];
static char **members = NULL;

View File

@@ -32,13 +32,11 @@
#ifndef HAVE_LCKPWDF
#include "rcsid.h"
RCSID ("$Id: lockpw.c,v 1.5 2005/03/31 05:14:49 kloczek Exp $")
RCSID ("$Id: lockpw.c,v 1.6 2005/05/25 18:20:22 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include "pwio.h"
#ifdef SHADOWPWD
#include "shadowio.h"
#endif
/*
* lckpwdf - lock the password files
*/

View File

@@ -6,7 +6,7 @@
* Juha Virtanen, <jiivee@hut.fi>; November 1995
*/
/*
* $Id: prototypes.h,v 1.18 2005/04/06 03:01:07 kloczek Exp $
* $Id: prototypes.h,v 1.19 2005/05/25 18:20:22 kloczek Exp $
*
* Added a macro to work around ancient (non-ANSI) compilers, just in case
* someone ever tries to compile this with SunOS cc... --marekm
@@ -31,15 +31,9 @@ extern int add_groups (const char *);
extern void add_cons_grps (void);
/* age.c */
#ifdef SHADOWPWD
extern void agecheck (const struct passwd *, const struct spwd *);
extern int expire (const struct passwd *, const struct spwd *);
extern int isexpired (const struct passwd *, const struct spwd *);
#else
extern void agecheck (const struct passwd *);
extern int expire (const struct passwd *);
extern int isexpired (const struct passwd *);
#endif
/* basename() renamed to Basename() to avoid libc name space confusion */
/* basename.c */
@@ -140,9 +134,7 @@ extern int do_pam_passwd (const char *, int, int);
extern int isttytime (const char *, const char *, time_t);
/* pwd2spwd.c */
#ifdef SHADOWPWD
extern struct spwd *pwd_to_spwd (const struct passwd *);
#endif
/* pwdcheck.c */
extern void passwd_check (const char *, const char *, const char *);
@@ -179,16 +171,9 @@ extern void setup_env (struct passwd *);
/* shell.c */
extern void shell (const char *, const char *);
#ifdef SHADOWPWD
/* spdbm.c */
extern int sp_dbm_remove (const char *);
extern int sp_dbm_update (const struct spwd *);
extern int sp_dbm_present (void);
/* sppack.c */
extern int spw_pack (const struct spwd *, char *);
extern int spw_unpack (char *, int, struct spwd *);
#endif
/* strtoday.c */
extern long strtoday (const char *);

View File

@@ -26,12 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pwauth.h,v 1.5 2005/03/31 06:24:27 kloczek Exp $
* $Id: pwauth.h,v 1.6 2005/05/25 19:31:50 kloczek Exp $
*/
#ifndef USE_PAM
int pw_auth (const char *cipher, const char *user, int flag, const char *input);
#endif /* !USE_PAM */
#endif /* !USE_PAM */
/*
* Local access

View File

@@ -2,7 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: pwio.c,v 1.14 2005/03/31 05:14:49 kloczek Exp $")
RCSID ("$Id: pwio.c,v 1.15 2005/06/20 10:01:57 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <pwd.h>
@@ -178,7 +178,7 @@ static int pw_cmp (const void *p1, const void *p2)
return 0;
}
/* Sort entries by uid */
/* Sort entries by UID */
int pw_sort ()
{
return commonio_sort (&passwd_db, pw_cmp);

View File

@@ -30,15 +30,14 @@
#include <config.h>
/* Newer versions of Linux libc already have shadow support. */
#if defined(SHADOWPWD) && !defined(HAVE_GETSPNAM) /*{ */
#ifndef HAVE_GETSPNAM
#include "rcsid.h"
RCSID ("$Id: shadow.c,v 1.9 2005/04/06 04:26:05 kloczek Exp $")
RCSID ("$Id: shadow.c,v 1.11 2005/05/25 19:31:50 kloczek Exp $")
#include <sys/types.h>
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
#ifdef USE_NIS
static int nis_used;
static int nis_ignore;
@@ -498,4 +497,4 @@ struct spwd *getspnam (const char *name)
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /*} */
#endif

View File

@@ -1,10 +1,8 @@
#include <config.h>
#ifdef SHADOWPWD
#include "rcsid.h"
RCSID ("$Id: shadowio.c,v 1.14 2005/03/31 05:14:49 kloczek Exp $")
RCSID ("$Id: shadowio.c,v 1.15 2005/05/25 18:20:22 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#ifdef HAVE_SHADOW_H
@@ -157,4 +155,3 @@ int spw_sort ()
return commonio_sort_wrt (&shadow_db, __pw_get_db ());
}
#endif

View File

@@ -28,10 +28,9 @@
*/
#include <config.h>
#ifdef SHADOWPWD /*{ */
#include "rcsid.h"
RCSID ("$Id: sppack.c,v 1.4 2005/03/31 05:14:49 kloczek Exp $")
RCSID ("$Id: sppack.c,v 1.5 2005/05/25 18:20:22 kloczek Exp $")
#include <stdio.h>
#include <sys/types.h>
#include "defines.h"
@@ -106,4 +105,3 @@ int spw_unpack (char *buf, int len, struct spwd *spwd)
return 0;
}
#endif /*} */