7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 /*
30 * MAC Services Module
31 */
32
33 #include <sys/types.h>
34 #include <sys/conf.h>
35 #include <sys/stat.h>
36 #include <sys/stream.h>
37 #include <sys/modctl.h>
38 #include <sys/atomic.h>
39
40 #include <sys/mac.h>
41 #include <sys/mac_impl.h>
42
43 static struct modlmisc i_mac_modlmisc = {
44 &mod_miscops,
45 MAC_INFO
46 };
47
48 static struct modlinkage i_mac_modlinkage = {
49 MODREV_1,
50 &i_mac_modlmisc,
51 NULL
52 };
53
54 /*
55 * Module initialization functions.
56 */
57
58 static void
59 i_mac_mod_init(void)
60 {
61 mac_init();
62 }
63
64 static int
65 i_mac_mod_fini(void)
66 {
67 int err;
68
69 if ((err = mac_fini()) != 0)
70 return (err);
71
|
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * MAC Services Module
29 */
30
31 #include <sys/types.h>
32 #include <sys/conf.h>
33 #include <sys/stat.h>
34 #include <sys/stream.h>
35 #include <sys/modctl.h>
36 #include <sys/atomic.h>
37
38 #include <sys/mac.h>
39 #include <sys/mac_impl.h>
40
41 static struct modlmisc i_mac_modlmisc = {
42 &mod_miscops,
43 MAC_INFO
44 };
45
46 static struct modlinkage i_mac_modlinkage = {
47 MODREV_1,
48 { &i_mac_modlmisc,
49 NULL }
50 };
51
52 /*
53 * Module initialization functions.
54 */
55
56 static void
57 i_mac_mod_init(void)
58 {
59 mac_init();
60 }
61
62 static int
63 i_mac_mod_fini(void)
64 {
65 int err;
66
67 if ((err = mac_fini()) != 0)
68 return (err);
69
|