Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 2009 21:40:31 GMT
From:      Ilias Marinos <marinosi@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 167263 for review
Message-ID:  <200908122140.n7CLeVFq060999@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167263

Change 167263 by marinosi@marinosi_redrum on 2009/08/12 21:40:24

	- Fixed a leftover condition that was preventing some auditon_slice() 
	commands to run.
	- Removed as_dev_name from struct audit_slice. Audit slices special 
	device nodes should have the same name with the slice itself.

Affected files ...

.. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit.c#20 edit
.. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.c#8 edit
.. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.h#15 edit

Differences ...

==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit.c#20 (text) ====

@@ -723,19 +723,27 @@
 	 */
 	as_ptr = as;
 
+
+	uprintf("audit_slice_create: Calling audit_slice_init()\n");
 	/* Initialize the base slice */
 	audit_slice_init(as, name);
 
+	uprintf("audit_slice_create: Returned from audit_slice_init()\n");
+
 	/*
 	 * XXXRW: Possibly start worker before creating the device?
 	 * FIXED.
 	 */
 
 	/* Start audit worker thread. */
+	uprintf("audit_slice_create: Calling audit_worker_start()\n");
 	audit_worker_start(as);
+	uprintf("audit_slice_create: Returned from audit_worker_start()\n");
 
 	/* Create the special device node */
+	uprintf("audit_slice_create: Calling audit_slice_cdev_init()\n");
 	audit_slice_cdev_init(as);
+	uprintf("audit_slice_create: Returned from audit_slice_cdev_init()\n");
 
 	/* Insert the slice on the list */
 	TAILQ_INSERT_TAIL(&audit_slice_q, as, as_q);
@@ -1371,8 +1379,6 @@
 	 * function.
 	 */
 	case A_CREATESLICE:
-		if (length != sizeof(udata.au_slice))
-			return (EINVAL);
 		/* We shouldn't call this command for base slice! */
 		if (as == audit_base_slice)
 			return (EINVAL);
@@ -1383,18 +1389,12 @@
 		break;
 
 	case A_UPDATESLICE:
-		if (length != sizeof(udata.au_slice))
-			return (EINVAL);
 		return (0);
 
 	case A_GETSLICE:
-		if (length != sizeof(udata.au_slice))
-			return (EINVAL);
 		return (0);
 
 	case A_REMOVESLICE:
-		if (length != sizeof(udata.au_slice))
-			return (EINVAL);
 		/* We cannot remove base slice! */
 		if (as == audit_base_slice)
 			return (EINVAL);

==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.c#8 (text+ko) ====

@@ -265,7 +265,7 @@
 
 	/* Create the special device file. */
 	as->as_dev = make_dev(&audit_slice_cdevsw, as->unit, as->uid, as->gid, 
-			as->perms, "%s", as->as_dev_name);
+			as->perms, "%s", as->as_name);
 }
 
 /* 

==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.h#15 (text+ko) ====

@@ -148,9 +148,9 @@
 	/*
 	 * Applications need their slice device to submit their audit
 	 * records.  Device specific variables here.
+	 * Device name will be the same as slice name.
 	 */
 	struct cdev			*as_dev;
-	char				as_dev_name[AUDIT_DEV_NAME_LEN];
 	int				unit;
 	uid_t				uid;
 	gid_t				gid;



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