From owner-p4-projects@FreeBSD.ORG Wed Sep 21 09:32:19 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA28316A421; Wed, 21 Sep 2005 09:32:18 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF70E16A41F for ; Wed, 21 Sep 2005 09:32:18 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A32C43D46 for ; Wed, 21 Sep 2005 09:32:18 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8L9WIf5037240 for ; Wed, 21 Sep 2005 09:32:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8L9WIK4037237 for perforce@freebsd.org; Wed, 21 Sep 2005 09:32:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 21 Sep 2005 09:32:18 GMT Message-Id: <200509210932.j8L9WIK4037237@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84036 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 09:32:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=84036 Change 84036 by rwatson@rwatson_zoo on 2005/09/21 09:31:17 Break out make_dev() call from audit_init() into audit_cdev_init(). We need to initialize the audit event system before we start creating processes, but we can't create the device node /dev/audit until after devfs is initialized. Register audit_cdev_init to run during normal device driver registration. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#29 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#29 (text+ko) ==== @@ -784,12 +784,20 @@ panic("audit_init: kthread_create returned %d", error); TAILQ_INIT(&trigger_list); +} + +static void +audit_cdev_init(void *unused) +{ + /* Create the special device file */ audit_dev = make_dev(&audit_cdevsw, 0, UID_ROOT, GID_KMEM, 0600, AUDITDEV_FILENAME); } SYSINIT(audit_init, SI_SUB_AUDIT, SI_ORDER_FIRST, audit_init, NULL) +SYSINIT(audit_cdev_init, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, audit_cdev_init, + NULL) /* * audit_rotate_vnode() is called by a user or kernel thread to configure or