search for: prison_root

Displaying 3 results from an estimated 3 matches for "prison_root".

2004 Apr 20
1
[patch] Raw sockets in jails
..._INFO_WUNLOCK(&ripcbinfo); return EINVAL; } - if (td && (error = suser(td)) != 0) { + if (td && jailed(td->td_ucred) && !jail_allow_raw_sockets) { + INP_INFO_WUNLOCK(&ripcbinfo); + return (EPERM); + } + if (td && (error = suser_cred(td->td_ucred, PRISON_ROOT)) != 0) { INP_INFO_WUNLOCK(&ripcbinfo); return error; }
2003 Nov 30
0
FreeBSD mknod refuses to create pipes and fifos
...ted patches to kernel: --- sys/kern/vfs_syscalls.c.orig Sun Nov 30 00:59:29 2003 +++ sys/kern/vfs_syscalls.c Sun Nov 30 01:25:35 2003 @@ -1189,6 +1189,10 @@ case S_IFBLK: error = suser(p); break; + case S_IFIFO: + case S_IFSOCK: + error = 0; + break; default: error = suser_xxx(0, p, PRISON_ROOT); break; @@ -1217,6 +1221,12 @@ break; case S_IFBLK: vattr.va_type = VBLK; + break; + case S_IFSOCK: + vattr.va_type = VSOCK; + break; + case S_IFIFO: + vattr.va_type = VFIFO; break; case S_IFWHT: whiteout = 1; 1) I'm not sure if FIFO and/or SOCK creation wi...
1999 Sep 03
0
FreeBSD-SA-99:01: BSD File Flags and Programming Techniques
...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, &vattr, p-...