Subject: bin/2737: execle called with missing argument in shutdown
To: None <gnats-bugs@gnats.netbsd.org>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: netbsd-bugs
Date: 09/09/1996 00:34:40
>Number: 2737
>Category: bin
>Synopsis: execle called with missing argument in shutdown
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 8 15:50:02 1996
>Last-Modified:
>Originator: Lennart Augustsson
>Organization:
CS Dept, Chalmers
>Release: 1.2_BETA
>Environment:
System: NetBSD calvin.cs.chalmers.se 1.2_BETA NetBSD 1.2_BETA (CALVIN) #82: Sun Sep 8 19:29:30 MET DST 1996 augustss@calvin.cs.chalmers.se:/usr/src/sys/arch/i386/compile/CALVIN i386
>Description:
/sbin/shutdown calls reboot (or halt) with an execle to actually
shut down the system. If you pass the `-n' to shutdown the
call will look like this
execle(_PATH_REBOOT, "reboot", "-l", "-n", 0);
This is wrong. The man page for execle states that after
the 0 that terminates the argument list there should be an
environment pointer.
>How-To-Repeat:
Look at the source.
>Fix:
Change the two (2) calls to look like this
execle(_PATH_XXX, "xxx", "-l", "-n", 0, 0);
>Audit-Trail:
>Unformatted: