equal
deleted
inserted
replaced
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 |
21 |
22 /* |
22 /* |
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. |
24 * Use is subject to license terms. |
25 */ |
25 */ |
26 |
26 |
27 #include <sys/types.h> |
27 #include <sys/types.h> |
28 #include <sys/t_lock.h> |
28 #include <sys/t_lock.h> |
34 #include <sys/debug.h> |
34 #include <sys/debug.h> |
35 #include <sys/errno.h> |
35 #include <sys/errno.h> |
36 #include <sys/stropts.h> |
36 #include <sys/stropts.h> |
37 #include <sys/cmn_err.h> |
37 #include <sys/cmn_err.h> |
38 #include <sys/sysmacros.h> |
38 #include <sys/sysmacros.h> |
|
39 #include <sys/policy.h> |
39 |
40 |
40 #include <sys/filio.h> |
41 #include <sys/filio.h> |
41 #include <sys/sockio.h> |
42 #include <sys/sockio.h> |
42 |
43 |
43 #include <sys/project.h> |
44 #include <sys/project.h> |
147 |
148 |
148 mutex_exit(&so->so_lock); |
149 mutex_exit(&so->so_lock); |
149 |
150 |
150 return (0); |
151 return (0); |
151 } |
152 } |
|
153 |
|
154 if ((error = secpolicy_basic_net_access(cr)) != 0) |
|
155 return (error); |
152 |
156 |
153 upcalls = &sosdp_sock_upcalls; |
157 upcalls = &sosdp_sock_upcalls; |
154 |
158 |
155 so->so_proto_handle = (sock_lower_handle_t)sdp_create(so, NULL, |
159 so->so_proto_handle = (sock_lower_handle_t)sdp_create(so, NULL, |
156 so->so_family, SDP_CAN_BLOCK, upcalls, &sbl, cr, &error); |
160 so->so_family, SDP_CAN_BLOCK, upcalls, &sbl, cr, &error); |