dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libbsm / common / bsm.c
blob6b077b6d60f23abad58b9501fdc48b686c7a7e77
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <sys/syscall.h>
27 #include <sys/types.h>
28 #include <bsm/audit.h>
29 #include <sys/socket.h>
30 #include <sys/param.h>
32 const char *bsm_dom = TEXT_DOMAIN;
34 int
35 auditdoor(int fd)
37 return (syscall(SYS_auditsys, BSM_AUDITDOOR, fd));
41 int
42 audit(char *record, int length)
44 return (syscall(SYS_auditsys, BSM_AUDIT, record, length));
48 int
49 getauid(au_id_t *auid)
51 return (syscall(SYS_auditsys, BSM_GETAUID, auid));
55 int
56 setauid(au_id_t *auid)
58 return (syscall(SYS_auditsys, BSM_SETAUID, auid));
62 int
63 getaudit(auditinfo_t *ai)
65 return (syscall(SYS_auditsys, BSM_GETAUDIT, ai));
68 int
69 getaudit_addr(auditinfo_addr_t *ai, int len)
71 return (syscall(SYS_auditsys, BSM_GETAUDIT_ADDR, ai, len));
75 int
76 setaudit(auditinfo_t *ai)
78 return (syscall(SYS_auditsys, BSM_SETAUDIT, ai));
82 int
83 setaudit_addr(auditinfo_addr_t *ai, int len)
85 return (syscall(SYS_auditsys, BSM_SETAUDIT_ADDR, ai, len));
89 int
90 auditon(int cmd, caddr_t data, int length)
92 return (syscall(SYS_auditsys, BSM_AUDITCTL, cmd, data, length));