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

This commit is contained in:
nekral-guest
2007-10-07 11:45:58 +00:00
parent 164b557066
commit 0ee095abd8
148 changed files with 10657 additions and 6402 deletions

View File

@@ -6,8 +6,7 @@ DEFS =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX) \
$(top_builddir)/libmisc/libmisc.a
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX)
libshadow_la_SOURCES = \
commonio.c \
@@ -23,7 +22,6 @@ libshadow_la_SOURCES = \
groupio.h \
gshadow.c \
lockpw.c \
md5.h \
nscd.c \
nscd.h \
pam_defs.h \
@@ -43,24 +41,15 @@ libshadow_la_SOURCES = \
shadow.c \
shadowio.c \
shadowio.h \
snprintf.h \
utent.c
EXTRA_libshadow_la_SOURCESS = grent.c pwent.c mkdir.c rename.c rmdir.c \
strdup.c strcasecmp.c strerror.c strstr.c putgrent.c \
putpwent.c putspent.c sgetgrent.c sgetpwent.c sgetspent.c \
snprintf.c md5.c md5crypt.c
# These files are unneeded for some reason, listed in
# order of appearance:
#
# sources which are not really needed (are they in libc???)
# sources for dbm support (not yet used)
# sources for LIBOBJS (which are normally in libc)
# misc header sources
EXTRA_DIST = \
.indent.pro \
grdbm.c gsdbm.c pwdbm.c spdbm.c \
grpack.c gspack.c pwpack.c sppack.c \
gshadow_.h shadow_.h lastlog_.h snprintf.h
gshadow_.h

View File

@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,8 +59,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libshadow_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(top_builddir)/libmisc/libmisc.a
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libshadow_la_OBJECTS = commonio.lo encrypt.lo fputsx.lo getdef.lo \
getpass.lo groupio.lo gshadow.lo lockpw.lo nscd.lo port.lo \
pwauth.lo pwio.lo rad64.lo sgetgrent.lo sgetpwent.lo \
@@ -204,9 +203,7 @@ target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.0 foreign
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX) \
$(top_builddir)/libmisc/libmisc.a
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX)
libshadow_la_SOURCES = \
commonio.c \
commonio.h \
@@ -221,7 +218,6 @@ libshadow_la_SOURCES = \
groupio.h \
gshadow.c \
lockpw.c \
md5.h \
nscd.c \
nscd.h \
pam_defs.h \
@@ -241,27 +237,18 @@ libshadow_la_SOURCES = \
shadow.c \
shadowio.c \
shadowio.h \
snprintf.h \
utent.c
EXTRA_libshadow_la_SOURCESS = grent.c pwent.c mkdir.c rename.c rmdir.c \
strdup.c strcasecmp.c strerror.c strstr.c putgrent.c \
putpwent.c putspent.c sgetgrent.c sgetpwent.c sgetspent.c \
snprintf.c md5.c md5crypt.c
# These files are unneeded for some reason, listed in
# order of appearance:
#
# sources which are not really needed (are they in libc???)
# sources for dbm support (not yet used)
# sources for LIBOBJS (which are normally in libc)
# misc header sources
EXTRA_DIST = \
.indent.pro \
grdbm.c gsdbm.c pwdbm.c spdbm.c \
grpack.c gspack.c pwpack.c sppack.c \
gshadow_.h shadow_.h lastlog_.h snprintf.h
gshadow_.h
all: all-am

View File

