Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2005 09:32:18 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 84036 for review
Message-ID:  <200509210932.j8L9WIK4037237@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509210932.j8L9WIK4037237>