auth: Allow identities in the UserList
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 15 Sep 2010 10:17:14 +0000 (11:17 +0100)
committerDerrick Brashear <shadow@dementia.org>
Thu, 25 Nov 2010 03:16:12 +0000 (19:16 -0800)
commit0af17e7eccb79dd7d618c98dc0b489d55209df50
tree16f5619ec33a48a190d6bbe074048c405c7742b5
parent46a6d6129d80c4027d8a9f0e1d06b32cc12d6367
auth: Allow identities in the UserList

Extend the userok interface provided by the auth library to permit the
addition, deletion and inspection of identities within the UserList.

A number of additional functions are added, as direct replacements for
their Kerberos v4 only counterparts - these are:
 *) afsconf_DeleteIdentity
 *) afsconf_GetNthIdentity
 *) afsconf_AddIdentity
 *) afsconf_SuperIdentity

In addition, a new function is added to allow the status of any given
identity to be queried
 *) afsconf_IsSuperIdentity

New form identities are stored within the same UserList file as
Kerberos v4 identities. We take advantage of the fact that the current
code skips any entry with a leading whitespace. Identities are stored as
a single line, with a leading space, followed by the integer
representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed
by the base64 encoded representation of their exported name, followed by
the display name of the identity. Each field is whitespace separated.

For example:
 1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK
is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK"

An addition to the test suite is also provided which will test all of
the existing, and new super user manipulation functions.

Change-Id: I50648bb1ecc3037a90d623c87a60193be4f122ff
Reviewed-on: http://gerrit.openafs.org/3355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Makefile.in
configure.ac
src/auth/cellconfig.p.h
src/auth/userok.c
tests/Makefile.in
tests/TESTS
tests/auth/.gitignore [new file with mode: 0644]
tests/auth/Makefile.in [new file with mode: 0644]
tests/auth/superuser-t.c [new file with mode: 0644]