From owner-p4-projects@FreeBSD.ORG Sat Jul 14 17:09:41 2007 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 48CDF16A468; Sat, 14 Jul 2007 17:09:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 264A816A420 for ; Sat, 14 Jul 2007 17:09:41 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1475513C471 for ; Sat, 14 Jul 2007 17:09:41 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6EH9eEv020729 for ; Sat, 14 Jul 2007 17:09:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6EH9eaK020725 for perforce@freebsd.org; Sat, 14 Jul 2007 17:09:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 14 Jul 2007 17:09:40 GMT Message-Id: <200707141709.l6EH9eaK020725@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 123491 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: Sat, 14 Jul 2007 17:09:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=123491 Change 123491 by rwatson@rwatson_peppercorn on 2007/07/14 17:08:53 Apply patch from bin/113534 correctings bugs due to not zeroing tm before passing it to strptime(3), which in the presence of a partial time string, will only initialize fields specified by the user. Submitted by: "Alex Samorukov" Affected files ... .. //depot/projects/trustedbsd/openbsm/HISTORY#55 edit .. //depot/projects/trustedbsd/openbsm/README#24 edit .. //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#19 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/HISTORY#55 (text+ko) ==== @@ -6,6 +6,8 @@ - Synchronized audit event list to Solaris, picking up the *at(2) system call definitions, now required for FreeBSD and Linux. Added additional events for *at(2) system calls not present in Solaris. +- Bugs in auditreduce(8) fixed allowing partial date strings to be used in + filtering events. OpenBSM 1.0 alpha 14 @@ -293,4 +295,4 @@ to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/HISTORY#54 $ +$P4: //depot/projects/trustedbsd/openbsm/HISTORY#55 $ ==== //depot/projects/trustedbsd/openbsm/README#24 (text+ko) ==== @@ -89,6 +89,7 @@ Ruslan Ermilov Martin Voros Diego Giagio + Alex Samorukov In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel Software's FlexeLint tool were used to identify a number of bugs in the @@ -110,4 +111,4 @@ http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#23 $ +$P4: //depot/projects/trustedbsd/openbsm/README#24 $ ==== //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#19 (text+ko) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#18 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#19 $ */ /* @@ -629,6 +629,7 @@ usage("d is exclusive with a and b"); } SETOPT(opttochk, OPT_a); + bzero(&tm, sizeof(tm)); strptime(optarg, "%Y%m%d%H%M%S", &tm); strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", &tm); @@ -641,6 +642,7 @@ usage("d is exclusive with a and b"); } SETOPT(opttochk, OPT_b); + bzero(&tm, sizeof(tm)); strptime(optarg, "%Y%m%d%H%M%S", &tm); strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", &tm); @@ -661,6 +663,7 @@ OPT_a)) usage("'d' is exclusive with 'a' and 'b'"); SETOPT(opttochk, OPT_d); + bzero(&tm, sizeof(tm)); strptime(optarg, "%Y%m%d", &tm); strftime(timestr, sizeof(timestr), "%Y%m%d", &tm); /* fprintf(stderr, "Time converted = %s\n", timestr); */