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

This commit is contained in:
nekral-guest
2007-10-07 11:47:01 +00:00
parent e89f3546f2
commit 8451bed8b0
279 changed files with 12461 additions and 8086 deletions

View File

@@ -8,6 +8,7 @@ noinst_LIBRARIES = libmisc.a
libmisc_a_SOURCES = \
addgrps.c \
age.c \
audit_help.c \
basename.c \
chkname.c \
chkname.h \
@@ -20,8 +21,8 @@ libmisc_a_SOURCES = \
failure.c \
failure.h \
fields.c \
getdate.y \
getdate.h \
getdate.y \
hushed.c \
isexpired.c \
limits.c \

View File

@@ -39,7 +39,8 @@ host_triplet = @host@
subdir = libmisc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in getdate.c
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -50,19 +51,20 @@ ARFLAGS = cru
libmisc_a_AR = $(AR) $(ARFLAGS)
libmisc_a_LIBADD =
am_libmisc_a_OBJECTS = addgrps.$(OBJEXT) age.$(OBJEXT) \
basename.$(OBJEXT) chkname.$(OBJEXT) chowndir.$(OBJEXT) \
chowntty.$(OBJEXT) console.$(OBJEXT) copydir.$(OBJEXT) \
entry.$(OBJEXT) env.$(OBJEXT) failure.$(OBJEXT) \
fields.$(OBJEXT) getdate.$(OBJEXT) hushed.$(OBJEXT) \
isexpired.$(OBJEXT) limits.$(OBJEXT) list.$(OBJEXT) \
log.$(OBJEXT) loginprompt.$(OBJEXT) mail.$(OBJEXT) \
motd.$(OBJEXT) myname.$(OBJEXT) obscure.$(OBJEXT) \
pam_pass.$(OBJEXT) pwd2spwd.$(OBJEXT) pwdcheck.$(OBJEXT) \
pwd_init.$(OBJEXT) rlogin.$(OBJEXT) salt.$(OBJEXT) \
setugid.$(OBJEXT) setupenv.$(OBJEXT) shell.$(OBJEXT) \
strtoday.$(OBJEXT) sub.$(OBJEXT) sulog.$(OBJEXT) \
ttytype.$(OBJEXT) tz.$(OBJEXT) ulimit.$(OBJEXT) utmp.$(OBJEXT) \
valid.$(OBJEXT) xmalloc.$(OBJEXT)
audit_help.$(OBJEXT) basename.$(OBJEXT) chkname.$(OBJEXT) \
chowndir.$(OBJEXT) chowntty.$(OBJEXT) console.$(OBJEXT) \
copydir.$(OBJEXT) entry.$(OBJEXT) env.$(OBJEXT) \
failure.$(OBJEXT) fields.$(OBJEXT) getdate.$(OBJEXT) \
hushed.$(OBJEXT) isexpired.$(OBJEXT) limits.$(OBJEXT) \
list.$(OBJEXT) log.$(OBJEXT) loginprompt.$(OBJEXT) \
mail.$(OBJEXT) motd.$(OBJEXT) myname.$(OBJEXT) \
obscure.$(OBJEXT) pam_pass.$(OBJEXT) pwd2spwd.$(OBJEXT) \
pwdcheck.$(OBJEXT) pwd_init.$(OBJEXT) rlogin.$(OBJEXT) \
salt.$(OBJEXT) setugid.$(OBJEXT) setupenv.$(OBJEXT) \
shell.$(OBJEXT) strtoday.$(OBJEXT) sub.$(OBJEXT) \
sulog.$(OBJEXT) ttytype.$(OBJEXT) tz.$(OBJEXT) \
ulimit.$(OBJEXT) utmp.$(OBJEXT) valid.$(OBJEXT) \
xmalloc.$(OBJEXT)
libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -109,6 +111,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_REGENERATE_MAN_FALSE = @ENABLE_REGENERATE_MAN_FALSE@
ENABLE_REGENERATE_MAN_TRUE = @ENABLE_REGENERATE_MAN_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
@@ -120,6 +124,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
@@ -159,6 +164,9 @@ U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
@@ -209,6 +217,7 @@ noinst_LIBRARIES = libmisc.a
libmisc_a_SOURCES = \
addgrps.c \
age.c \
audit_help.c \
basename.c \
chkname.c \
chkname.h \
@@ -221,8 +230,8 @@ libmisc_a_SOURCES = \
failure.c \
failure.h \
fields.c \
getdate.y \
getdate.h \
getdate.y \
hushed.c \
isexpired.c \
limits.c \
@@ -264,9 +273,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libmisc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmisc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libmisc/Makefile
$(AUTOMAKE) --foreign libmisc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -300,6 +309,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addgrps.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/age.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_help.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chowndir.Po@am__quote@

