Re: compute_creds fixup in -mm

From: Chris Wright
Date: Wed Apr 21 2004 - 14:09:51 EST


* Andy Lutomirski (luto@xxxxxxxxxxxxx) wrote:
> void compute_creds(struct linux_binprm *bprm)
> {
> - security_bprm_apply_creds(bprm);
> + task_lock(current);
> +
> + security_bprm_apply_creds(bprm, must_not_trace_exec(current));
> +
> + task_unlock(current);

unecessary extra lines.

> +static void selinux_bprm_apply_creds(struct linux_binprm *bprm, int unsafe)
> @@ -1782,14 +1780,13 @@
> /* Check for ptracing, and update the task SID if ok.
> Otherwise, leave SID unchanged and kill. */
> task_lock(current);

oops ;-)

> - if (current->ptrace & PT_PTRACED) {
> + if (unsafe & (LSM_UNSAFE_PTRACE | LSM_UNSAFE_PTRACE_CAP)) {

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/