Module Name: src
Committed By: bouyer
Date: Tue Oct 27 21:41:07 UTC 2009
Modified Files:
src/sys/ufs/ext2fs [netbsd-5]: ext2fs_extern.h ext2fs_vfsops.c
ext2fs_vnops.c
Log Message:
Pull up following revision(s) (requested by pooka in ticket #1112):
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.91
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.152
sys/ufs/ext2fs/ext2fs_extern.h: revision 1.42
update i_uid and i_gid after chown
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.6.1 src/sys/ufs/ext2fs/ext2fs_extern.h
cvs rdiff -u -r1.137.6.4 -r1.137.6.5 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.82.10.1 -r1.82.10.2 src/sys/ufs/ext2fs/ext2fs_vnops.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/ufs/ext2fs/ext2fs_extern.h
diff -u src/sys/ufs/ext2fs/ext2fs_extern.h:1.39 src/sys/ufs/ext2fs/ext2fs_extern.h:1.39.6.1
--- src/sys/ufs/ext2fs/ext2fs_extern.h:1.39 Sat Jun 28 01:34:05 2008
+++ src/sys/ufs/ext2fs/ext2fs_extern.h Tue Oct 27 21:41:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_extern.h,v 1.39 2008/06/28 01:34:05 rumble Exp $ */
+/* $NetBSD: ext2fs_extern.h,v 1.39.6.1 2009/10/27 21:41:07 bouyer Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -143,6 +143,7 @@
int ext2fs_flushfiles(struct mount *, int);
int ext2fs_sbupdate(struct ufsmount *, int);
int ext2fs_cgupdate(struct ufsmount *, int);
+void ext2fs_set_inode_guid(struct inode *);
/* ext2fs_readwrite.c */
int ext2fs_read(void *);
Index: src/sys/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.4 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.5
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.4 Fri Oct 16 05:51:03 2009
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Tue Oct 27 21:41:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.4 2009/10/16 05:51:03 snj Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.5 2009/10/27 21:41:07 bouyer Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.137.6.4 2009/10/16 05:51:03 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.137.6.5 2009/10/27 21:41:07 bouyer Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -113,7 +113,6 @@
int ext2fs_sbupdate(struct ufsmount *, int);
static int ext2fs_checksb(struct ext2fs *, int);
-static void ext2fs_set_inode_guid(struct inode *);
static struct sysctllog *ext2fs_sysctl_log;
@@ -170,7 +169,7 @@
};
/* Fill in the inode uid/gid from ext2 halves. */
-static void
+void
ext2fs_set_inode_guid(struct inode *ip)
{
Index: src/sys/ufs/ext2fs/ext2fs_vnops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vnops.c:1.82.10.1 src/sys/ufs/ext2fs/ext2fs_vnops.c:1.82.10.2
--- src/sys/ufs/ext2fs/ext2fs_vnops.c:1.82.10.1 Sat Nov 29 23:10:19 2008
+++ src/sys/ufs/ext2fs/ext2fs_vnops.c Tue Oct 27 21:41:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vnops.c,v 1.82.10.1 2008/11/29 23:10:19 snj Exp $ */
+/* $NetBSD: ext2fs_vnops.c,v 1.82.10.2 2009/10/27 21:41:07 bouyer Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.82.10.1 2008/11/29 23:10:19 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.82.10.2 2009/10/27 21:41:07 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -501,8 +501,10 @@
ip->i_e2fs_gid_high = 0;
ip->i_e2fs_uid_high = 0;
}
- if (ouid != uid || ogid != gid)
+ if (ouid != uid || ogid != gid) {
+ ext2fs_set_inode_guid(ip);
ip->i_flag |= IN_CHANGE;
+ }
if (ouid != uid && kauth_authorize_generic(cred,
KAUTH_GENERIC_ISSUSER, NULL) != 0)
ip->i_e2fs_mode &= ~ISUID;