Module Name: src Committed By: snj Date: Sun Apr 12 02:22:24 UTC 2009
Modified Files: src/sys/fs/tmpfs [netbsd-5]: tmpfs_subr.c Log Message: Pull up following revision(s) (requested by markd in ticket #689): sys/fs/tmpfs/tmpfs_subr.c: revision 1.50 For chown make auth checks consistent with UFS. Fixes PR kern/40933. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.48.6.1 src/sys/fs/tmpfs/tmpfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.48 src/sys/fs/tmpfs/tmpfs_subr.c:1.48.6.1 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.48 Thu Jun 19 19:03:44 2008 +++ src/sys/fs/tmpfs/tmpfs_subr.c Sun Apr 12 02:22:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.48 2008/06/19 19:03:44 christos Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.48.6.1 2009/04/12 02:22:24 snj Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.48 2008/06/19 19:03:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.48.6.1 2009/04/12 02:22:24 snj Exp $"); #include <sys/param.h> #include <sys/dirent.h> @@ -1098,7 +1098,7 @@ * several other file systems. Shouldn't this be centralized * somewhere? */ if ((kauth_cred_geteuid(cred) != node->tn_uid || uid != node->tn_uid || - (gid != node->tn_gid && !(kauth_cred_getegid(cred) == node->tn_gid || + (gid != node->tn_gid && !(kauth_cred_getegid(cred) == gid || (kauth_cred_ismember_gid(cred, gid, &ismember) == 0 && ismember)))) && ((error = kauth_authorize_generic(cred, KAUTH_GENERIC_ISSUSER, NULL)) != 0))