diff options
| author | 2015-01-16 06:39:28 +0000 | |
|---|---|---|
| committer | 2015-01-16 06:39:28 +0000 | |
| commit | b9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch) | |
| tree | 72b2433e418dfa1aef5fcf8305617b97979a25d8 /usr.sbin/pppd/options.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 'usr.sbin/pppd/options.c')
| -rw-r--r-- | usr.sbin/pppd/options.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c index 99c29d8e10f..349d498e789 100644 --- a/usr.sbin/pppd/options.c +++ b/usr.sbin/pppd/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.27 2014/12/10 03:39:54 jsg Exp $ */ +/* $OpenBSD: options.c,v 1.28 2015/01/16 06:40:19 deraadt Exp $ */ /* * options.c - handles option processing for PPP. @@ -97,7 +97,7 @@ int dflag = 0; /* Tell libpcap we want debugging */ int debug = 0; /* Debug flag */ int kdebugflag = 0; /* Tell kernel to print debug messages */ int default_device = 1; /* Using /dev/tty or equivalent */ -char devnam[MAXPATHLEN] = "/dev/tty"; /* Device name */ +char devnam[PATH_MAX] = "/dev/tty"; /* Device name */ int crtscts = 0; /* Use hardware flow control */ int modem = 1; /* Use modem control lines */ int modem_chat = 0; /* Use modem control lines during chat */ @@ -1567,7 +1567,7 @@ setdevname(cp, quiet) int quiet; { struct stat statbuf; - char dev[MAXPATHLEN]; + char dev[PATH_MAX]; if (*cp == 0) return 0; @@ -1588,7 +1588,7 @@ setdevname(cp, quiet) return -1; } - (void) strlcpy(devnam, cp, MAXPATHLEN); + (void) strlcpy(devnam, cp, PATH_MAX); default_device = FALSE; devnam_info.priv = privileged_option; devnam_info.source = option_source; |
