Eric Biggers wrote:
> This shows up after a few seconds of syzkaller fuzzing with a description of
> KEYCTL_MOVE added:
Yeah... I'm fixing that now. I've also created a bunch of tests, manpages,
etc. for keyutils which I'll push when I've fixed my patches.
David
On Wed, May 22, 2019 at 11:28:45PM +0100, David Howells wrote:
> Add a keyctl to atomically move a link to a key from one keyring to
> another. The key must exist in "from" keyring and a flag can be given to
> cause the operation to fail if there's a matching key already in the "to"
> keyring.
>
James Morris wrote:
> > +
> > + if (flags & ~KEYCTL_MOVE_EXCL)
> > + return -EINVAL;
> > +
> > + key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE, KEY_NEED_LINK);
> > + if (IS_ERR(key_ref)) {
> > + ret = PTR_ERR(key_ref);
> > + goto error;
> > + }
>
> This co
On Wed, 22 May 2019, David Howells wrote:
> +
> + if (flags & ~KEYCTL_MOVE_EXCL)
> + return -EINVAL;
> +
> + key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE, KEY_NEED_LINK);
> + if (IS_ERR(key_ref)) {
> + ret = PTR_ERR(key_ref);
> + goto error;
> +
Add a keyctl to atomically move a link to a key from one keyring to
another. The key must exist in "from" keyring and a flag can be given to
cause the operation to fail if there's a matching key already in the "to"
keyring.
This can be done with:
keyctl(KEYCTL_MOVE,
key_se
5 matches
Mail list logo