Re: [UFS] Broken suiddir? (+patch)

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Thu, 25 Mar 2004 12:04:57 +0100
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!

Received on Thu Mar 25 2004 - 02:04:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC