mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
Exit with a warning if the path to one of the logging sockets is
too long, rather than silently truncating them. PR: 67139 Inspired by: OpenBSD
This commit is contained in:
parent
ac3a1548f8
commit
6f8c264082
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129853
@ -371,6 +371,8 @@ main(int argc, char *argv[])
|
||||
KeepKernFac = 1;
|
||||
break;
|
||||
case 'l':
|
||||
if (strlen(optarg) >= sizeof(sunx.sun_path))
|
||||
errx(1, "%s path too long, exiting", optarg);
|
||||
if (nfunix < MAXFUNIX)
|
||||
funixn[nfunix++] = optarg;
|
||||
else
|
||||
@ -387,6 +389,8 @@ main(int argc, char *argv[])
|
||||
use_bootfile = 1;
|
||||
break;
|
||||
case 'p': /* path */
|
||||
if (strlen(optarg) >= sizeof(sunx.sun_path))
|
||||
errx(1, "%s path too long, exiting", optarg);
|
||||
funixn[0] = optarg;
|
||||
break;
|
||||
case 'P': /* path for alt. PID */
|
||||
|
Loading…
Reference in New Issue
Block a user