Subject: bin/1087: sysctl coredumps for some incorrect arglists
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 05/30/1995 10:05:06
>Number: 1087
>Category: bin
>Synopsis: sysctl coredumps for some incorrect arglists
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 30 10:05:03 1995
>Originator: der Mouse
>Organization:
None
>Release: -current as of May 9th (last time I got a good sup)
>Environment:
NetBSD/sparc on an IPC, but it doesn't matter
>Description:
sysctl sometimes tries to do the equivalent of
{ char *foo; .... printf("%s",*foo); }
>How-To-Repeat:
# sysctl -w kern.ngroups.blah=10
Segmentation fault (core dumped)
#
>Fix:
Apply the following in /usr/src/usr.sbin/sysctl:
*** sysctl.c= Tue May 30 12:33:39 1995
--- sysctl.c Tue May 30 12:39:40 1995
***************
*** 326,332 ****
}
if (bufp) {
! fprintf(stderr, "name %s in %s is unknown\n", *bufp, string);
return;
}
if (newsize > 0) {
--- 326,332 ----
}
if (bufp) {
! fprintf(stderr, "name %s in %s is unknown\n", bufp, string);
return;
}
if (newsize > 0) {
der Mouse
mouse@collatz.mcrcim.mcgill.edu
>Audit-Trail:
>Unformatted: