Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.if defined(__MINIX)
|
||||
WARNS=3
|
||||
.endif
|
||||
|
||||
USE_FORT?= yes # setuid
|
||||
PROG= chpass
|
||||
SRCS= chpass.c edit.c field.c table.c util.c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: chpass.1,v 1.23 2006/10/07 20:09:09 elad Exp $
|
||||
.\" $NetBSD: chpass.1,v 1.25 2012/04/21 12:27:29 roy Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1988, 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" @(#)chpass.1 8.2 (Berkeley) 12/30/93
|
||||
.\"
|
||||
.Dd October 7, 2006
|
||||
.Dd April 5, 2012
|
||||
.Dt CHPASS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -78,7 +78,7 @@ option attempts to change the user's shell to
|
||||
This option causes the password to be updated only in the local
|
||||
password file.
|
||||
When changing only the local password,
|
||||
.Xr pwd_mkdb 8
|
||||
.Xr pwd_mkdb 8
|
||||
is used to update the password databases.
|
||||
.It Fl y
|
||||
This forces the YP password database entry to be changed, even if
|
||||
@@ -180,7 +180,7 @@ field is a key for a user's login class.
|
||||
Login classes are defined in
|
||||
.Xr login.conf 5 ,
|
||||
which is a
|
||||
.Xr termcap 5
|
||||
.Xr capfile 5
|
||||
style database of user attributes, accounting, resource and
|
||||
environment settings.
|
||||
.Pp
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: chpass.c,v 1.33 2008/07/21 14:19:21 lukem Exp $ */
|
||||
/* $NetBSD: chpass.c,v 1.35 2011/08/31 16:24:57 plunky Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993, 1994
|
||||
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: chpass.c,v 1.33 2008/07/21 14:19:21 lukem Exp $");
|
||||
__RCSID("$NetBSD: chpass.c,v 1.35 2011/08/31 16:24:57 plunky Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -73,9 +73,9 @@ void (*Pw_error)(const char *, int, int);
|
||||
extern int _yp_check(char **); /* buried deep inside libc */
|
||||
#endif
|
||||
|
||||
void baduser(void);
|
||||
void cleanup(void);
|
||||
void usage(void);
|
||||
__dead static void baduser(void);
|
||||
static void cleanup(void);
|
||||
__dead static void usage(void);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@@ -244,7 +244,7 @@ main(int argc, char **argv)
|
||||
#ifdef YP
|
||||
if (use_yp) {
|
||||
if (pw_yp(pw, uid))
|
||||
yppw_error((char *)NULL, 0, 1);
|
||||
yppw_error(NULL, 0, 1);
|
||||
else
|
||||
exit(0);
|
||||
/* Will not exit from this if. */
|
||||
@@ -290,14 +290,14 @@ main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
baduser(void)
|
||||
{
|
||||
|
||||
errx(1, "%s", strerror(EACCES));
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
@@ -308,7 +308,7 @@ usage(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cleanup(void)
|
||||
{
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: chpass.h,v 1.12 2005/02/17 17:09:48 xtraeme Exp $ */
|
||||
/* $NetBSD: chpass.h,v 1.13 2011/08/29 14:08:39 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993, 1994
|
||||
@@ -72,7 +72,7 @@ int verify(char *, struct passwd *);
|
||||
#ifdef YP
|
||||
int check_yppasswdd(void);
|
||||
int pw_yp(struct passwd *, uid_t);
|
||||
void yppw_error(const char *name, int, int);
|
||||
__dead void yppw_error(const char *name, int, int);
|
||||
void yppw_prompt(void);
|
||||
struct passwd *ypgetpwnam(const char *);
|
||||
struct passwd *ypgetpwuid(uid_t);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: edit.c,v 1.20 2009/04/11 12:10:02 lukem Exp $ */
|
||||
/* $NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
@@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: edit.c,v 1.20 2009/04/11 12:10:02 lukem Exp $");
|
||||
__RCSID("$NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -151,13 +151,8 @@ verify(char *tempname, struct passwd *pw)
|
||||
int len, fd;
|
||||
static char buf[LINE_MAX];
|
||||
|
||||
#ifdef __minix
|
||||
if ((fd = open(tempname, O_RDONLY)) == -1 ||
|
||||
(fp = fdopen(fd, "r")) == NULL)
|
||||
#else
|
||||
if ((fd = open(tempname, O_RDONLY|O_NOFOLLOW)) == -1 ||
|
||||
(fp = fdopen(fd, "r")) == NULL)
|
||||
#endif
|
||||
(*Pw_error)(tempname, 1, 1);
|
||||
if (fstat(fd, &sb))
|
||||
(*Pw_error)(tempname, 1, 1);
|
||||
@@ -223,5 +218,5 @@ bad: (void)fclose(fp);
|
||||
warnx("entries too long");
|
||||
return (0);
|
||||
}
|
||||
return (pw_scan(buf, pw, (int *)NULL));
|
||||
return (pw_scan(buf, pw, NULL));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user