PERFORCE change 79876 for review

Robert Watson rwatson at FreeBSD.org
Sun Jul 10 00:09:58 GMT 2005


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

Change 79876 by rwatson at rwatson_zoo on 2005/07/10 00:09:25

	Style cleanup, restoration, fixage.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/sys/kern/kern_ntptime.c#7 edit
.. //depot/projects/trustedbsd/sebsd/sys/kern/kern_prot.c#14 edit
.. //depot/projects/trustedbsd/sebsd/sys/kern/kern_xxx.c#10 edit
.. //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#15 edit
.. //depot/projects/trustedbsd/sebsd/sys/net/if.c#14 edit
.. //depot/projects/trustedbsd/sebsd/sys/net/if_ppp.c#11 edit
.. //depot/projects/trustedbsd/sebsd/sys/net/if_tun.c#13 edit
.. //depot/projects/trustedbsd/sebsd/sys/net/ppp_tty.c#8 edit
.. //depot/projects/trustedbsd/sebsd/sys/netinet/ip_output.c#13 edit
.. //depot/projects/trustedbsd/sebsd/sys/security/mac_test/mac_test.c#17 edit
.. //depot/projects/trustedbsd/sebsd/sys/ufs/ufs/ufs_vnops.c#12 edit
.. //depot/projects/trustedbsd/sebsd/sys/vm/vm_mmap.c#13 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/sys/kern/kern_ntptime.c#7 (text+ko) ====

@@ -334,7 +334,7 @@
 	mtx_lock(&Giant);
 	modes = ntv.modes;
 	if (modes)
-		error = cap_check(td,CAP_SYS_TIME);
+		error = cap_check(td, CAP_SYS_TIME);
 	if (error)
 		goto done2;
 	s = splclock();
@@ -955,7 +955,7 @@
 	struct timeval atv;
 	int error;
 
-	if ((error = cap_check(td,CAP_SYS_TIME)))
+	if ((error = cap_check(td, CAP_SYS_TIME)))
 		return (error);
 
 	mtx_lock(&Giant);

==== //depot/projects/trustedbsd/sebsd/sys/kern/kern_prot.c#14 (text+ko) ====

