Re: [PATCH 5/7] Security: Change current->fs[ug]id to current_fs[ug]id()

2007-12-07 Thread David Howells

Serge E. Hallyn <[EMAIL PROTECTED]> wrote:

> Could you resend patch 6?

As I said in the cover note:

A tarball of the patches is available at:


http://people.redhat.com/~dhowells/fscache/patches/nfs+fscache-25.tar.bz2

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/7] Security: Change current->fs[ug]id to current_fs[ug]id()

2007-12-07 Thread Serge E. Hallyn
Quoting David Howells ([EMAIL PROTECTED]):
> Change current->fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be
> separated from the task_struct.

Hi David,

this one looks straightforward enough.

Unfortunately I don't have patch 6.  In either of my
linux-security-module-receiving mailboxes, so I don't think I
accidentally deleted it :)

Could you resend patch 6?

thanks,
-serge

> Signed-off-by: David Howells <[EMAIL PROTECTED]>
> ---
> 
>  arch/ia64/kernel/perfmon.c|4 ++--
>  arch/powerpc/platforms/cell/spufs/inode.c |4 ++--
>  drivers/isdn/capi/capifs.c|4 ++--
>  drivers/usb/core/inode.c  |4 ++--
>  fs/9p/fid.c   |2 +-
>  fs/9p/vfs_inode.c |4 ++--
>  fs/9p/vfs_super.c |4 ++--
>  fs/affs/inode.c   |4 ++--
>  fs/anon_inodes.c  |4 ++--
>  fs/attr.c |4 ++--
>  fs/bfs/dir.c  |4 ++--
>  fs/cifs/cifsproto.h   |2 +-
>  fs/cifs/dir.c |   12 ++--
>  fs/cifs/inode.c   |8 
>  fs/cifs/misc.c|4 ++--
>  fs/coda/cache.c   |6 +++---
>  fs/coda/upcall.c  |4 ++--
>  fs/devpts/inode.c |4 ++--
>  fs/dquot.c|2 +-
>  fs/exec.c |4 ++--
>  fs/ext2/balloc.c  |2 +-
>  fs/ext2/ialloc.c  |4 ++--
>  fs/ext2/ioctl.c   |2 +-
>  fs/ext3/balloc.c  |2 +-
>  fs/ext3/ialloc.c  |4 ++--
>  fs/ext4/balloc.c  |2 +-
>  fs/ext4/ialloc.c  |4 ++--
>  fs/fuse/dev.c |4 ++--
>  fs/gfs2/inode.c   |   10 +-
>  fs/hfs/inode.c|4 ++--
>  fs/hfsplus/inode.c|4 ++--
>  fs/hpfs/namei.c   |   24 
>  fs/hugetlbfs/inode.c  |   16 
>  fs/jffs2/fs.c |4 ++--
>  fs/jfs/jfs_inode.c|4 ++--
>  fs/locks.c|2 +-
>  fs/minix/bitmap.c |4 ++--
>  fs/namei.c|8 
>  fs/nfsd/vfs.c |4 ++--
>  fs/ocfs2/dlm/dlmfs.c  |8 
>  fs/ocfs2/namei.c  |4 ++--
>  fs/pipe.c |4 ++--
>  fs/posix_acl.c|4 ++--
>  fs/ramfs/inode.c  |4 ++--
>  fs/reiserfs/namei.c   |4 ++--
>  fs/sysv/ialloc.c  |4 ++--
>  fs/udf/ialloc.c   |4 ++--
>  fs/udf/namei.c|2 +-
>  fs/ufs/ialloc.c   |4 ++--
>  fs/xfs/linux-2.6/xfs_linux.h  |4 ++--
>  fs/xfs/xfs_acl.c  |6 +++---
>  fs/xfs/xfs_attr.c |2 +-
>  fs/xfs/xfs_inode.c|6 +++---
>  fs/xfs/xfs_vnodeops.c |8 
>  include/linux/fs.h|2 +-
>  include/linux/sched.h |3 +++
>  ipc/mqueue.c  |4 ++--
>  kernel/cgroup.c   |4 ++--
>  mm/shmem.c|8 
>  net/9p/client.c   |2 +-
>  net/socket.c  |4 ++--
>  net/sunrpc/auth.c |8 
>  security/commoncap.c  |8 
>  security/keys/key.c   |2 +-
>  security/keys/keyctl.c|2 +-
>  security/keys/request_key.c   |   10 +-
>  security/keys/request_key_auth.c  |2 +-
>  67 files changed, 163 insertions(+), 160 deletions(-)
> 
> diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
> index 73e7c2e..ef383d9 100644
> --- a/arch/ia64/kernel/perfmon.c
> +++ b/arch/ia64/kernel/perfmon.c
> @@ -2206,8 +2206,8 @@ pfm_alloc_fd(struct file **cfile)
>   DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));
> 
>   inode->i_mode = S_IFCHR|S_IRUGO;
> - inode->i_uid  = current->fsuid;
> - inode->i_gid  = current->fsgid;
> + inode->i_uid  = current_fsuid();
> + inode->i_gid  = current_fsgid();
> 
>   sprintf(name, "[%lu]", inode->i_ino);
>   this.name = name;
> diff --git 

Re: [PATCH 5/7] Security: Change current-fs[ug]id to current_fs[ug]id()

2007-12-07 Thread Serge E. Hallyn
Quoting David Howells ([EMAIL PROTECTED]):
 Change current-fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be
 separated from the task_struct.

Hi David,

this one looks straightforward enough.

Unfortunately I don't have patch 6.  In either of my
linux-security-module-receiving mailboxes, so I don't think I
accidentally deleted it :)

Could you resend patch 6?

thanks,
-serge

 Signed-off-by: David Howells [EMAIL PROTECTED]
 ---
 
  arch/ia64/kernel/perfmon.c|4 ++--
  arch/powerpc/platforms/cell/spufs/inode.c |4 ++--
  drivers/isdn/capi/capifs.c|4 ++--
  drivers/usb/core/inode.c  |4 ++--
  fs/9p/fid.c   |2 +-
  fs/9p/vfs_inode.c |4 ++--
  fs/9p/vfs_super.c |4 ++--
  fs/affs/inode.c   |4 ++--
  fs/anon_inodes.c  |4 ++--
  fs/attr.c |4 ++--
  fs/bfs/dir.c  |4 ++--
  fs/cifs/cifsproto.h   |2 +-
  fs/cifs/dir.c |   12 ++--
  fs/cifs/inode.c   |8 
  fs/cifs/misc.c|4 ++--
  fs/coda/cache.c   |6 +++---
  fs/coda/upcall.c  |4 ++--
  fs/devpts/inode.c |4 ++--
  fs/dquot.c|2 +-
  fs/exec.c |4 ++--
  fs/ext2/balloc.c  |2 +-
  fs/ext2/ialloc.c  |4 ++--
  fs/ext2/ioctl.c   |2 +-
  fs/ext3/balloc.c  |2 +-
  fs/ext3/ialloc.c  |4 ++--
  fs/ext4/balloc.c  |2 +-
  fs/ext4/ialloc.c  |4 ++--
  fs/fuse/dev.c |4 ++--
  fs/gfs2/inode.c   |   10 +-
  fs/hfs/inode.c|4 ++--
  fs/hfsplus/inode.c|4 ++--
  fs/hpfs/namei.c   |   24 
  fs/hugetlbfs/inode.c  |   16 
  fs/jffs2/fs.c |4 ++--
  fs/jfs/jfs_inode.c|4 ++--
  fs/locks.c|2 +-
  fs/minix/bitmap.c |4 ++--
  fs/namei.c|8 
  fs/nfsd/vfs.c |4 ++--
  fs/ocfs2/dlm/dlmfs.c  |8 
  fs/ocfs2/namei.c  |4 ++--
  fs/pipe.c |4 ++--
  fs/posix_acl.c|4 ++--
  fs/ramfs/inode.c  |4 ++--
  fs/reiserfs/namei.c   |4 ++--
  fs/sysv/ialloc.c  |4 ++--
  fs/udf/ialloc.c   |4 ++--
  fs/udf/namei.c|2 +-
  fs/ufs/ialloc.c   |4 ++--
  fs/xfs/linux-2.6/xfs_linux.h  |4 ++--
  fs/xfs/xfs_acl.c  |6 +++---
  fs/xfs/xfs_attr.c |2 +-
  fs/xfs/xfs_inode.c|6 +++---
  fs/xfs/xfs_vnodeops.c |8 
  include/linux/fs.h|2 +-
  include/linux/sched.h |3 +++
  ipc/mqueue.c  |4 ++--
  kernel/cgroup.c   |4 ++--
  mm/shmem.c|8 
  net/9p/client.c   |2 +-
  net/socket.c  |4 ++--
  net/sunrpc/auth.c |8 
  security/commoncap.c  |8 
  security/keys/key.c   |2 +-
  security/keys/keyctl.c|2 +-
  security/keys/request_key.c   |   10 +-
  security/keys/request_key_auth.c  |2 +-
  67 files changed, 163 insertions(+), 160 deletions(-)
 
 diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
 index 73e7c2e..ef383d9 100644
 --- a/arch/ia64/kernel/perfmon.c
 +++ b/arch/ia64/kernel/perfmon.c
 @@ -2206,8 +2206,8 @@ pfm_alloc_fd(struct file **cfile)
   DPRINT((new inode ino=%ld @%p\n, inode-i_ino, inode));
 
   inode-i_mode = S_IFCHR|S_IRUGO;
 - inode-i_uid  = current-fsuid;
 - inode-i_gid  = current-fsgid;
 + inode-i_uid  = current_fsuid();
 + inode-i_gid  = current_fsgid();
 
   sprintf(name, [%lu], inode-i_ino);
   this.name = name;
 diff --git a/arch/powerpc/platforms/cell/spufs/inode.c 
 b/arch/powerpc/platforms/cell/spufs/inode.c
 index c0e968a..4efe7bf 100644
 

