Subject: misc/6474: rc.shutdown must be executable
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 11/20/1998 23:38:02
>Number: 6474
>Category: misc
>Synopsis: rc.shutdown must be executable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 20 13:50:00 1998
>Last-Modified:
>Originator: Erik Bertelsen
>Organization:
>Release: NetBSD-current 20 Nov 1998
>Environment:
System: NetBSD erik-be.uni-c.dk 1.3I NetBSD 1.3I (ERIKBE) #155: Thu Nov 19 10:35:06 MET 1998 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386
>Description:
When installing the new /etc/rc.shutdown, care must be taken
to ensure that it is executable to be run from /sbin/shutdown.
In /usr/src/etc/Makefile, rc.shutdown is mentioned in BIN1,
which contains files that are installed with mode 644. Probably
rc.shutdown should be installed via another variable than
BIN1, or simply by itself. I have not provided a fix for
this problem.
Secondly, when rc.shutdown is made executable, you can watch
roots daily crontab jobs complain about this -- fix enclosed
below.
>How-To-Repeat:
Watch recent shutdowns complain about /etc/rc.shutdown not being
executable (permission error), if it is mode 644.
>Fix:
(only partly fix for this PR)
Index: special
===================================================================
RCS file: /sw/cvs-base/src/etc/mtree/special,v
retrieving revision 1.4
diff -c -r1.4 special
*** special 1998/11/01 11:42:28 1.4
--- special 1998/11/20 22:29:09
***************
*** 55,61 ****
rc.conf type=file mode=0644 uname=root gname=wheel
rc.lkm type=file mode=0644 uname=root gname=wheel
rc.local type=file mode=0644 uname=root gname=wheel
! rc.shutdown type=file mode=0644 uname=root gname=wheel
rc.shutdown.local type=file mode=0644 uname=root gname=wheel optional
rc.subr type=file mode=0644 uname=root gname=wheel
resolv.conf type=file mode=0644 uname=root gname=wheel optional
--- 55,61 ----
rc.conf type=file mode=0644 uname=root gname=wheel
rc.lkm type=file mode=0644 uname=root gname=wheel
rc.local type=file mode=0644 uname=root gname=wheel
! rc.shutdown type=file mode=0755 uname=root gname=wheel
rc.shutdown.local type=file mode=0644 uname=root gname=wheel optional
rc.subr type=file mode=0644 uname=root gname=wheel
resolv.conf type=file mode=0644 uname=root gname=wheel optional
regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: