Messages in this thread | | | From | Steve Grubb <> | Subject | Re: drop SECURITY_FILE_CAPABILITIES? | Date | Thu, 19 Nov 2009 15:26:15 -0500 |
| |
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
| |