9 Feb 11:13
[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" [ver #2]
As the kernel has or will have filesystems (and possibly other services) that want to obtain authentication tokens and/or encryption data on demand (via GSSAPI for example), it would seem useful to provide an additional error code to indicate a problem with the lookup, rather than overloading some other error code. We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems with a token that we already have, but what if the authentication server just isn't available? Define ENOAUTHSERVICE to indicate "Authentication service unavailable". This can be used to indicate, for example, that an attempt was made by request_key() to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to contact didn't answer or that it couldn't determine the location of a suitable server. One way this can be used is that the user of a network filesystem can get a TGT from the KDC and stash it in their session keyring, then the filesystem can attempt to automatically get a ticket for accessing the filesystem - but if the server is uncontactable then the ticket can be negatively instantiated with KEYCTL_REJECT, giving the error to be handed to future requests as ENOAUTHSERVICE and a small timeout so that the key will expire from the cache and allow a retry after a short while to prevent thrashing. Signed-off-by: David Howells <dhowells@...> --- arch/alpha/include/asm/errno.h | 2 ++ arch/mips/include/asm/errno.h | 1 + arch/parisc/include/asm/errno.h | 1 +(Continue reading)
RSS Feed