@@ -1,4 +1,4 @@
/* $Id: defines.h,v 1.22 2004/10/23 14:09:31 kloczek Exp $ */
/* $Id: defines.h,v 1.24 2005/01/17 19:03:34 kloczek Exp $ */
/* some useful defines */
#ifndef _DEFINES_H_

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getdef.c,v 1.19 2004/06/03 00:27:19 kloczek Exp $")
RCSID("$Id: getdef.c,v 1.20 2005/01/20 12:43:05 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
@@ -130,8 +130,6 @@ static struct itemdef def_table[] = {
static char def_fname[] = LOGINDEFS; /* login config defs file */
static int def_loaded = 0; /* are defs already loaded? */
extern long strtol();
/* local function prototypes */
static struct itemdef *def_find(const char *);
static void def_load(void);

View File

@@ -1,65 +0,0 @@
/*
* Copyright 1989 - 1994, Julianne Frances Haugh
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Julianne F. Haugh nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* lastlog.h - structure of lastlog file
*
* $Id: lastlog_.h,v 1.3 2003/12/17 12:52:25 kloczek Exp $
*
* This file defines a lastlog file structure which should be sufficient
* to hold the information required by login. It should only be used if
* there is no real lastlog.h file.
*/
#ifndef __LASTLOG_H
#define __LASTLOG_H
#if defined(__GLIBC__)
#error "glibc shall have fixed <lastlog.h> already, which is <utmp.h>"
#endif
#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
/* Recent dietlibc will support those conditionnals */
#define LASTLOG_NEEDS_32BIT_LL_TIME 1
#elif defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc_v9__)
#error "I don't know what to do here, what kind of C library are you using?"
#endif
struct lastlog {
#if LASTLOG_NEEDS_32BIT_LL_TIME
unsigned int ll_time;
#else
time_t ll_time;
#endif
char ll_line[12];
char ll_host[16];
};
#define HAVE_LL_HOST
#endif /* _LASTLOG_H */

View File

@@ -1,27 +0,0 @@
#ifndef MD5_H
#define MD5_H
#ifdef __alpha
typedef unsigned int uint32;
#else
typedef unsigned long uint32;
#endif
struct MD5Context {
uint32 buf[4];
uint32 bits[2];
unsigned char in[64];
};
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, unsigned char const *buf,
unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(uint32 buf[4], uint32 const in[16]);
/*
* This is needed to make RSAREF happy on some MS-DOS compilers.
*/
typedef struct MD5Context MD5_CTX;
#endif /* !MD5_H */

View File

@@ -1,89 +0,0 @@
/*
* Copyright 1988 - 1994, Julianne Frances Haugh
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Julianne F. Haugh nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _H_SHADOW
#define _H_SHADOW
/*
* This information is not derived from AT&T licensed sources. Posted
* to the USENET 11/88, and updated 11/90 with information from SVR4.
*
* $Id: shadow_.h,v 1.2 1997/05/01 23:14:48 marekm Exp $
*/
#ifdef ITI_AGING
typedef time_t sptime;
#else
typedef long sptime;
#endif
/*
* Shadow password security file structure.
*/
struct spwd {
char *sp_namp; /* login name */
char *sp_pwdp; /* encrypted password */
sptime sp_lstchg; /* date of last change */
sptime sp_min; /* minimum number of days between changes */
sptime sp_max; /* maximum number of days between changes */
sptime sp_warn; /* number of days of warning before password
expires */
sptime sp_inact; /* number of days after password expires
until the account becomes unusable. */
sptime sp_expire; /* days since 1/1/70 until account expires */
unsigned long sp_flag; /* reserved for future use */
};
/*
* Shadow password security file functions.
*/
#include <stdio.h> /* for FILE */
#if defined(__STDC__)
struct spwd *getspent (void);
struct spwd *getspnam (const char *);
struct spwd *sgetspent (const char *);
struct spwd *fgetspent (FILE *);
void setspent (void);
void endspent (void);
int putspent (const struct spwd *, FILE *);
#else
struct spwd *getspent ();
struct spwd *getspnam ();
struct spwd *sgetspent ();
struct spwd *fgetspent ();
void setspent ();
void endspent ();
int putspent ();
#endif
#define SHADOW "/etc/shadow"
#endif

View File

@@ -1,51 +0,0 @@
/* $XFree86: xc/lib/misc/snprintf.h,v 3.1 1996/08/26 14:42:33 dawes Exp $ */
#ifndef SNPRINTF_H
#define SNPRINTF_H
#ifdef HAS_SNPRINTF
#ifdef LIBXT
#define _XtSnprintf snprintf
#define _XtVsnprintf vsnprintf
#endif
#ifdef LIBX11
#define _XSnprintf snprintf
#define _XVsnprintf vsnprintf
#endif
#else /* !HAS_SNPRINTF */
#ifdef LIBXT
#define snprintf _XtSnprintf
#define vsnprintf _XtVsnprintf
#endif
#ifdef LIBX11
#define snprintf _XSnprintf
#define vsnprintf _XVsnprintf
#endif
#if 1 /* the system might have no X11 headers. -MM */
#include <X11/Xos.h>
#include <X11/Xlib.h>
#else /* but we still need this... */
#include <sys/types.h>
/* adjust the following defines if necessary (pre-ANSI) */
#define NeedFunctionPrototypes 1
#define NeedVarargsPrototypes 1
#endif
#if NeedVarargsPrototypes
#define HAVE_STDARG_H
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
extern int snprintf (char *str, size_t count, const char *fmt, ...);
extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#else
extern int snprintf ();
extern int vsnprintf ();
#endif
#endif /* HAS_SNPRINTF */
#endif /* SNPRINTF_H */