From owner-p4-projects@FreeBSD.ORG Wed Aug 12 21:40:31 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 95DF31065672; Wed, 12 Aug 2009 21:40:31 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 522F5106564A for ; Wed, 12 Aug 2009 21:40:31 +0000 (UTC) (envelope-from marinosi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 420B08FC56 for ; Wed, 12 Aug 2009 21:40:31 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CLeVMS061001 for ; Wed, 12 Aug 2009 21:40:31 GMT (envelope-from marinosi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7CLeVFq060999 for perforce@freebsd.org; Wed, 12 Aug 2009 21:40:31 GMT (envelope-from marinosi@FreeBSD.org) Date: Wed, 12 Aug 2009 21:40:31 GMT Message-Id: <200908122140.n7CLeVFq060999@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marinosi@FreeBSD.org using -f From: Ilias Marinos To: Perforce Change Reviews Cc: Subject: PERFORCE change 167263 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, 12 Aug 2009 21:40:32 -0000 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;