• D
    KEYS: Authorise keyctl_set_timeout() on a key if we have its authorisation key · 9156235b
    David Howells 提交于
    Authorise a process to perform keyctl_set_timeout() on an uninstantiated key if
    that process has the authorisation key for it.
    
    This allows the instantiator to set the timeout on a key it is instantiating -
    provided it does it before instantiating the key.
    
    For instance, the test upcall script provided with the keyutils package could
    be modified to set the expiry to an hour hence before instantiating the key:
    
    	[/usr/share/keyutils/request-key-debug.sh]
    	 if [ "$3" != "neg" ]
    	 then
    	+    keyctl timeout $1 3600
    	     keyctl instantiate $1 "Debug $3" $4 || exit 1
    	 else
    Signed-off-by: NDavid Howells <dhowells@redhat.com>
    Signed-off-by: NJames Morris <jmorris@namei.org>
    9156235b
keyctl.c 33.5 KB