• David Howells's avatar
    [PATCH] keys: Discard duplicate keys from a keyring on link · cab8eb59
    David Howells authored
    Cause any links within a keyring to keys that match a key to be linked into
    that keyring to be discarded as a link to the new key is added.  The match is
    contingent on the type and description strings being the same.
    
    This permits requests, adds and searches to displace negative, expired,
    revoked and dead keys easily.  After some discussion it was concluded that
    duplicate valid keys should probably be discarded also as they would otherwise
    hide the new key.
    
    Since request_key() is intended to be the primary method by which keys are
    added to a keyring, duplicate valid keys wouldn't be an issue there as that
    function would return an existing match in preference to creating a new key.
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
    Cc: Alexander Zangerl <az@bond.edu.au>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    cab8eb59
keys.txt 37.5 KB