commit 3ff37d91dedb116b770af30b5bb5eb64db51359d
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Sun May 6 13:02:51 2007 -0400

    bugfix: was setting uid to oldgid and gid to olduid

diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 741e32e..224cbf1 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -935,8 +935,8 @@ struct odf_dentry_info *__odf_lookup(struct odf_sb_info 
*osi,
        struct odf_dentry_info *odi = old_odi;
        struct inode *odf_i_dir = parent->dentry->d_inode;
        int opaque, err = 0, cleaned = 0;
-       uid_t olduid;
-       gid_t oldgid;
+       uid_t olduid = current->fsuid;
+       gid_t oldgid = current->fsgid;
 
        BUG_ON((flags & ODF_LOOKUP_FILE) && (flags & ODF_LOOKUP_DIR));
        BUG_ON((flags & ODF_LOOKUP_WH) && (flags != ODF_LOOKUP_WH));
@@ -970,9 +970,6 @@ struct odf_dentry_info *__odf_lookup(struct odf_sb_info 
*osi,
                if (name[0]=='.')
                        BUG_ON(len==1 || (name[1]=='.'&&len==2));
 retry:
-               olduid = current->fsuid;
-               oldgid = current->fsgid;
-
                /* FIXME need to check hardlinks before create */
                if (!(flags & ODF_LOOKUP_LOCKED)){
                        if (osi->odi_ic != parent)
@@ -1020,8 +1017,8 @@ retry:
                else if (cleaned)
                        odf_unlock(osi->odi_ic);
 
-               current->fsuid = oldgid;
-               current->fsgid = olduid;
+               current->fsuid = olduid;
+               current->fsgid = oldgid;
 
                if (err) {
                        if (err == -ENOSPC && !cleaned) {
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to