View File

@@ -9,8 +9,8 @@
#include <grp.h>
#include <errno.h>
#include "rcsid.h"
RCSID ("$Id: addgrps.c,v 1.7 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: addgrps.c,v 1.8 2005/08/31 17:24:57 kloczek Exp $"
#define SEP ",:"
/*
* Add groups with names from LIST (separated by commas or colons)

View File

@@ -38,8 +38,8 @@
#include <pwd.h>
#include <grp.h>
#include "rcsid.h"
RCSID ("$Id: age.c,v 1.11 2005/05/25 18:20:22 kloczek Exp $")
#ident "$Id: age.c,v 1.12 2005/08/31 17:24:57 kloczek Exp $"
#ifndef PASSWD_PROGRAM
#define PASSWD_PROGRAM "/bin/passwd"
#endif

96
libmisc/audit_help.c Normal file
View File

@@ -0,0 +1,96 @@
/*
* Audit helper functions used throughout shadow
*
* Copyright (C) 2005, Red Hat, Inc.
*
* 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.
*/
#include <config.h>
#ifdef WITH_AUDIT
#include <stdlib.h>
#include <syslog.h>
#include <stdarg.h>
#include <libaudit.h>
#include <errno.h>
#include <stdio.h>
int audit_fd;
void audit_help_open (void)
{
audit_fd = audit_open ();
if (audit_fd < 0) {
/* You get these only when the kernel doesn't have
* audit compiled in. */
if (errno == EINVAL || errno == EPROTONOSUPPORT ||
errno == EAFNOSUPPORT)
return;
fprintf (stderr, "Cannot open audit interface - aborting.\n");
exit (1);
}
}
/*
* This function will log a message to the audit system using a predefined
* message format. Parameter usage is as follows:
*
* type - type of message: AUDIT_USER_CHAUTHTOK for changing any account
* attributes.
* pgname - program's name
* op - operation. "adding user", "changing finger info", "deleting group"
* name - user's account or group name. If not available use NULL.
* id - uid or gid that the operation is being performed on. This is used
* only when user is NULL.
* result - 1 is "success" and 0 is "failed"
*/
void audit_logger (int type, const char *pgname, const char *op,
const char *name, unsigned int id, int result)
{
if (audit_fd < 0)
return;
else {
char buf[PATH_MAX];
const char *success;
if (result)
success = "success";
else
success = "failed";
if (name)
snprintf (buf, sizeof (buf), "%s: op=%s acct=%s res=%s",
pgname, op, name, success);
else
snprintf (buf, sizeof (buf), "%s: op=%s id=%u res=%s",
pgname, op, id, success);
audit_send_user_message (audit_fd, type, buf);
}
}
#endif /* WITH_AUDIT */

View File

@@ -7,8 +7,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: basename.c,v 1.3 2003/04/22 10:59:21 kloczek Exp $")
#ident "$Id: basename.c,v 1.4 2005/08/31 17:24:57 kloczek Exp $"
#include "defines.h"
#include "prototypes.h"
char *Basename (char *str)

View File

@@ -5,8 +5,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: chkname.c,v 1.8 2003/05/12 05:29:14 kloczek Exp $")
#ident "$Id: chkname.c,v 1.11 2005/08/31 17:24:57 kloczek Exp $"
#include <ctype.h>
#include "defines.h"
#include "chkname.h"
@@ -18,7 +18,7 @@ RCSID ("$Id: chkname.c,v 1.8 2003/05/12 05:29:14 kloczek Exp $")
static int good_name (const char *name)
{
/*
* User/group names must match [a-z_][a-z0-9_-]*
* User/group names must match [a-z_][a-z0-9_-]*[$]
*/
if (!*name || !((*name >= 'a' && *name <= 'z') || *name == '_'))
return 0;

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: chowndir.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: chowndir.c,v 1.9 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include <sys/stat.h>
#include "prototypes.h"

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: chowntty.c,v 1.12 2005/08/09 18:03:15 kloczek Exp $")
#ident "$Id: chowntty.c,v 1.13 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

View File

@@ -32,8 +32,8 @@
#include <stdio.h>
#include "getdef.h"
#include "rcsid.h"
RCSID ("$Id: console.c,v 1.6 2003/04/22 10:59:21 kloczek Exp $")
#ident "$Id: console.c,v 1.7 2005/08/31 17:24:57 kloczek Exp $"
/*
* This is now rather generic function which decides if "tty" is listed

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: copydir.c,v 1.12 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: copydir.c,v 1.13 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: entry.c,v 1.8 2005/06/20 09:18:50 kloczek Exp $")
#ident "$Id: entry.c,v 1.9 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include <stdio.h>
#include "prototypes.h"

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: env.c,v 1.11 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: env.c,v 1.12 2005/08/31 17:24:57 kloczek Exp $"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: failure.c,v 1.15 2005/06/20 10:02:02 kloczek Exp $")
#ident "$Id: failure.c,v 1.17 2005/09/26 18:46:11 kloczek Exp $"
#include <fcntl.h>
#include <stdio.h>
#include "defines.h"
@@ -183,7 +183,6 @@ void failprint (const struct faillog *fail)
#if HAVE_STRFTIME
char lasttimeb[256];
char *lasttime = lasttimeb;
const char *fmt;
#else
char *lasttime;
#endif
@@ -197,24 +196,15 @@ void failprint (const struct faillog *fail)
#if HAVE_STRFTIME
/*
* Only print as much date and time info as it needed to
* know when the failure was.
* Print all information we have.
*/
if (NOW - fail->fail_time >= YEAR)
fmt = "%Y";
else if (NOW - fail->fail_time >= DAY)
fmt = "%A %T";
else
fmt = "%T";
strftime (lasttimeb, sizeof lasttimeb, fmt, tp);
strftime (lasttimeb, sizeof lasttimeb, "%c", tp);
#else
/*
* Do the same thing, but don't use strftime since it
* probably doesn't exist on this system
*/
lasttime = asctime (tp);
lasttime[24] = '\0';

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: fields.c,v 1.6 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: fields.c,v 1.7 2005/08/31 17:24:57 kloczek Exp $"
#include <ctype.h>
#include <string.h>
#include <stdio.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: hushed.c,v 1.6 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: hushed.c,v 1.7 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include <stdio.h>
#include "defines.h"

View File

@@ -39,9 +39,9 @@
#include "defines.h"
#include <pwd.h>
#include <time.h>
#include "rcsid.h"
RCSID ("$Id: isexpired.c,v 1.14 2005/05/25 19:31:50 kloczek Exp $")
#ident "$Id: isexpired.c,v 1.15 2005/08/31 17:24:57 kloczek Exp $"
/*
* isexpired - determine if account is expired yet

View File

@@ -36,8 +36,8 @@
#ifndef USE_PAM
#include "rcsid.h"
RCSID ("$Id: limits.c,v 1.18 2005/06/20 10:02:02 kloczek Exp $")
#ident "$Id: limits.c,v 1.20 2005/09/05 17:32:17 kloczek Exp $"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@@ -210,6 +210,7 @@ static int do_user_limits (const char *buf, const char *name)
case 'A':
/* RLIMIT_AS - max address space (KB) */
retval |= setrlimit_value (RLIMIT_AS, pp, 1024);
break;
#endif
#ifdef RLIMIT_CPU
case 't':

View File

@@ -32,8 +32,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: list.c,v 1.4 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: list.c,v 1.5 2005/08/31 17:24:57 kloczek Exp $"
#include "prototypes.h"
#include "defines.h"
/*

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: log.c,v 1.9 2005/04/02 11:31:39 kloczek Exp $")
#ident "$Id: log.c,v 1.10 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include <pwd.h>
#include <fcntl.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: loginprompt.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: loginprompt.c,v 1.9 2005/08/31 17:24:57 kloczek Exp $"
#include <stdio.h>
#include <signal.h>
#include <ctype.h>

View File

@@ -36,8 +36,8 @@
#include "getdef.h"
#include "rcsid.h"
RCSID ("$Id: mail.c,v 1.8 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: mail.c,v 1.9 2005/08/31 17:24:57 kloczek Exp $"
void mailcheck (void)
{

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: motd.c,v 1.5 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: motd.c,v 1.6 2005/08/31 17:24:57 kloczek Exp $"
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"

View File

@@ -10,8 +10,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: myname.c,v 1.3 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: myname.c,v 1.4 2005/08/31 17:24:57 kloczek Exp $"
#include "defines.h"
#include <pwd.h>
#include "prototypes.h"

View File

@@ -31,8 +31,8 @@
#ifndef USE_PAM
#include "rcsid.h"
RCSID ("$Id: obscure.c,v 1.12 2005/03/24 04:29:23 kloczek Exp $")
#ident "$Id: obscure.c,v 1.14 2005/08/31 17:24:57 kloczek Exp $"
/*
* This version of obscure.c contains modifications to support "cracklib"
@@ -158,7 +158,7 @@ static const char *password_check (const char *old, const char *new,
#endif
if (strcmp (new, old) == 0)
return "no change";
return _("no change");
newmono = str_lower (xstrdup (new));
oldmono = str_lower (xstrdup (old));
@@ -167,19 +167,19 @@ static const char *password_check (const char *old, const char *new,
strcat (wrapped, oldmono);
if (palindrome (oldmono, newmono))
msg = "a palindrome";
msg = _("a palindrome");
if (!msg && strcmp (oldmono, newmono) == 0)
msg = "case changes only";
msg = _("case changes only");
if (!msg && similar (oldmono, newmono))
msg = "too similar";
msg = _("too similar");
if (!msg && simple (old, new))
msg = "too simple";
msg = _("too simple");
if (!msg && strstr (wrapped, newmono))
msg = "rotated";
msg = _("rotated");
#ifdef HAVE_LIBCRACK
/*
@@ -215,7 +215,7 @@ static const char *password_check (const char *old, const char *new,
newlen = strlen (new);
if (newlen < getdef_num ("PASS_MIN_LEN", 0))
return "too short";
return _("too short");
/*
* Remaining checks are optional.

View File

@@ -2,8 +2,8 @@
#ifdef USE_PAM
#include "rcsid.h"
RCSID ("$Id: pam_pass.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: pam_pass.c,v 1.11 2005/08/31 17:24:57 kloczek Exp $"
/*
* Change the user's password using PAM. Requires libpam and libpam_misc

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: pwd2spwd.c,v 1.6 2005/05/25 18:20:22 kloczek Exp $")
#ident "$Id: pwd2spwd.c,v 1.7 2005/08/31 17:24:57 kloczek Exp $"
#include <sys/types.h>
#include "prototypes.h"
#include "defines.h"

View File

@@ -1,8 +1,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: pwd_init.c,v 1.2 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: pwd_init.c,v 1.3 2005/08/31 17:24:58 kloczek Exp $"
#include "defines.h"
#include <signal.h>
#include <sys/types.h>

View File

@@ -1,7 +1,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: pwdcheck.c,v 1.7 2005/07/18 12:55:36 kloczek Exp $")
#ident "$Id: pwdcheck.c,v 1.8 2005/08/31 17:24:58 kloczek Exp $"
#include <pwd.h>
#include <stdio.h>
#include "prototypes.h"

View File

@@ -31,8 +31,8 @@
#ifdef RLOGIN
#include "rcsid.h"
RCSID ("$Id: rlogin.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: rlogin.c,v 1.10 2005/08/31 17:24:58 kloczek Exp $"
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>

View File

@@ -7,8 +7,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: salt.c,v 1.8 2005/05/25 19:31:50 kloczek Exp $")
#ident "$Id: salt.c,v 1.10 2005/08/31 17:24:58 kloczek Exp $"
#include <sys/time.h>
#include <stdlib.h>
#include "prototypes.h"
@@ -26,9 +26,11 @@ char *crypt_make_salt (void)
static char result[40];
result[0] = '\0';
#ifndef USE_PAM
if (getdef_bool ("MD5_CRYPT_ENAB")) {
strcpy (result, "$1$"); /* magic for the new MD5 crypt() */
}
#endif
/*
* Generate 8 chars of salt, the old crypt() will use only first 2.

View File

@@ -33,8 +33,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: setugid.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: setugid.c,v 1.10 2005/08/31 17:24:58 kloczek Exp $"
#include <stdio.h>
#include <grp.h>
#include "prototypes.h"

View File

@@ -33,8 +33,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: setupenv.c,v 1.18 2005/08/09 18:09:42 kloczek Exp $")
#ident "$Id: setupenv.c,v 1.20 2005/09/30 14:29:11 kloczek Exp $"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@@ -234,10 +234,6 @@ void setup_env (struct passwd *info)
addenv ("SHELL", info->pw_shell);
/*
* Create the PATH environmental variable and export it.
*/
/*
* Export the user name. For BSD derived systems, it's "USER", for
* all others it's "LOGNAME". We set both of them.
@@ -247,6 +243,10 @@ void setup_env (struct passwd *info)
addenv ("LOGNAME", info->pw_name);
#ifndef USE_PAM
/*
* Create the PATH environmental variable and export it.
*/
cp = getdef_str ((info->pw_uid == 0) ? "ENV_SUPATH" : "ENV_PATH");
if (!cp) {

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: shell.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: shell.c,v 1.11 2005/08/31 17:24:58 kloczek Exp $"
#include <stdio.h>
#include <errno.h>
#include "prototypes.h"

View File

@@ -33,8 +33,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: strtoday.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: strtoday.c,v 1.11 2005/08/31 17:24:58 kloczek Exp $"
#include "defines.h"
#ifndef USE_GETDATE
#define USE_GETDATE 1

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: sub.c,v 1.8 2005/07/18 13:19:05 kloczek Exp $")
#ident "$Id: sub.c,v 1.9 2005/08/31 17:24:58 kloczek Exp $"
#include <pwd.h>
#include <stdio.h>
#include <sys/types.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: sulog.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: sulog.c,v 1.9 2005/08/31 17:24:58 kloczek Exp $"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: ttytype.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: ttytype.c,v 1.10 2005/08/31 17:24:58 kloczek Exp $"
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: tz.c,v 1.6 2005/07/06 11:33:05 kloczek Exp $")
#ident "$Id: tz.c,v 1.7 2005/08/31 17:24:58 kloczek Exp $"
#include <stdio.h>
#include <string.h>
#include "defines.h"

View File

@@ -1,7 +1,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: ulimit.c,v 1.3 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: ulimit.c,v 1.4 2005/08/31 17:24:58 kloczek Exp $"
#if HAVE_ULIMIT_H
#include <ulimit.h>
#ifndef UL_SETFSIZE

View File

@@ -40,8 +40,8 @@
#include <fcntl.h>
#include <stdio.h>
#include "rcsid.h"
RCSID ("$Id: utmp.c,v 1.16 2005/07/05 20:17:51 kloczek Exp $")
#ident "$Id: utmp.c,v 1.18 2005/08/31 17:24:58 kloczek Exp $"
#if HAVE_UTMPX_H
struct utmpx utxent;
#endif
@@ -53,9 +53,9 @@ extern void setutent ();
extern void endutent ();
#define NO_UTENT \
"No utmp entry. You must exec \"login\" from the lowest level \"sh\""
_("No utmp entry. You must exec \"login\" from the lowest level \"sh\"")
#define NO_TTY \
"Unable to determine your tty name."
_("Unable to determine your tty name.")
/*
* checkutmp - see if utmp file is correct for this process

View File

@@ -29,8 +29,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: valid.c,v 1.5 2003/04/22 10:59:22 kloczek Exp $")
#ident "$Id: valid.c,v 1.6 2005/08/31 17:24:58 kloczek Exp $"
#include <sys/types.h>
#include <stdio.h>
#include "prototypes.h"

View File

@@ -9,8 +9,8 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: xmalloc.c,v 1.6 2005/03/31 05:14:50 kloczek Exp $")
#ident "$Id: xmalloc.c,v 1.7 2005/08/31 17:24:58 kloczek Exp $"
#include <stdio.h>
#include "defines.h"
char *xmalloc (size_t size)