diff options
| author | 2015-01-16 06:39:28 +0000 | |
|---|---|---|
| committer | 2015-01-16 06:39:28 +0000 | |
| commit | b9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch) | |
| tree | 72b2433e418dfa1aef5fcf8305617b97979a25d8 /sbin/init/init.c | |
| parent | improve checksum parsing slightly. now handles filenames with spaces. (diff) | |
| download | wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip | |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'sbin/init/init.c')
| -rw-r--r-- | sbin/init/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c index 62b9f6ce18a..a9ec322d5eb 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.51 2014/12/06 00:20:22 bluhm Exp $ */ +/* $OpenBSD: init.c,v 1.52 2015/01/16 06:39:58 deraadt Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/sysctl.h> #include <sys/wait.h> #include <sys/reboot.h> @@ -488,8 +488,8 @@ single_user(void) pid_t pid, wpid; int status; sigset_t mask; - char shell[MAXPATHLEN]; /* Allocate space here */ - char name[MAXPATHLEN]; /* Name (argv[0]) of shell */ + char shell[PATH_MAX]; /* Allocate space here */ + char name[PATH_MAX]; /* Name (argv[0]) of shell */ char *argv[2]; #ifdef SECURE struct ttyent *typ; |
