Subject: lib/5261: sysctl user.cs_path should be eliminated
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik E. Fair <fair@digital.clock.org>
List: netbsd-bugs
Date: 04/07/1998 14:57:59
>Number: 5261
>Category: lib
>Synopsis: sysctl user.cs_path should be eliminated
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Apr 7 15:05:00 1998
>Last-Modified:
>Originator: Erik E. Fair
>Organization:
International Organization of Internet Clock Watchers
>Release: NetBSD-current 19980407
>Environment:
System: NetBSD digital.clock.org 1.2G NetBSD 1.2G (DIGITAL) #7: Wed Jun 18 13:56:59 PDT 1997 root@digital.clock.org:/usr/src/sys/arch/sparc/compile/DIGITAL sparc
>Description:
The "user.cs_path" item in the sysctl MIB is _PATH_STDPATH
from <paths.h>.
The apparent presumption is that rather than referencing
<paths.h>, a program could call sysctl to get _PATH_STDPATH,
and thereby get an administrator-altered-runtime version
of it, as appropriate.
However, "user.cs_path" lives in the C library, not in the
kernel. To change it for the runtime, a new shared C library
must be built; statically linked programs (e.g. /sbin/init)
must be recompiled. Systems which do not support shared
libraries lose completely - total recompilation required.
The programs that might most benefit from having a system-wide
default path (e.g. /bin/sh, /bin/csh) are statically linked.
Also, those programs should be using _PATH_DEFPATH, which is
pretty clearly intended for users, as opposed to PATH_STDPATH
which is intended for system operations (e.g. /etc/rc)
Recursive egrep of the system source tree for -current failed to
produce any uses of this sysctl MIB item.
The only utility I can see that this has is as an example of a MIB
string.
>How-To-Repeat:
Source Code & Documentation Inspection
>Fix:
remove source code from lib/libc/gen/sysctl.c sysctl.3 and sysctl.5
references.
>Audit-Trail:
>Unformatted: