Unix client: wrappers for credentials structure access
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 29 Oct 2009 23:23:28 +0000 (19:23 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 9 Nov 2009 16:19:06 +0000 (08:19 -0800)
commiteb8e55bba7740a87e07ef07bb4b789e6d4e36f0d
tree538cc4b0c94b1214a2f3b548a77029e0742d40eb
parentf6ce2af008feb615e94d924fc9f81e2098e73e7c
Unix client: wrappers for credentials structure access

This patch introduces and makes use of wrappers for access
to credentials structure members:
cr_uid (afs_ucred_t *)
cr_ruid(afs_ucred_t *)
cr_gid (afs_ucred_t *)
cr_rgid(afs_ucred_t *)
cr_group_info(afs_ucred_t *)

Inline functions are also introduced to set values:
set_cr_uid (afs_ucred_t *, uid_t)
set_cr_ruid(afs_ucred_t *, uid_t)
set_cr_gid (afs_ucred_t *, gid_t)
set_cr_rgid(afs_ucred_t *, gid_t)
set_cr_group_info(afs_ucred_t *, struct group_info *)

This will allow an architecture to make use of an alternate
structure to hold credentials.  In particular it will allow
the linux client to be modified to use the kernel credentials
structure directly instead of shadowing it into our own local
structure.

There should be no functional change.

Change-Id: I7739196a0691a9c30887043b085e4878e88780ae
Reviewed-on: http://gerrit.openafs.org/768
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
25 files changed:
src/afs/DARWIN/osi_vnodeops.c
src/afs/IRIX/osi_vnodeops.c
src/afs/LINUX/osi_cred.c
src/afs/LINUX/osi_groups.c
src/afs/LINUX/osi_machdep.h
src/afs/LINUX/osi_nfssrv.c
src/afs/LINUX24/osi_cred.c
src/afs/LINUX24/osi_machdep.h
src/afs/UKERNEL/afs_usrops.c
src/afs/VNOPS/afs_vnop_create.c
src/afs/VNOPS/afs_vnop_dirops.c
src/afs/VNOPS/afs_vnop_write.c
src/afs/afs.h
src/afs/afs_disconnected.c
src/afs/afs_dynroot.c
src/afs/afs_nfsclnt.c
src/afs/afs_osi.c
src/afs/afs_osi_gcpags.c
src/afs/afs_osi_pag.c
src/afs/afs_pag_call.c
src/afs/afs_pag_cred.c
src/afs/afs_pioctl.c
src/afs/afs_user.c
src/afs/exporter.h
src/afsweb/nsafs.c