PERFORCE change 42557 for review

Robert Watson rwatson at FreeBSD.org
Sun Nov 16 17:45:48 GMT 2003


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

Change 42557 by rwatson at rwatson_tislabs on 2003/11/16 09:45:41

	Reduce gratuitous redundancy and length in function names:
	
	mac_setsockopt_label_set() -> mac_setsockopt_label()
	mac_getsockopt_label_get() -> mac_getsockopt_label()
	mac_getsockopt_peerlabel_get() -> mac_getsockopt_peerlabel()

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/uipc_socket.c#56 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac/mac_net.c#16 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mac.h#253 edit

Differences ...

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

@@ -1452,10 +1452,8 @@
 			    sizeof extmac);
 			if (error)
 				goto bad;
-
-			error = mac_setsockopt_label_set(
-			    sopt->sopt_td->td_ucred, so, &extmac);
-
+			error = mac_setsockopt_label(sopt->sopt_td->td_ucred,
+			    so, &extmac);
 #else
 			error = EOPNOTSUPP;
 #endif
@@ -1603,8 +1601,8 @@
 			    sizeof(extmac));
 			if (error)
 				return (error);
-			error = mac_getsockopt_label_get(
-			    sopt->sopt_td->td_ucred, so, &extmac);
+			error = mac_getsockopt_label(sopt->sopt_td->td_ucred,
+			    so, &extmac);
 			if (error)
 				return (error);
 			error = sooptcopyout(sopt, &extmac, sizeof extmac);
@@ -1618,7 +1616,7 @@
 			    sizeof(extmac));
 			if (error)
 				return (error);
-			error = mac_getsockopt_peerlabel_get(
+			error = mac_getsockopt_peerlabel(
 			    sopt->sopt_td->td_ucred, so, &extmac);
 			if (error)
 				return (error);

==== //depot/projects/trustedbsd/mac/sys/security/mac/mac_net.c#16 (text+ko) ====

@@ -994,8 +994,7 @@
 }
 
 int
-mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
-    struct mac *mac)
+mac_setsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac)
 {
 	struct label *intlabel;
 	char *buffer;
@@ -1044,8 +1043,7 @@
 }
 
 int
-mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
-    struct mac *mac)
+mac_getsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac)
 {
 	char *buffer, *elements;
 	int error;
@@ -1074,7 +1072,7 @@
 }
 
 int
-mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
+mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so,
     struct mac *mac)
 {
 	char *elements, *buffer;

==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#253 (text+ko) ====

@@ -424,15 +424,15 @@
 	    struct ucred *file_cred, struct vnode *vp);
 int	mac_check_vnode_write(struct ucred *active_cred,
 	    struct ucred *file_cred, struct vnode *vp);
-int	mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
+int	mac_getsockopt_label(struct ucred *cred, struct socket *so,
 	    struct mac *extmac);
-int	mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
+int	mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so,
 	    struct mac *extmac);
 int	mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
 	    struct ifnet *ifnet);
 int	mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
 	    struct ifnet *ifnet);
-int	mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
+int	mac_setsockopt_label(struct ucred *cred, struct socket *so,
 	    struct mac *extmac);
 int	mac_pipe_label_set(struct ucred *cred, struct pipe *pipe,
 	    struct label *label);
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