usr/src/cmd/smserverd/myaudit.c
changeset 1676 37f4a3e2bd99
parent 0 68f95e015346
child 2425 9274196fea31
equal deleted inserted replaced
1675:5791e75682d0 1676:37f4a3e2bd99
     1 /*
     1 /*
     2  * CDDL HEADER START
     2  * CDDL HEADER START
     3  *
     3  *
     4  * The contents of this file are subject to the terms of the
     4  * The contents of this file are subject to the terms of the
     5  * Common Development and Distribution License, Version 1.0 only
     5  * Common Development and Distribution License (the "License").
     6  * (the "License").  You may not use this file except in compliance
     6  * You may not use this file except in compliance with the License.
     7  * with the License.
       
     8  *
     7  *
     9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    10  * or http://www.opensolaris.org/os/licensing.
     9  * or http://www.opensolaris.org/os/licensing.
    11  * See the License for the specific language governing permissions
    10  * See the License for the specific language governing permissions
    12  * and limitations under the License.
    11  * and limitations under the License.
    18  * information: Portions Copyright [yyyy] [name of copyright owner]
    17  * information: Portions Copyright [yyyy] [name of copyright owner]
    19  *
    18  *
    20  * CDDL HEADER END
    19  * CDDL HEADER END
    21  */
    20  */
    22 /*
    21 /*
    23  * Copyright 2001-2002 Sun Microsystems, Inc.
    22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    24  * All rights reserved.
       
    25  * Use is subject to license terms.
    23  * Use is subject to license terms.
    26  */
    24  */
    27 
    25 
    28 #pragma ident	"%Z%%M%	%I%	%E% SMI"
    26 #pragma ident	"%Z%%M%	%I%	%E% SMI"
    29 
    27 
    38 #include <sys/types.h>
    36 #include <sys/types.h>
    39 #include <string.h>
    37 #include <string.h>
    40 #include <unistd.h>
    38 #include <unistd.h>
    41 #include <stdlib.h>
    39 #include <stdlib.h>
    42 #include <sys/smedia.h>
    40 #include <sys/smedia.h>
       
    41 #include <tsol/label.h>
    43 #include "smserver.h"
    42 #include "smserver.h"
    44 #include <bsm/audit.h>
    43 #include <bsm/audit.h>
    45 #include <bsm/libbsm.h>
    44 #include <bsm/libbsm.h>
    46 #include <bsm/audit_uevents.h>
    45 #include <bsm/audit_uevents.h>
    47 #include <bsm/audit_record.h>
    46 #include <bsm/audit_record.h>
   219 		(void) memset(grplst, 0, sizeof (grplst));
   218 		(void) memset(grplst, 0, sizeof (grplst));
   220 		if ((ng = getgroups(NGROUPS_UMAX, grplst))) {
   219 		if ((ng = getgroups(NGROUPS_UMAX, grplst))) {
   221 			(void) au_write(ad, au_to_newgroups(ng, grplst));
   220 			(void) au_write(ad, au_to_newgroups(ng, grplst));
   222 		}
   221 		}
   223 	}
   222 	}
       
   223 
       
   224 	if (is_system_labeled())
       
   225 		(void) au_write(ad, au_to_mylabel());
       
   226 
   224 	if (strlen(door_dp->audit_text) != 0) {
   227 	if (strlen(door_dp->audit_text) != 0) {
   225 		(void) au_write(ad, au_to_text(door_dp->audit_text));
   228 		(void) au_write(ad, au_to_text(door_dp->audit_text));
   226 	}
   229 	}
   227 	if (strlen(door_dp->audit_text1) != 0) {
   230 	if (strlen(door_dp->audit_text1) != 0) {
   228 		(void) au_write(ad, au_to_text(door_dp->audit_text1));
   231 		(void) au_write(ad, au_to_text(door_dp->audit_text1));