Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 2004 23:53:18 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Rafal Skoczylas <nils@secprog.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [UFS] Broken suiddir? (+patch)
Message-ID:  <20040324225318.GS8930@darkness.comp.waw.pl>
In-Reply-To: <20040323223020.GA2931@secprog.org>
References:  <20040323223020.GA2931@secprog.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Tue, Mar 23, 2004 at 11:30:20PM +0100, Rafal Skoczylas wrote:
+> root@hawaje:/usr/src/sys/ufs/ufs% diff -u ufs_vnops.c.orig ufs_vnops.c
+> --- ufs_vnops.c.orig    Sat Oct 18 16:10:27 2003
+> +++ ufs_vnops.c Sun Mar 21 01:31:04 2004
+> @@ -1411,7 +1411,7 @@
+>                                  * our context so a stack variable is ok.
+>                                  */
+>                                 ucred.cr_ref = 1;
+> -                               ucred.cr_uid = ip->i_uid;
+> +                               ucred.cr_uid = dp->i_uid;
+>                                 ucred.cr_ngroups = 1;
+>                                 ucred.cr_groups[0] = dp->i_gid;
+>                                 ucp = &ucred;
+> root@hawaje:/usr/src/sys/ufs/ufs%

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.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYhFeForvXbEpPzQRAjDCAKCCSbN5bguG9TN3TYz8txyjoARc4ACgiMfK
3kDKfpoAT6e2+f3beZVBZbY=
=GCq/
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040324225318.GS8930>