PERFORCE change 104268 for review
Todd Miller
millert at FreeBSD.org
Wed Aug 16 18:39:57 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104268
Change 104268 by millert at millert_macbook on 2006/08/16 18:38:57
Use struct xsocket, not struct socket.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#2 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#3 (text+ko) ====
@@ -1464,7 +1464,7 @@
* Labeling event operations: network objects.
*/
static void
-mac_mls_create_socket(struct ucred *cred, struct socket *so,
+mac_mls_create_socket(struct ucred *cred, struct xsocket *so,
struct label *solabel)
{
struct mac_mls *source, *dest;
@@ -1477,8 +1477,8 @@
static void
mac_mls_create_socket_from_socket(
- struct socket *oldsock, struct label *oldlabel,
- struct socket *newsock, struct label *newlabel)
+ struct xsocket *oldsock, struct label *oldlabel,
+ struct xsocket *newsock, struct label *newlabel)
{
struct mac_mls *source, *dest;
@@ -1493,7 +1493,7 @@
}
static void
-mac_mls_relabel_socket(struct ucred *cred, struct socket *so,
+mac_mls_relabel_socket(struct ucred *cred, struct xsocket *so,
struct label *oldlabel, struct label *newlabel)
{
struct mac_mls *source, *dest;
@@ -1536,7 +1536,7 @@
}
static void
-mac_mls_create_mbuf_from_socket(struct socket *so, struct label *socketlabel,
+mac_mls_create_mbuf_from_socket(struct xsocket *so, struct label *socketlabel,
struct mbuf *m, struct label *mbuflabel)
{
struct mac_mls *source, *dest;
@@ -1556,7 +1556,7 @@
static void
mac_mls_set_socket_peer_from_mbuf(struct mbuf *mbuf, struct label *mbuflabel,
- struct socket *socket, struct label *socketpeerlabel)
+ struct xsocket *socket, struct label *socketpeerlabel)
{
struct mac_mls *source, *dest;
@@ -1575,8 +1575,8 @@
}
static void
-mac_mls_set_socket_peer_from_socket(struct socket *oldsocket,
- struct label *oldsocketlabel, struct socket *newsocket,
+mac_mls_set_socket_peer_from_socket(struct xsocket *oldsocket,
+ struct label *oldsocketlabel, struct xsocket *newsocket,
struct label *newsocketpeerlabel)
{
struct mac_mls *source, *dest;
@@ -2236,7 +2236,7 @@
}
static int
-mac_mls_check_socket_accept(struct ucred *cred, struct socket *socket,
+mac_mls_check_socket_accept(struct ucred *cred, struct xsocket *socket,
struct label *socklabel)
{
struct mac_mls *subj, *obj;
@@ -2254,7 +2254,7 @@
}
static int
-mac_mls_check_socket_bind(struct ucred *cred, struct socket *socket,
+mac_mls_check_socket_bind(struct ucred *cred, struct xsocket *socket,
struct label *socklabel, struct sockaddr *addr)
{
struct mac_mls *subj, *obj;
@@ -2272,7 +2272,7 @@
}
static int
-mac_mls_check_socket_connect(struct ucred *cred, struct socket *socket,
+mac_mls_check_socket_connect(struct ucred *cred, struct xsocket *socket,
struct label *socklabel, struct sockaddr *addr)
{
struct mac_mls *subj, *obj;
@@ -2297,7 +2297,7 @@
}
static int
-mac_mls_check_socket_deliver(struct socket *so, struct label *so_label,
+mac_mls_check_socket_deliver(struct xsocket *so, struct label *so_label,
struct mbuf *m, struct label *m_label)
{
struct mac_mls *src, *dest;
@@ -2324,7 +2324,7 @@
static int
mac_mls_check_socket_kqfilter(struct ucred *cred, struct knote *kn,
- struct socket *so, struct label *solabel)
+ struct xsocket *so, struct label *solabel)
{
struct mac_mls *subj, *obj;
@@ -2338,7 +2338,7 @@
}
static int
-mac_mls_check_socket_listen(struct ucred *cred, struct socket *socket,
+mac_mls_check_socket_listen(struct ucred *cred, struct xsocket *socket,
struct label *socklabel)
{
struct mac_mls *subj, *obj;
@@ -2356,7 +2356,7 @@
}
static int
-mac_mls_check_socket_receive(struct ucred *cred, struct socket *socket,
+mac_mls_check_socket_receive(struct ucred *cred, struct xsocket *socket,
struct label *socklabel)
{
struct mac_mls *subj, *obj;
@@ -2374,7 +2374,7 @@
}
static int
-mac_mls_check_socket_relabel(struct ucred *cred, struct socket *so,
+mac_mls_check_socket_relabel(struct ucred *cred, struct xsocket *so,
struct label *socklabel, struct label *newlabel)
{
struct mac_mls *subj, *obj, *new;
@@ -2432,7 +2432,7 @@
}
static int
-mac_mls_check_socket_select(struct ucred *cred, struct socket *so,
+mac_mls_check_socket_select(struct ucred *cred, struct xsocket *so,
struct label *socklabel, int which)
{
struct mac_mls *subj, *obj;
@@ -2450,7 +2450,7 @@
}
static int
-mac_mls_check_socket_send(struct ucred *cred, struct socket *so,
+mac_mls_check_socket_send(struct ucred *cred, struct xsocket *so,
struct label *socklabel)
{
struct mac_mls *subj, *obj;
@@ -2468,7 +2468,7 @@
}
static int
-mac_mls_check_socket_stat(struct ucred *cred, struct socket *so,
+mac_mls_check_socket_stat(struct ucred *cred, struct xsocket *so,
struct label *socklabel)
{
struct mac_mls *subj, *obj;
==== //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#2 (text+ko) ====
@@ -2328,7 +2328,7 @@
static void
-mac_test_create_socket(struct ucred *cred, struct socket *so,
+mac_test_create_socket(struct ucred *cred, struct xsocket *so,
struct label *solabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2343,8 +2343,8 @@
static void
-mac_test_create_socket_from_socket(struct socket *oldsock,
- struct label *oldlabel, struct socket *newsock,
+mac_test_create_socket_from_socket(struct xsocket *oldsock,
+ struct label *oldlabel, struct xsocket *newsock,
struct label *newlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2393,7 +2393,7 @@
}
static void
-mac_test_relabel_socket(struct ucred *cred, struct socket *so,
+mac_test_relabel_socket(struct ucred *cred, struct xsocket *so,
struct label *oldlabel, struct label *newlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2408,8 +2408,8 @@
}
static void
-mac_test_set_socket_peer_from_socket(struct socket *oldsocket,
- struct label *oldsocketlabel, struct socket *newsocket,
+mac_test_set_socket_peer_from_socket(struct xsocket *oldsocket,
+ struct label *oldsocketlabel, struct xsocket *newsocket,
struct label *newsocketpeerlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2435,7 +2435,7 @@
}
static int
-mac_test_check_socket_accept(struct ucred *cred, struct socket *so,
+mac_test_check_socket_accept(struct ucred *cred, struct xsocket *so,
struct label *so_label)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2450,7 +2450,7 @@
}
static int
-mac_test_check_socket_bind(struct ucred *cred, struct socket *socket,
+mac_test_check_socket_bind(struct ucred *cred, struct xsocket *socket,
struct label *socketlabel, struct sockaddr *sockaddr)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2465,7 +2465,7 @@
}
static int
-mac_test_check_socket_connect(struct ucred *cred, struct socket *socket,
+mac_test_check_socket_connect(struct ucred *cred, struct xsocket *socket,
struct label *socketlabel, struct sockaddr *sockaddr)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2493,7 +2493,7 @@
static int
mac_test_check_socket_kqfilter(struct ucred *cred, struct knote *kn,
- struct socket *so, struct label *socklabel)
+ struct xsocket *so, struct label *socklabel)
{
CHECKNULL(cred);
@@ -2507,7 +2507,7 @@
}
static int
-mac_test_check_socket_listen(struct ucred *cred, struct socket *socket,
+mac_test_check_socket_listen(struct ucred *cred, struct xsocket *socket,
struct label *socketlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2522,7 +2522,7 @@
}
static int
-mac_test_check_socket_receive(struct ucred *cred, struct socket *so,
+mac_test_check_socket_receive(struct ucred *cred, struct xsocket *so,
struct label *socketlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2538,7 +2538,7 @@
static int
-mac_test_check_socket_relabel(struct ucred *cred, struct socket *socket,
+mac_test_check_socket_relabel(struct ucred *cred, struct xsocket *socket,
struct label *oldlabel, struct label *newlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2554,7 +2554,7 @@
}
static int
-mac_test_check_socket_select(struct ucred *cred, struct socket *so,
+mac_test_check_socket_select(struct ucred *cred, struct xsocket *so,
struct label *socketlabel, int which)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2569,7 +2569,7 @@
}
static int
-mac_test_check_socket_send(struct ucred *cred, struct socket *so,
+mac_test_check_socket_send(struct ucred *cred, struct xsocket *so,
struct label *socketlabel)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2584,7 +2584,7 @@
}
static int
-mac_test_check_socket_stat(struct ucred *cred, struct socket *so, struct label *solabel)
+mac_test_check_socket_stat(struct ucred *cred, struct xsocket *so, struct label *solabel)
{
// KASSERT(thread_funnel_get() == network_flock,
// "mac_test_check_socket_stat: not holding the network funnel!");
@@ -2608,7 +2608,7 @@
}
static int
-mac_test_check_socket_deliver(struct socket *so, struct label *so_label,
+mac_test_check_socket_deliver(struct xsocket *so, struct label *so_label,
struct mbuf *m, struct label *m_label)
{
// KASSERT(thread_funnel_get() == network_flock,
@@ -2639,7 +2639,7 @@
static void
mac_test_set_socket_peer_from_mbuf(struct mbuf *mbuf, struct label *mbuflabel,
- struct socket *socket, struct label *socketpeerlabel)
+ struct xsocket *socket, struct label *socketpeerlabel)
{
CHECKNULL(mbuf);
CHECKNULL(socket);
@@ -2681,7 +2681,7 @@
}
static void
-mac_test_create_mbuf_from_socket(struct socket *so, struct label *so_label,
+mac_test_create_mbuf_from_socket(struct xsocket *so, struct label *so_label,
struct mbuf *m, struct label *m_label)
{
// KASSERT(thread_funnel_get() == network_flock,
More information about the trustedbsd-cvs
mailing list