lkml.org 
[lkml]   [2008]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/4] KEYS: Add keyctl function to get a security label
    On Fri, 08 Feb 2008 16:04:40 +0000
    David Howells <dhowells@redhat.com> wrote:

    > + key_ref = lookup_user_key(NULL, keyid, 0, 1, KEY_VIEW);
    > + if (IS_ERR(key_ref)) {
    > + if (PTR_ERR(key_ref) != -EACCES)
    > + return PTR_ERR(key_ref);
    > +
    > + /* viewing a key under construction is also permitted if we
    > + * have the authorisation token handy */
    > + instkey = key_get_instantiation_authkey(keyid);
    > + if (IS_ERR(instkey))
    > + return PTR_ERR(key_ref);
    > + key_put(instkey);

    This check looks a wee bit racy?


    \
     
     \ /
      Last update: 2008-02-13 00:55    [W:0.021 / U:0.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site