PERFORCE change 20493 for review

Robert Watson rwatson at freebsd.org
Thu Oct 31 21:33:45 GMT 2002


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

Change 20493 by rwatson at rwatson_tislabs on 2002/10/31 13:33:40

	Trim redundant suser() check for hostname setting: the sysctl
	code already does this check so we don't need it here.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_xxx.c#4 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/kern_xxx.c#4 (text+ko) ====

@@ -97,10 +97,8 @@
 	name[0] = CTL_KERN;
 	name[1] = KERN_HOSTNAME;
 	mtx_lock(&Giant);
-	if ((error = suser_cred(td->td_ucred, PRISON_ROOT)) == 0) {
-		error = userland_sysctl(td, name, 2, 0, 0, 0,
-		    uap->hostname, uap->len, 0);
-	}
+	error = userland_sysctl(td, name, 2, 0, 0, 0, uap->hostname,
+	    uap->len, 0);
 	mtx_unlock(&Giant);
 	return (error);
 }
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list