Module Name:    src
Committed By:   pooka
Date:           Wed Oct 21 17:37:21 UTC 2009

Modified Files:
        src/sys/ufs/ext2fs: ext2fs_extern.h ext2fs_vfsops.c ext2fs_vnops.c

Log Message:
update i_uid and i_gid after chown


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/ext2fs/ext2fs_extern.h
cvs rdiff -u -r1.151 -r1.152 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.90 -r1.91 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.41 src/sys/ufs/ext2fs/ext2fs_extern.h:1.42
--- src/sys/ufs/ext2fs/ext2fs_extern.h:1.41	Mon Oct 19 18:41:17 2009
+++ src/sys/ufs/ext2fs/ext2fs_extern.h	Wed Oct 21 17:37:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_extern.h,v 1.41 2009/10/19 18:41:17 bouyer Exp $	*/
+/*	$NetBSD: ext2fs_extern.h,v 1.42 2009/10/21 17:37:21 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -138,6 +138,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.151 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.152
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.151	Mon Oct 19 18:41:17 2009
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Wed Oct 21 17:37:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.151 2009/10/19 18:41:17 bouyer Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.152 2009/10/21 17:37:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.151 2009/10/19 18:41:17 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.152 2009/10/21 17:37:21 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -106,7 +106,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;
 
@@ -164,7 +163,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.90 src/sys/ufs/ext2fs/ext2fs_vnops.c:1.91
--- src/sys/ufs/ext2fs/ext2fs_vnops.c:1.90	Mon Oct 19 18:41:17 2009
+++ src/sys/ufs/ext2fs/ext2fs_vnops.c	Wed Oct 21 17:37:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vnops.c,v 1.90 2009/10/19 18:41:17 bouyer Exp $	*/
+/*	$NetBSD: ext2fs_vnops.c,v 1.91 2009/10/21 17:37:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.90 2009/10/19 18:41:17 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.91 2009/10/21 17:37:21 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -502,8 +502,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;

Reply via email to