Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/ufs/ufs Pull up revision 1.114 (requested by kleink...



details:   https://anonhg.NetBSD.org/src/rev/075bb83cc181
branches:  netbsd-2-0
changeset: 561091:075bb83cc181
user:      grant <grant%NetBSD.org@localhost>
date:      Sun May 23 11:57:53 2004 +0000

description:
Pull up revision 1.114 (requested by kleink in ticket #379):

POSIX: Permit a process without the appropriate privilege to change a
file's group ID to its effective gid, in addition to the presently
permitted set of supplementary gids.

diffstat:

 sys/ufs/ufs/ufs_vnops.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r febf600b0175 -r 075bb83cc181 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Sun May 23 11:56:04 2004 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c   Sun May 23 11:57:53 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_vnops.c,v 1.113 2004/01/26 10:39:30 hannken Exp $  */
+/*     $NetBSD: ufs_vnops.c,v 1.113.2.1 2004/05/23 11:57:53 grant Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993, 1995
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.113 2004/01/26 10:39:30 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.113.2.1 2004/05/23 11:57:53 grant Exp $");
 
 #ifndef _LKM
 #include "opt_quota.h"
@@ -533,7 +533,8 @@
         * or the call fails.
         */
        if ((cred->cr_uid != ip->i_uid || uid != ip->i_uid ||
-           (gid != ip->i_gid && !groupmember((gid_t)gid, cred))) &&
+           (gid != ip->i_gid &&
+            !(cred->cr_gid == gid || groupmember((gid_t)gid, cred)))) &&
            ((error = suser(cred, &p->p_acflag)) != 0))
                return (error);
 



Home | Main Index | Thread Index | Old Index