# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../aufs/compile.diff # Copyright (C) 2009 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Index: ./fs/aufs/export.c =================================================================== RCS file: /cvsroot/aufs/aufs/fs/aufs/export.c,v retrieving revision 1.43 diff -u -r1.43 export.c --- ./fs/aufs/export.c 26 Jan 2009 06:24:45 -0000 1.43 +++ ./fs/aufs/export.c 1 May 2009 11:30:06 -0000 @@ -375,7 +375,7 @@ if (nsi_lock) si_read_unlock(parent->d_sb); path_get(path); - file = dentry_open(parent, path->mnt, au_dir_roflags); + file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred()); dentry = (void *)file; if (IS_ERR(file)) goto out; Index: ./fs/aufs/file.c =================================================================== RCS file: /cvsroot/aufs/aufs/fs/aufs/file.c,v retrieving revision 1.83 diff -u -r1.83 file.c --- ./fs/aufs/file.c 26 Jan 2009 06:23:56 -0000 1.83 +++ ./fs/aufs/file.c 1 May 2009 11:30:06 -0000 @@ -100,7 +100,7 @@ if (file && au_test_nfs(h_dentry->d_sb)) h_file = au_h_intent(dentry, bindex, file); if (!h_file) - h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags, cred); + h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags, current_cred()); /* * a dirty trick for handling FMODE_EXEC and deny_write_access(). Index: ./fs/aufs/inode.c =================================================================== RCS file: /cvsroot/aufs/aufs/fs/aufs/inode.c,v retrieving revision 1.55 diff -u -r1.55 inode.c --- ./fs/aufs/inode.c 26 Jan 2009 06:24:45 -0000 1.55 +++ ./fs/aufs/inode.c 1 May 2009 11:30:06 -0000 @@ -407,7 +407,7 @@ { const struct cred *cred = get_task_cred(current); - if (!cred->fsuid) + if (!current_fsuid()) return 0; /* todo: fake nameidata? */ return vfsub_permission(h_inode, mask, NULL, dlgt); Index: ./fs/aufs/whout.c =================================================================== RCS file: /cvsroot/aufs/aufs/fs/aufs/whout.c,v retrieving revision 1.47 diff -u -r1.47 whout.c --- ./fs/aufs/whout.c 26 Jan 2009 06:24:19 -0000 1.47 +++ ./fs/aufs/whout.c 1 May 2009 11:30:07 -0000 @@ -277,7 +277,7 @@ */ vfsub_args_init(&vargs, &ign, dlgt, (h_dir->i_mode & S_ISVTX) - && wh_dentry->d_inode->i_uid != cred->fsuid); + && wh_dentry->d_inode->i_uid != current_fsuid()); vfsub_ign_hinode(&vargs, IN_DELETE, hdir); err = vfsub_unlink(h_dir, wh_dentry, &vargs); AuTraceErr(err); @@ -626,7 +626,7 @@ struct vfsub_args vargs; AuTraceEnter(); - AuDebugOn(current->fsuid); + AuDebugOn(current_fsuid()); err = 0; wbr = a->br->br_wbr; Index: ./fs/aufs/xino.c =================================================================== RCS file: /cvsroot/aufs/aufs/fs/aufs/xino.c,v retrieving revision 1.65 diff -u -r1.65 xino.c --- ./fs/aufs/xino.c 26 Jan 2009 06:24:24 -0000 1.65 +++ ./fs/aufs/xino.c 1 May 2009 11:30:07 -0000 @@ -623,7 +623,7 @@ } file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt), O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, - cred); + current_cred()); if (IS_ERR(file)) { AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file)); goto out_dput; goto out_dput;