Obtained from: Whistle Communications tree
Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
- use new getvfsbyname() interface and mount(2) interface
**DANGER WILL ROBINSON!!** You must be running a -current kernel
from within a week or so in order for this to work!
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
inspired by SunOS version of mount which uses option -p to
indicate that the mount information should be printed in fstab
format.
This is a neat way to create a new fstab file to use later when
one has modified the mount points or mount options or added or
removed mount some mount points. You just type
mount -p > /etc/fstab.new
and there is your new fstab file ready to be used though you
will of course have to add any necessary noauto flags manually.
[Committers note: This also seems to do the wrong thing for AMD
mounts, but in the more average case this is a nifty feature nonetheless
and one can always edit the bogus entries out]
Submitted-By: Jukka Ukkonen <jau@jau.csc.fi>
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.
Reviewed by: Poul-Henning Kamp, Rod Grimes