Date: Tue, 5 Jun 2007 16:52:09 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 121003 for review Message-ID: <200706051652.l55Gq9Ea076462@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=121003 Change 121003 by rwatson@rwatson_zoo on 2007/06/05 16:51:57 Convert a few more priv_check_cred() calls to priv_check() now that life is simpler. Affected files ... .. //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs_vnops.c#11 edit .. //depot/projects/trustedbsd/priv/sys/fs/procfs/procfs_ioctl.c#12 edit Differences ... ==== //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs_vnops.c#11 (text+ko) ==== @@ -1160,8 +1160,7 @@ if (uid != de->de_uid || gid != de->de_gid) { if ((ap->a_cred->cr_uid != de->de_uid) || uid != de->de_uid || (gid != de->de_gid && !groupmember(gid, ap->a_cred))) { - error = priv_check_cred(ap->a_td->td_ucred, - PRIV_VFS_CHOWN, 0); + error = priv_check(ap->a_td, PRIV_VFS_CHOWN); if (error) return (error); } @@ -1172,8 +1171,7 @@ if (vap->va_mode != (mode_t)VNOVAL) { if (ap->a_cred->cr_uid != de->de_uid) { - error = priv_check_cred(ap->a_td->td_ucred, - PRIV_VFS_ADMIN, 0); + error = priv_check(ap->a_td, PRIV_VFS_ADMIN); if (error) return (error); } ==== //depot/projects/trustedbsd/priv/sys/fs/procfs/procfs_ioctl.c#12 (text+ko) ==== @@ -114,8 +114,7 @@ * p_candebug() should implement it, or other checks * are missing. */ - error = priv_check_cred(td->td_ucred, - PRIV_DEBUG_SUGID, 0); + error = priv_check(td, PRIV_DEBUG_SUGID); if (error) break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706051652.l55Gq9Ea076462>