lkml.org 
[lkml]   [2009]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: drop SECURITY_FILE_CAPABILITIES?
Date
On Thursday 19 November 2009 10:35:12 am Andrew G. Morgan wrote:
> How about this change?
>
> @@ -169,8 +169,11 @@ SYSCALL_DEFINE2(capget, cap_user_header_
> kernel_cap_t pE, pI, pP;
>
> ret = cap_validate_magic(header, &tocopy);
> - if (ret != 0)
> + if ((ret != 0) || (dataptr == NULL)) {
> + if ((ret == -EINVAL) && (dataptr == NULL))
> + return 0;
> return ret;
> + }
>
> if (get_user(pid, &header->pid))
> return -EFAULT;
>
> ? This is a slightly modified version of what you posted before.
> Specifically, in the case that the user guessed a compatible version
> this NULL call will succeed and not EFAULT.

Sure. Looks good to me.

Thanks,
-Steve


\
 
 \ /
  Last update: 2009-11-19 21:31    [W:1.774 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site