PERFORCE change 121003 for review

Robert Watson rwatson at FreeBSD.org
Tue Jun 5 16:52:10 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=121003

Change 121003 by rwatson at 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;
 		}


More information about the p4-projects mailing list