-
Trond Myklebust authored
This patches the RPCSEC_GSS client to make use of the upcall mechanism that was provided by patch [3/6]. If an RPC task presents a non-uptodate credential to call_refresh(), a user daemon is contacted by means of a dedicated rpc_pipefs pipe. The daemon is then fed the uid for which it must establish a new RPCSEC security context. While the daemon goes about its business, the RPC task is put to sleep on a wait queue in order to allow the 'rpciod' process to service other requests. If another task wants to use the same credential, it too will be put to sleep once it reaches call_refresh(). A timeout mechanism ensures that requests are retried (or that 'soft' mounts fail) if the daemon crashes / is killed. Once the daemon has established the RPCSEC context, it writes the result back to the pipe, causing the credential to be updated. Those RPC tasks that were sleeping on the context are automatically woken up, and their execution can proceed.
a4419dbb