Linux: Simplify keyring compatibility code
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sat, 19 Dec 2009 20:21:36 +0000 (20:21 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Sun, 20 Dec 2009 18:03:56 +0000 (10:03 -0800)
commit987816dfa852750caca8c64c44174a5333ae0e3b
tree842074d1b29c56dbe71d9abe600c7806a3b37372
parentcda45cc7a11495c1acc5a5ebbac1474f3eb5a6bd
Linux: Simplify keyring compatibility code

This introduces a few inline functions in osi_compat.h, to reduce the
number of #ifdefs in the main chunk of code. In particular, we gain
  * afs_linux_key_alloc : to handle all the different key_alloc
                          signatures
  * afs_linux_search_keyring : to handle our two different mechanisms
                               for searching a keyring
  * afs_linux_cred_is_current : will return true if we're using native
credentials, and the passed creds are also
those of the current task

Change-Id: I138f3533a7e8e88e04e4b5508158e003882d63ee
Reviewed-on: http://gerrit.openafs.org/1005
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_compat.h
src/afs/LINUX/osi_groups.c