Fix a typo in the hostfs setgid code.
Signed-off-by: Jeff Dike <[email protected]>
Index: linux-2.6.11/arch/um/include/kern.h
===================================================================
--- linux-2.6.11.orig/arch/um/include/kern.h 2005-03-08 20:13:55.000000000 -0500
+++ linux-2.6.11/arch/um/include/kern.h 2005-03-08 21:56:19.000000000 -0500
@@ -26,6 +26,7 @@
extern void perror(char *err);
extern int kill(int pid, int sig);
extern int getuid(void);
+extern int getgid(void);
extern int pause(void);
extern int write(int, const void *, int);
extern int exit(int);
Index: linux-2.6.11/fs/hostfs/hostfs_kern.c
===================================================================
--- linux-2.6.11.orig/fs/hostfs/hostfs_kern.c 2005-03-08 20:17:34.000000000 -0500
+++ linux-2.6.11/fs/hostfs/hostfs_kern.c 2005-03-08 20:18:15.000000000 -0500
@@ -845,7 +845,7 @@
if(attr->ia_valid & ATTR_GID){
if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) &&
(attr->ia_gid == 0))
- attr->ia_gid = getuid();
+ attr->ia_gid = getgid();
attrs.ia_valid |= HOSTFS_ATTR_GID;
attrs.ia_gid = attr->ia_gid;
}