freebsd-skq/usr.sbin
Bruce Evans 6f4640cac6 Use p->fts_level instead of unsuccessfully trying to keep track of the
level ourself.  We failed for unreadable directories.  E.g.,
`mtree -d -f /etc/mtree/BSD.usr.dist -p /usr' run by `nobody' was
confused after it couldn't descend into /usr/games/hide.  It looked
for /usr/include and subsequent directories in /usr/games.

Don't search for `extra' files when the spec depth is less than the
fts level.  The spec depth isn't incremented for leaf nodes because
that would give a NULL level pointer and make it inconvenient to go
back to the parent level.  Leaf nodes are built for directories that
are empty in the spec.  Since they are empty in the spec, all files
in them are extra.  The search looked for files one spec level
too high, so for `mtree -d -f /etc/mtree/BSD.usr.dist -p /usr',
obj/sbin matched ./sbin and wasn't considered extra, so it was
descended into and lots of bogus extra things in it were found.
This was harmful for `mtree -U' (as reported in pr623) and worse
for `mtree -r'.

Use rmdir(), not unlink(), to remove `extra' directories.  unlink()
succeeds for root but unlinking directories normally damages the
file system.

Report `fts_errno' instead of `errno' when the former applies.
1995-07-24 02:52:42 +00:00
..
ac Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
accton Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
adduser The problem is the returned salt, while the freebsd man pages asks that the 1995-05-20 13:05:22 +00:00
amd Changes to support version 3 of the NFS protocol. 1995-06-27 11:07:30 +00:00
apm Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
apmconf Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
arp Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
bad144 Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
bootparamd Add a dependency on the .x source file and avoid copying it. 1995-07-04 08:39:27 +00:00
bootpd __386BSD__ -> __FreeBSD__ 1994-11-04 02:14:13 +00:00
bootpef add rtmsg.c. 1994-09-12 07:48:33 +00:00
bootpgw add rtmsg.c. 1994-09-12 07:48:33 +00:00
bootptest Changes for bootpd to work on FreeBSD 2.0: 1994-09-10 15:00:08 +00:00
cdplay Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
chown Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
chroot Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
config Add missing quote to yyerror call. 1995-07-18 06:11:34 +00:00
config.new Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
cron Remove LOG_FILE definition, close PR 595 1995-07-06 22:47:30 +00:00
crunch Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
ctm Forgot this one in the MD5 reshuffle. 1995-07-13 15:33:42 +00:00
dbsym Changes to adapt to 2.0. 1994-08-23 11:17:55 +00:00
dev_mkdb Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
diskpart Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
edquota Cast some expressions involving dbtob() to (unsigned long) and print them 1995-05-07 07:48:35 +00:00
eeprom Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
fdcontrol Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
fdformat Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
fdwrite Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
inetd Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
iostat Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
kbdcontrol Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
kbdmap The LINKS variable was being improperly specified as non-relative to 1995-07-17 14:43:06 +00:00
kernbb Don't dereference NULL pointers. 1995-04-28 04:58:19 +00:00
kgmon Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
kvm_mkdb Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
lpr lpr uses access(2) to determine if the parent directory of the file 1995-07-17 21:19:09 +00:00
lptcontrol Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
lsdev Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
manctl Take hardcoded /usr/sbin out of the install target. 1995-07-17 14:39:09 +00:00
mixer Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
mount_portalfs Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
mountd Changes to support version 3 of the NFS protocol. 1995-06-27 11:07:30 +00:00
mrouted Patches to correct endianness bugs in mtrace and a few other little 1995-07-10 16:13:05 +00:00
mtree Use p->fts_level instead of unsuccessfully trying to keep track of the 1995-07-24 02:52:42 +00:00
named Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
ncrcontrol Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
nfsd Changes to support version 3 of the NFS protocol. 1995-06-27 11:07:30 +00:00
nologin Convert to our man installation style. Also fixed long-standing bug 1994-08-05 02:42:42 +00:00
nslookup Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
pcvt Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
pkg_install Use lstat() instead of access() for checking file existence. It works 1995-06-24 10:12:59 +00:00
pkg_manage Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
portmap Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
ppp 1. Clean up log message. 1995-07-08 17:46:56 +00:00
pppd Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
pppstats There was no newline in the error message for kvm_openfiles(). 1995-07-13 15:59:41 +00:00
pstat Document new tty states TS_CONNECTED, TS_SO_OLOWAT, TS_SO_OCOMPLETE, 1995-07-21 17:03:34 +00:00
pwd_mkdb Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
quot BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00
quotaon Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
rarpd Use daemon() to deamonify ourselves. 1995-07-18 21:35:32 +00:00
repquota Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
rmt The rmt protocol didn't allow to pass a file creation mode (permission 1995-04-09 09:20:47 +00:00
routed Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
rtprio "idle priority" support. Based on code from Henrik Vestergaard Draboel, 1994-10-02 04:48:21 +00:00
rwhod Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
sa Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
sade Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
sendmail Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
sgsc Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
sliplogin Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
slstat Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
spkrtest Better version of spkrtest using perl and dialog 1995-07-23 01:46:55 +00:00
swapinfo Don't follow a null pointer for the reporting error if kvm_openfiles() fails. 1994-11-14 07:54:06 +00:00
sysctl Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
sysinstall Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
syslogd Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
tcpdump Make tcpdump a lot smarter about printing IGMP messages. Derived by groveling 1995-06-13 17:39:23 +00:00
timed Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
traceroute bugfix: traceroute hangs forever, if another ICMP traffics exists and 1995-07-23 01:25:33 +00:00
trpt Removed bogus #include of netinet/in_pcb.h 1995-04-10 00:41:25 +00:00
trsp Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
tzsetup Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
update BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00
vidcontrol Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
vipw Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
vnconfig The vnconfig man page needs updating (change vndXX to vnXX). 1995-07-08 09:29:51 +00:00
watch Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
XNSrouted Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
xntpd Support for the Boeder DCF77 Receiver 1995-07-21 13:04:07 +00:00
xten Switch from bogus absolute path to a relative one. 1995-05-09 23:48:54 +00:00
ypbind Add a -S option to ypbind that allows the following: 1995-07-20 22:33:02 +00:00
yppoll Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
ypset Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
zic FreeBSD port of timezone code. 1994-09-13 03:36:16 +00:00
Makefile Add kbdmap. 1995-07-12 18:43:38 +00:00
Makefile.inc BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00