svc-auditd revision 7c478bd95313f5f23a4c958a745db2134aa03244
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# CDDL HEADER START
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# The contents of this file are subject to the terms of the
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Common Development and Distribution License, Version 1.0 only
91e8651b6e3acf77c0fc51febe70b94afcd81b7dZbigniew Jędrzejewski-Szmek# (the "License"). You may not use this file except in compliance
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# with the License.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# or http://www.opensolaris.org/os/licensing.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# See the License for the specific language governing permissions
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# and limitations under the License.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# When distributing Covered Code, include this CDDL HEADER in each
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# If applicable, add the following below this CDDL HEADER, with the
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# fields enclosed by brackets "[]" replaced with your own identifying
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# information: Portions Copyright [yyyy] [name of copyright owner]
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# CDDL HEADER END
b5a223bfcf2ebcf374973b29870a5e80fb42b8beZbigniew Jędrzejewski-Szmek# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Use is subject to license terms.
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# ident "%Z%%M% %I% %E% SMI"
96bd03d5b8d5d04fc8037c03a43bb5b148cc1e29Zbigniew Jędrzejewski-Szmek# if the audit state is "disabled" auditconfig returns
96bd03d5b8d5d04fc8037c03a43bb5b148cc1e29Zbigniew Jędrzejewski-Szmek# non-zero exit status unless the c2audit module is loaded;
652e737517bbbae692923246aeb687e2d1f314efZbigniew Jędrzejewski-Szmek# if c2audit is loaded, "disabled" becomes "noaudit" early
652e737517bbbae692923246aeb687e2d1f314efZbigniew Jędrzejewski-Szmek# in the boot cycle and "auditing" only after auditd starts.
946f1825751919a176cd0039002a514de0c9c70fHannes ReineckeAUDITCOND=`$AUDITCONFIG -getcond 2> /dev/null`
71c474864cef9be433adb2adba2085786cda829aLennart Poettering # The decision whether to start
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers # auditing is driven by bsmconv / bsmunconv
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera /usr/sbin/svcadm mark maintenance system/auditd
74b91131ed09850ed487a2f7849147ff6f80194dLennart Poettering# In a non-global zone, auditd is started only if the "perzone"
114a50f898a89bd7784c215ac5df95ec8c45a905Lennart Poettering# audit policy has been set.
114a50f898a89bd7784c215ac5df95ec8c45a905Lennart Poettering echo `$AUDITCONFIG -getpolicy` | grep perzone > /dev/null
251cc8194228ac86c9a7a4c75a54a94cea2095c7Lennart Poettering echo "$0: auditd is not configured to run in a local zone"
4b2d99d9f4258a29f0bf8b1a78d17836e75bc378Lennart Poettering# daemon forks, parent exits when child says it's ready