Re: [PATCH 5/7] Security: Change current-fs[ug]id to current_fs[ug]id()

2007-12-07 Thread David Howells

Serge E. Hallyn [EMAIL PROTECTED] wrote:

 Could you resend patch 6?

As I said in the cover note:

A tarball of the patches is available at:


http://people.redhat.com/~dhowells/fscache/patches/nfs+fscache-25.tar.bz2

David
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/7] Security: Change current->fs[ug]id to current_fs[ug]id()

2007-12-05 Thread David Howells
Change current->fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be
separated from the task_struct.

Signed-off-by: David Howells <[EMAIL PROTECTED]>
---

 arch/ia64/kernel/perfmon.c|4 ++--
 arch/powerpc/platforms/cell/spufs/inode.c |4 ++--
 drivers/isdn/capi/capifs.c|4 ++--
 drivers/usb/core/inode.c  |4 ++--
 fs/9p/fid.c   |2 +-
 fs/9p/vfs_inode.c |4 ++--
 fs/9p/vfs_super.c |4 ++--
 fs/affs/inode.c   |4 ++--
 fs/anon_inodes.c  |4 ++--
 fs/attr.c |4 ++--
 fs/bfs/dir.c  |4 ++--
 fs/cifs/cifsproto.h   |2 +-
 fs/cifs/dir.c |   12 ++--
 fs/cifs/inode.c   |8 
 fs/cifs/misc.c|4 ++--
 fs/coda/cache.c   |6 +++---
 fs/coda/upcall.c  |4 ++--
 fs/devpts/inode.c |4 ++--
 fs/dquot.c|2 +-
 fs/exec.c |4 ++--
 fs/ext2/balloc.c  |2 +-
 fs/ext2/ialloc.c  |4 ++--
 fs/ext2/ioctl.c   |2 +-
 fs/ext3/balloc.c  |2 +-
 fs/ext3/ialloc.c  |4 ++--
 fs/ext4/balloc.c  |2 +-
 fs/ext4/ialloc.c  |4 ++--
 fs/fuse/dev.c |4 ++--
 fs/gfs2/inode.c   |   10 +-
 fs/hfs/inode.c|4 ++--
 fs/hfsplus/inode.c|4 ++--
 fs/hpfs/namei.c   |   24 
 fs/hugetlbfs/inode.c  |   16 
 fs/jffs2/fs.c |4 ++--
 fs/jfs/jfs_inode.c|4 ++--
 fs/locks.c|2 +-
 fs/minix/bitmap.c |4 ++--
 fs/namei.c|8 
 fs/nfsd/vfs.c |4 ++--
 fs/ocfs2/dlm/dlmfs.c  |8 
 fs/ocfs2/namei.c  |4 ++--
 fs/pipe.c |4 ++--
 fs/posix_acl.c|4 ++--
 fs/ramfs/inode.c  |4 ++--
 fs/reiserfs/namei.c   |4 ++--
 fs/sysv/ialloc.c  |4 ++--
 fs/udf/ialloc.c   |4 ++--
 fs/udf/namei.c|2 +-
 fs/ufs/ialloc.c   |4 ++--
 fs/xfs/linux-2.6/xfs_linux.h  |4 ++--
 fs/xfs/xfs_acl.c  |6 +++---
 fs/xfs/xfs_attr.c |2 +-
 fs/xfs/xfs_inode.c|6 +++---
 fs/xfs/xfs_vnodeops.c |8 
 include/linux/fs.h|2 +-
 include/linux/sched.h |3 +++
 ipc/mqueue.c  |4 ++--
 kernel/cgroup.c   |4 ++--
 mm/shmem.c|8 
 net/9p/client.c   |2 +-
 net/socket.c  |4 ++--
 net/sunrpc/auth.c |8 
 security/commoncap.c  |8 
 security/keys/key.c   |2 +-
 security/keys/keyctl.c|2 +-
 security/keys/request_key.c   |   10 +-
 security/keys/request_key_auth.c  |2 +-
 67 files changed, 163 insertions(+), 160 deletions(-)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 73e7c2e..ef383d9 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2206,8 +2206,8 @@ pfm_alloc_fd(struct file **cfile)
DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));
 
inode->i_mode = S_IFCHR|S_IRUGO;
-   inode->i_uid  = current->fsuid;
-   inode->i_gid  = current->fsgid;
+   inode->i_uid  = current_fsuid();
+   inode->i_gid  = current_fsgid();
 
sprintf(name, "[%lu]", inode->i_ino);
this.name = name;
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c 
b/arch/powerpc/platforms/cell/spufs/inode.c
index c0e968a..4efe7bf 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -85,8 +85,8 @@ spufs_new_inode(struct super_block *sb, int mode)
goto out;
 
inode->i_mode = mode;
-   inode->i_uid = current->fsuid;
-   inode->i_gid = current->fsgid;
+   inode->i_uid = current_fsuid();
+ 

[PATCH 5/7] Security: Change current-fs[ug]id to current_fs[ug]id()

2007-12-05 Thread David Howells
Change current-fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be
separated from the task_struct.

Signed-off-by: David Howells [EMAIL PROTECTED]
---

 arch/ia64/kernel/perfmon.c|4 ++--
 arch/powerpc/platforms/cell/spufs/inode.c |4 ++--
 drivers/isdn/capi/capifs.c|4 ++--
 drivers/usb/core/inode.c  |4 ++--
 fs/9p/fid.c   |2 +-
 fs/9p/vfs_inode.c |4 ++--
 fs/9p/vfs_super.c |4 ++--
 fs/affs/inode.c   |4 ++--
 fs/anon_inodes.c  |4 ++--
 fs/attr.c |4 ++--
 fs/bfs/dir.c  |4 ++--
 fs/cifs/cifsproto.h   |2 +-
 fs/cifs/dir.c |   12 ++--
 fs/cifs/inode.c   |8 
 fs/cifs/misc.c|4 ++--
 fs/coda/cache.c   |6 +++---
 fs/coda/upcall.c  |4 ++--
 fs/devpts/inode.c |4 ++--
 fs/dquot.c|2 +-
 fs/exec.c |4 ++--
 fs/ext2/balloc.c  |2 +-
 fs/ext2/ialloc.c  |4 ++--
 fs/ext2/ioctl.c   |2 +-
 fs/ext3/balloc.c  |2 +-
 fs/ext3/ialloc.c  |4 ++--
 fs/ext4/balloc.c  |2 +-
 fs/ext4/ialloc.c  |4 ++--
 fs/fuse/dev.c |4 ++--
 fs/gfs2/inode.c   |   10 +-
 fs/hfs/inode.c|4 ++--
 fs/hfsplus/inode.c|4 ++--
 fs/hpfs/namei.c   |   24 
 fs/hugetlbfs/inode.c  |   16 
 fs/jffs2/fs.c |4 ++--
 fs/jfs/jfs_inode.c|4 ++--
 fs/locks.c|2 +-
 fs/minix/bitmap.c |4 ++--
 fs/namei.c|8 
 fs/nfsd/vfs.c |4 ++--
 fs/ocfs2/dlm/dlmfs.c  |8 
 fs/ocfs2/namei.c  |4 ++--
 fs/pipe.c |4 ++--
 fs/posix_acl.c|4 ++--
 fs/ramfs/inode.c  |4 ++--
 fs/reiserfs/namei.c   |4 ++--
 fs/sysv/ialloc.c  |4 ++--
 fs/udf/ialloc.c   |4 ++--
 fs/udf/namei.c|2 +-
 fs/ufs/ialloc.c   |4 ++--
 fs/xfs/linux-2.6/xfs_linux.h  |4 ++--
 fs/xfs/xfs_acl.c  |6 +++---
 fs/xfs/xfs_attr.c |2 +-
 fs/xfs/xfs_inode.c|6 +++---
 fs/xfs/xfs_vnodeops.c |8 
 include/linux/fs.h|2 +-
 include/linux/sched.h |3 +++
 ipc/mqueue.c  |4 ++--
 kernel/cgroup.c   |4 ++--
 mm/shmem.c|8 
 net/9p/client.c   |2 +-
 net/socket.c  |4 ++--
 net/sunrpc/auth.c |8 
 security/commoncap.c  |8 
 security/keys/key.c   |2 +-
 security/keys/keyctl.c|2 +-
 security/keys/request_key.c   |   10 +-
 security/keys/request_key_auth.c  |2 +-
 67 files changed, 163 insertions(+), 160 deletions(-)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 73e7c2e..ef383d9 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2206,8 +2206,8 @@ pfm_alloc_fd(struct file **cfile)
DPRINT((new inode ino=%ld @%p\n, inode-i_ino, inode));
 
inode-i_mode = S_IFCHR|S_IRUGO;
-   inode-i_uid  = current-fsuid;
-   inode-i_gid  = current-fsgid;
+   inode-i_uid  = current_fsuid();
+   inode-i_gid  = current_fsgid();
 
sprintf(name, [%lu], inode-i_ino);
this.name = name;
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c 
b/arch/powerpc/platforms/cell/spufs/inode.c
index c0e968a..4efe7bf 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -85,8 +85,8 @@ spufs_new_inode(struct super_block *sb, int mode)
goto out;
 
inode-i_mode = mode;
-   inode-i_uid = current-fsuid;
-   inode-i_gid = current-fsgid;
+   inode-i_uid = current_fsuid();
+   inode-i_gid =