@@ -1346,6 +1346,7 @@
 suser(struct thread *td)
 {
 #ifdef INVARIANTS
+
 	if (td != curthread) {
 		printf("suser: thread %p (%d %s) != curthread %p (%d %s)\n",
 		    td, td->td_proc->p_pid, td->td_proc->p_comm,

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

@@ -139,7 +139,7 @@
 {
 	int error;
 
-	error = cap_check(td,CAP_SYS_ADMIN);
+	error = cap_check(td, CAP_SYS_ADMIN);
 	if (error)
 		return (error);
 	mtx_lock(&Giant);
@@ -297,7 +297,7 @@
         int error, domainnamelen;
 
 	mtx_lock(&Giant);
-        if ((error = cap_check (td,CAP_SYS_ADMIN)))
+        if ((error = cap_check(td, CAP_SYS_ADMIN)))
 		goto done2;
         if ((u_int)uap->len > sizeof (domainname) - 1) {
 		error = EINVAL;

==== //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#15 (text+ko) ====

@@ -454,7 +454,6 @@
 	/*
 	 * We have to release Giant before initializing its witness
 	 * structure so that WITNESS doesn't get confused.
-
 	 */
 	mtx_unlock(&Giant);
 	mtx_assert(&Giant, MA_NOTOWNED);

==== //depot/projects/trustedbsd/sebsd/sys/net/if.c#14 (text+ko) ====

@@ -1311,7 +1311,7 @@
 		break;
 
 	case SIOCSIFPHYS:
-		error = cap_check (td, CAP_NET_ADMIN);
+		error = cap_check(td, CAP_NET_ADMIN);
 		if (error)
 			return (error);
 		if (ifp->if_ioctl == NULL)

==== //depot/projects/trustedbsd/sebsd/sys/net/if_ppp.c#11 (text+ko) ====

@@ -476,7 +476,7 @@
 	break;
 
     case PPPIOCSFLAGS:
-	if ((error = cap_check (td, CAP_NET_ADMIN)) != 0)
+	if ((error = cap_check(td, CAP_NET_ADMIN)) != 0)
 	    break;
 	flags = *(int *)data & SC_MASK;
 	s = splsoftnet();
@@ -720,7 +720,7 @@
 	break;
 
     case SIOCSIFMTU:
-	if ((error = cap_check (td, CAP_NET_ADMIN)) != 0)
+	if ((error = cap_check(td, CAP_NET_ADMIN)) != 0)
 	    break;
 	if (ifr->ifr_mtu > PPP_MAXMTU)
 	    error = EINVAL;

==== //depot/projects/trustedbsd/sebsd/sys/net/if_tun.c#13 (text+ko) ====

@@ -577,7 +577,7 @@
 		if (tunp->mtu < IF_MINMTU)
 			return (EINVAL);
 		if (tp->tun_if.if_mtu != tunp->mtu
-		&& (error = cap_check (td, CAP_NET_ADMIN)) != 0)
+		&& (error = cap_check(td, CAP_NET_ADMIN)) != 0)
 			return (error);
 		tp->tun_if.if_mtu = tunp->mtu;
 		tp->tun_if.if_type = tunp->type;

==== //depot/projects/trustedbsd/sebsd/sys/net/ppp_tty.c#8 (text+ko) ====

@@ -180,7 +180,7 @@
     register struct ppp_softc *sc;
     int error, s;
 
-    if ((error = cap_check (td, CAP_NET_ADMIN)) != 0)
+    if ((error = cap_check(td, CAP_NET_ADMIN)) != 0)
 	return (error);
 
     s = spltty();
@@ -449,7 +449,7 @@
 	break;
 
     case PPPIOCSRASYNCMAP:
-	if ((error = cap_check (td, CAP_NET_ADMIN)) != 0)
+	if ((error = cap_check(td, CAP_NET_ADMIN)) != 0)
 	    break;
 	sc->sc_rasyncmap = *(u_int *)data;
 	break;

==== //depot/projects/trustedbsd/sebsd/sys/netinet/ip_output.c#13 (text+ko) ====

@@ -1299,7 +1299,7 @@
 			if ((error = soopt_mcopyin(sopt, m)) != 0) /* XXX */
 				break;
 			priv = (sopt->sopt_td != NULL &&
-				cap_check (sopt->sopt_td, CAP_NET_ADMIN) != 0) ? 0 : 1;
+				cap_check(sopt->sopt_td, CAP_NET_ADMIN) != 0) ? 0 : 1;
 			req = mtod(m, caddr_t);
 			len = m->m_len;
 			optname = sopt->sopt_name;

==== //depot/projects/trustedbsd/sebsd/sys/security/mac_test/mac_test.c#17 (text+ko) ====

@@ -1384,8 +1384,9 @@
 static int
 mac_test_check_cap(struct ucred *cred, cap_value_t capv)
 {
-  ASSERT_CRED_LABEL(cred->cr_label);
-  return 0;
+
+	ASSERT_CRED_LABEL(cred->cr_label);
+	return (0);
 }
 
 static int

==== //depot/projects/trustedbsd/sebsd/sys/ufs/ufs/ufs_vnops.c#12 (text+ko) ====

@@ -617,7 +617,7 @@
 	 * jail(8).
 	 */
 	if (vp->v_type != VDIR && (mode & S_ISTXT)) {
-		if (cap_check_cred (cred, CAP_SYS_RAWIO, SUSER_ALLOWJAIL))
+		if (cap_check_cred(cred, CAP_SYS_RAWIO, SUSER_ALLOWJAIL))
 			return (EFTYPE);
 	}
 	if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) {
@@ -630,7 +630,7 @@
 	 * Setting suid on nonowned files requires CAP_FSETID.
 	 */
 	if ((ip->i_uid != cred->cr_uid) && (mode & ISUID)) {
-		if (cap_check_cred (cred, CAP_FSETID, SUSER_ALLOWJAIL))
+		if (cap_check_cred(cred, CAP_FSETID, SUSER_ALLOWJAIL))
 			return (EPERM);
 	}
 

==== //depot/projects/trustedbsd/sebsd/sys/vm/vm_mmap.c#13 (text+ko) ====

@@ -643,7 +643,7 @@
 	 * "immortal."
 	 */
 	if (uap->behav == MADV_PROTECT) {
-		error = cap_check (td, CAP_SYS_RESOURCE);
+		error = cap_check(td, CAP_SYS_RESOURCE);
 		if (error == 0) {
 			p = td->td_proc;
 			PROC_LOCK(p);
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