diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-11-16 18:25:20 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-11-16 18:25:20 +0000 |
commit | f9ad21ec5da3fd402f2c089b84ffa97d9b2f4067 (patch) | |
tree | d4e8642846ae9dad1446e84ff41dea25cd39312b | |
parent | 6aa1ea6e6184a401064b96982902f1beb186ee79 (diff) | |
download | FreeBSD-src-f9ad21ec5da3fd402f2c089b84ffa97d9b2f4067.zip FreeBSD-src-f9ad21ec5da3fd402f2c089b84ffa97d9b2f4067.tar.gz |
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()
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
-rw-r--r-- | sys/kern/uipc_socket.c | 12 | ||||
-rw-r--r-- | sys/security/mac/mac_framework.h | 6 | ||||
-rw-r--r-- | sys/security/mac/mac_net.c | 8 | ||||
-rw-r--r-- | sys/sys/mac.h | 6 |
4 files changed, 14 insertions, 18 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 84db1a9..4b924d5 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1452,10 +1452,8 @@ sosetopt(so, sopt) 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 @@ integer: 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 @@ integer: 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); diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 1cd3667..ff7ed95 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -332,15 +332,15 @@ int mac_check_vnode_stat(struct ucred *active_cred, 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); diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 5773b4e..4c040c8 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -886,8 +886,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr, } 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; @@ -925,8 +924,7 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so, } 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; @@ -955,7 +953,7 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so, } 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; diff --git a/sys/sys/mac.h b/sys/sys/mac.h index 1cd3667..ff7ed95 100644 --- a/sys/sys/mac.h +++ b/sys/sys/mac.h @@ -332,15 +332,15 @@ int mac_check_vnode_stat(struct ucred *active_cred, 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); |