Subject: misc/3663: Teach /etc/mtree/special that some files are optional
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 05/24/1997 00:14:31
>Number: 3663
>Category: misc
>Synopsis: Teach /etc/mtree/special that some files are optional
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 23 13:20:03 1997
>Last-Modified:
>Originator: Erik Bertelsen
>Organization:
>Release: NetBSD-current 23 May 1997
>Environment:
System: NetBSD erik-be.uni-c.dk 1.2E NetBSD 1.2E (ERIKBE) #26: Tue May 13 18:53:37 MEST 1997 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386
>Description:
/etc/security uses mtree and /etc/mtree/special to verify that
several system files have the right attributes (e.g. ownership,
access modes).
However the distributed version of /etc/mtree/special reports several
files missing that need not be present on the system.
In the patch below, I have marked several files that are not present
on my system as being optional.
Actually this is probably just the first iteration in this direction,
as several other files should be covered by mtree, but need not actually
be present on all systems.
regards
Erik Bertelsen
>How-To-Repeat:
>Fix:
Index: special
===================================================================
RCS file: /sw/cvs-base/src/etc/mtree/special,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 special
*** special 1997/04/25 23:36:02 1.1.1.4
--- special 1997/05/23 22:04:55
***************
*** 17,23 ****
etc type=dir mode=0755 uname=root gname=wheel
aliases type=file mode=0644 uname=root gname=wheel
aliases.db type=file mode=0644 uname=root gname=wheel
! crontab type=file mode=0644 uname=root gname=wheel
csh.cshrc type=file mode=0644 uname=root gname=wheel
csh.login type=file mode=0644 uname=root gname=wheel
csh.logout type=file mode=0644 uname=root gname=wheel
--- 17,24 ----
etc type=dir mode=0755 uname=root gname=wheel
aliases type=file mode=0644 uname=root gname=wheel
aliases.db type=file mode=0644 uname=root gname=wheel
! # XXX remove crontab entry completely ?
! crontab type=file mode=0644 uname=root gname=wheel optional
csh.cshrc type=file mode=0644 uname=root gname=wheel
csh.login type=file mode=0644 uname=root gname=wheel
csh.logout type=file mode=0644 uname=root gname=wheel
***************
*** 25,35 ****
daily.conf type=file mode=0644 uname=root gname=wheel
disklabels type=dir mode=0755 uname=root gname=wheel ignore
.. #disklabels
! exports type=file mode=0644 uname=root gname=wheel
fstab type=file mode=0644 uname=root gname=wheel
ftpusers type=file mode=0644 uname=root gname=wheel
group type=file mode=0644 uname=root gname=wheel
! hosts.equiv type=file mode=0600 uname=root gname=wheel
kerberosIV type=dir mode=0755 uname=root gname=wheel ignore
.. #kerberosIV
lkm.conf type=file mode=0644 uname=root gname=wheel
--- 26,36 ----
daily.conf type=file mode=0644 uname=root gname=wheel
disklabels type=dir mode=0755 uname=root gname=wheel ignore
.. #disklabels
! exports type=file mode=0644 uname=root gname=wheel optional
fstab type=file mode=0644 uname=root gname=wheel
ftpusers type=file mode=0644 uname=root gname=wheel
group type=file mode=0644 uname=root gname=wheel
! hosts.equiv type=file mode=0600 uname=root gname=wheel optional
kerberosIV type=dir mode=0755 uname=root gname=wheel ignore
.. #kerberosIV
lkm.conf type=file mode=0644 uname=root gname=wheel
***************
*** 40,46 ****
mtree type=dir mode=0755 uname=root gname=wheel
special type=file mode=0600 uname=root gname=wheel
.. #mtree
! named.boot type=file mode=0644 uname=root gname=wheel
netstart type=file mode=0644 uname=root gname=wheel
passwd type=file mode=0644 uname=root gname=wheel
printcap type=file mode=0644 uname=root gname=wheel
--- 41,47 ----
mtree type=dir mode=0755 uname=root gname=wheel
special type=file mode=0600 uname=root gname=wheel
.. #mtree
! named.boot type=file mode=0644 uname=root gname=wheel optional
netstart type=file mode=0644 uname=root gname=wheel
passwd type=file mode=0644 uname=root gname=wheel
printcap type=file mode=0644 uname=root gname=wheel
***************
*** 61,70 ****
root type=dir mode=0755 uname=root gname=wheel
.cshrc type=file mode=0644 uname=root gname=wheel
! .klogin type=file mode=0600 uname=root gname=wheel
.login type=file mode=0644 uname=root gname=wheel
.profile type=file mode=0644 uname=root gname=wheel
! .rhosts type=file mode=0600 uname=root gname=wheel
.. #root
sbin type=dir mode=0755 uname=root gname=wheel ignore
--- 62,71 ----
root type=dir mode=0755 uname=root gname=wheel
.cshrc type=file mode=0644 uname=root gname=wheel
! .klogin type=file mode=0600 uname=root gname=wheel optional
.login type=file mode=0644 uname=root gname=wheel
.profile type=file mode=0644 uname=root gname=wheel
! .rhosts type=file mode=0600 uname=root gname=wheel optional
.. #root
sbin type=dir mode=0755 uname=root gname=wheel ignore
***************
*** 73,80 ****
usr type=dir mode=0755 uname=root gname=wheel
bin type=dir mode=0755 uname=root gname=wheel ignore
.. #usr/bin
! games type=dir mode=0755 uname=root gname=wheel
! hide type=dir mode=0700 uname=games gname=games ignore
.. #usr/games/hide
.. #usr/games
include type=dir mode=0755 uname=bin gname=bin ignore
--- 74,81 ----
usr type=dir mode=0755 uname=root gname=wheel
bin type=dir mode=0755 uname=root gname=wheel ignore
.. #usr/bin
! games type=dir mode=0755 uname=root gname=wheel optional
! hide type=dir mode=0700 uname=games gname=games ignore optional
.. #usr/games/hide
.. #usr/games
include type=dir mode=0755 uname=bin gname=bin ignore
***************
*** 101,107 ****
var type=dir mode=0755 uname=root gname=wheel
account type=dir mode=0755 uname=root gname=wheel
! acct type=file mode=0644 uname=root gname=wheel
.. #var/account
at type=dir mode=0755 uname=root gname=wheel ignore
.. #var/at
--- 102,108 ----
var type=dir mode=0755 uname=root gname=wheel
account type=dir mode=0755 uname=root gname=wheel
! acct type=file mode=0644 uname=root gname=wheel optional
.. #var/account
at type=dir mode=0755 uname=root gname=wheel ignore
.. #var/at
***************
*** 122,152 ****
utmp type=file mode=0664 uname=root gname=utmp
.. #var/run
spool type=dir mode=0755 uname=root gname=wheel
! ftp type=dir mode=0755 uname=root gname=wheel
! bin type=dir mode=0755 uname=root gname=wheel
! ls type=file mode=0555 uname=root gname=wheel
.. #var/spool/ftp/bin
! etc type=dir mode=0755 uname=root gname=wheel
! group type=file mode=0644 uname=root gname=wheel
! localtime type=file mode=0644 uname=root gname=wheel
! master.passwd type=file mode=0600 uname=root gname=wheel
! passwd type=file mode=0644 uname=root gname=wheel
.. #var/spool/ftp/etc
! hidden type=dir mode=0111 uname=root gname=wheel ignore
.. #var/spool/ftp/hidden
! pub type=dir mode=0777 uname=root gname=wheel ignore
.. #var/spool/ftp/pub
.. #var/spool/ftp
mqueue type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/mqueue
! news type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/news
output type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/output
secretmail type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/secretmail
! uucp type=dir mode=0755 uname=uucp gname=daemon ignore
.. #var/spool/uucp
! uucppublic type=dir mode=1777 uname=uucp gname=daemon ignore
.. #var/spool/uucppublic
.. #var/spool
--- 123,153 ----
utmp type=file mode=0664 uname=root gname=utmp
.. #var/run
spool type=dir mode=0755 uname=root gname=wheel
! ftp type=dir mode=0755 uname=root gname=wheel optional
! bin type=dir mode=0755 uname=root gname=wheel optional
! ls type=file mode=0555 uname=root gname=wheel optional
.. #var/spool/ftp/bin
! etc type=dir mode=0755 uname=root gname=wheel optional
! group type=file mode=0644 uname=root gname=wheel optional
! localtime type=file mode=0644 uname=root gname=wheel optional
! master.passwd type=file mode=0600 uname=root gname=wheel optional
! passwd type=file mode=0644 uname=root gname=wheel optional
.. #var/spool/ftp/etc
! hidden type=dir mode=0111 uname=root gname=wheel ignore optional
.. #var/spool/ftp/hidden
! pub type=dir mode=0777 uname=root gname=wheel ignore optional
.. #var/spool/ftp/pub
.. #var/spool/ftp
mqueue type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/mqueue
! news type=dir mode=0755 uname=root gname=wheel ignore optional
.. #var/spool/news
output type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/output
secretmail type=dir mode=0755 uname=root gname=wheel ignore
.. #var/spool/secretmail
! uucp type=dir mode=0755 uname=uucp gname=daemon ignore optional
.. #var/spool/uucp
! uucppublic type=dir mode=1777 uname=uucp gname=daemon ignore optional
.. #var/spool/uucppublic
.. #var/spool
>Audit-Trail:
>Unformatted: