]> git.baikalelectronics.ru Git - kernel.git/commit
CRED: Introduce credential access wrappers
authorDavid Howells <dhowells@redhat.com>
Wed, 13 Aug 2008 15:20:04 +0000 (16:20 +0100)
committerJames Morris <jmorris@namei.org>
Wed, 13 Aug 2008 23:35:23 +0000 (09:35 +1000)
commit7afd3b91181c741f44b89eb5b87bfb602a03af24
tree96a9da2c1e733cce2dced4868aaa68b48ced49e1
parenta4fb0f77225f3df37a49641584a6f484a6a1e298
CRED: Introduce credential access wrappers

The patches that are intended to introduce copy-on-write credentials for 2.6.28
require abstraction of access to some fields of the task structure,
particularly for the case of one task accessing another's credentials where RCU
will have to be observed.

Introduced here are trivial no-op versions of the desired accessors for current
and other tasks so that other subsystems can start to be converted over more
easily.

Wrappers are introduced into a new header (linux/cred.h) for UID/GID,
EUID/EGID, SUID/SGID, FSUID/FSGID, cap_effective and current's subscribed
user_struct.  These wrappers are macros because the ordering between header
files mitigates against making them inline functions.

linux/cred.h is #included from linux/sched.h.

Further, XFS is modified such that it no longer defines and uses parameterised
versions of current_fs[ug]id(), thus getting rid of the namespace collision
otherwise incurred.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
fs/xfs/linux-2.6/xfs_linux.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_vnodeops.c
include/linux/cred.h [new file with mode: 0644]
include/linux/sched.h