[UFS] Broken suiddir? (+patch)

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Mar 25 03:04:59 PST 2004


On Thu, Mar 25, 2004 at 11:32:22AM +0100, Rafal Skoczylas wrote:
+> On Wed, Mar 24, 2004 at 11:53:18PM +0100, Pawel Jakub Dawidek wrote:
+> > +> -                               ucred.cr_uid = ip->i_uid;
+> > +> +                               ucred.cr_uid = dp->i_uid;
+> > 
+> > I haven't test your report and patch yet, but it is strange.
+> > In line 1403 stays:
+> > 
+> > 	ip->i_uid = dp->i_uid;
+> > 
+> > So ip->i_uid should be equal in line which you have patched.
+> 
+> Indeed, but somehow it wasn't.
+> Hmm.. maybe I did some mistake when testing, but still this is
+> quite strange as I asked a friend of mine to test it as well
+> (on the same system tho) and we both had same results.
+> Could anyone else try this?

I've just tried and it works.
Are you sure you have added +s bit on this directory?
Even if there is no +s bit, group will be taken from parent
directory for newly created file.
Or maybe your file system isn't mounted with MNT_SUIDDIR flag?

Try this:

	# mount -o suiddir /your_mount_point
	# chmod 4777 /your_mount_point/your_dir
	% touch /your_mount_point/your_dir/foo
	% ls -l /your_mount_point/your_dir/foo

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd at FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040325/75f37bcb/attachment.bin


More information about the freebsd-current mailing list