Home | History | Annotate | Download | only in common
      1     0    stevel /*
      2     0    stevel  * CDDL HEADER START
      3     0    stevel  *
      4     0    stevel  * The contents of this file are subject to the terms of the
      5  2827  tz204579  * Common Development and Distribution License (the "License").
      6  2827  tz204579  * You may not use this file except in compliance with the License.
      7     0    stevel  *
      8     0    stevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9     0    stevel  * or http://www.opensolaris.org/os/licensing.
     10     0    stevel  * See the License for the specific language governing permissions
     11     0    stevel  * and limitations under the License.
     12     0    stevel  *
     13     0    stevel  * When distributing Covered Code, include this CDDL HEADER in each
     14     0    stevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15     0    stevel  * If applicable, add the following below this CDDL HEADER, with the
     16     0    stevel  * fields enclosed by brackets "[]" replaced with your own identifying
     17     0    stevel  * information: Portions Copyright [yyyy] [name of copyright owner]
     18     0    stevel  *
     19     0    stevel  * CDDL HEADER END
     20     0    stevel  */
     21     0    stevel /*
     22  9083       Jan  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23     0    stevel  * Use is subject to license terms.
     24     0    stevel  */
     25     0    stevel 
     26     0    stevel #include <sys/syscall.h>
     27     0    stevel #include <sys/types.h>
     28     0    stevel #include <bsm/audit.h>
     29     0    stevel #include <sys/socket.h>
     30     0    stevel #include <sys/param.h>
     31     0    stevel 
     32     0    stevel const char *bsm_dom = TEXT_DOMAIN;
     33     0    stevel 
     34     0    stevel int
     35     0    stevel auditdoor(int fd)
     36     0    stevel {
     37     0    stevel 	return (syscall(SYS_auditsys, BSM_AUDITDOOR, fd));
     38     0    stevel }
     39     0    stevel 
     40     0    stevel 
     41     0    stevel int
     42     0    stevel audit(char *record, int length)
     43     0    stevel {
     44     0    stevel 	return (syscall(SYS_auditsys, BSM_AUDIT, record, length));
     45     0    stevel }
     46     0    stevel 
     47     0    stevel 
     48     0    stevel int
     49     0    stevel getauid(au_id_t *auid)
     50     0    stevel {
     51     0    stevel 	return (syscall(SYS_auditsys, BSM_GETAUID, auid));
     52     0    stevel }
     53     0    stevel 
     54     0    stevel 
     55     0    stevel int
     56     0    stevel setauid(au_id_t *auid)
     57     0    stevel {
     58     0    stevel 	return (syscall(SYS_auditsys, BSM_SETAUID, auid));
     59     0    stevel }
     60     0    stevel 
     61     0    stevel 
     62     0    stevel int
     63     0    stevel getaudit(auditinfo_t *ai)
     64     0    stevel {
     65     0    stevel 	return (syscall(SYS_auditsys, BSM_GETAUDIT, ai));
     66     0    stevel }
     67     0    stevel 
     68     0    stevel int
     69     0    stevel getaudit_addr(auditinfo_addr_t *ai, int len)
     70     0    stevel {
     71     0    stevel 	return (syscall(SYS_auditsys, BSM_GETAUDIT_ADDR, ai, len));
     72     0    stevel }
     73     0    stevel 
     74     0    stevel 
     75     0    stevel int
     76     0    stevel setaudit(auditinfo_t *ai)
     77     0    stevel {
     78     0    stevel 	return (syscall(SYS_auditsys, BSM_SETAUDIT, ai));
     79     0    stevel }
     80     0    stevel 
     81     0    stevel 
     82     0    stevel int
     83     0    stevel setaudit_addr(auditinfo_addr_t *ai, int len)
     84     0    stevel {
     85     0    stevel 	return (syscall(SYS_auditsys, BSM_SETAUDIT_ADDR, ai, len));
     86     0    stevel }
     87     0    stevel 
     88     0    stevel 
     89     0    stevel int
     90     0    stevel auditon(int cmd, caddr_t data, int length)
     91     0    stevel {
     92     0    stevel 	return (syscall(SYS_auditsys, BSM_AUDITCTL, cmd, data, length));
     93     0    stevel }
     94