search for: p_ucred

Displaying 4 results from an estimated 4 matches for "p_ucred".

1999 Sep 03
0
FreeBSD-SA-99:01: BSD File Flags and Programming Techniques
...used, users can retain ownership of the device + * if they are allowed to set flags and programs assume that + * chown can't fail when done as root. + */ + if ((vp->v_type == VCHR || vp->v_type == VBLK) && + ((error = suser_xxx(p->p_ucred, p, PRISON_ROOT)) != 0)) + return (error); + VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); VATTR_NULL(&vattr); vattr.va_flags = flags; error = VOP_SETATTR(vp...
1999 Sep 15
0
FreeBSD Security Advisory: FreeBSD-SA-99:04.core
...REAT | FWRITE | O_NOFOLLOW, S_IRUSR | S_IWUSR); free(name, M_TEMP); if (error) return (error); *** kern/imgact_aout.c 1999/05/17 00:53:36 1.52 --- kern/imgact_aout.c 1999/08/26 17:32:48 1.53 *************** *** 264,271 **** name = expand_name(p->p_comm, p->p_ucred->cr_uid, p->p_pid); if (name == NULL) return (EFAULT); /* XXX -- not the best error */ ! NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, name, p); ! error = vn_open(&nd, O_CREAT | FWRITE, S_IRUSR | S_IWUSR); free(name, M_TEMP); if (error) return (error);...
1998 Mar 12
2
FreeBSD Security Advisory: FreeBSD-SA-98:02.mmap
...* (Because the XIG X server writes directly to video + * memory via /dev/mem, it should never work at any + * other securelevel. + * XXX this will have to go + */ + if (securelevel >= 1) + disablexworkaround = 1; + else + disablexworkaround = suser(p->p_ucred, + &p->p_acflag); + if (vp->v_type == VCHR && disablexworkaround && + (flags & (MAP_PRIVATE|MAP_COPY))) + return (EINVAL); + /* * Ensure that file and memory protections are * compatible. Note that we only worry about...
2003 Jun 30
0
sysctl_out_proc() race in stable w/ patch
...==================================================== RCS file: /cvs/src/sys/kern/kern_proc.c,v retrieving revision 1.7 diff -u -r1.7 kern_proc.c --- kern/kern_proc.c 28 Jun 2003 02:36:43 -0000 1.7 +++ kern/kern_proc.c 30 Jun 2003 21:46:25 -0000 @@ -529,8 +529,9 @@ if (!PRISON_CHECK(cr1, p->p_ucred)) continue; - + PHOLD(p); error = sysctl_out_proc(p, req, doingzomb); + PRELE(p); if (error) return (error); }