From owner-cvs-src-old@FreeBSD.ORG Wed Feb 25 12:00:24 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C0AB1065799 for ; Wed, 25 Feb 2009 12:00:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 32E8F8FC14 for ; Wed, 25 Feb 2009 12:00:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n1PC0OUV049590 for ; Wed, 25 Feb 2009 12:00:24 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n1PC0OD5049589 for cvs-src-old@freebsd.org; Wed, 25 Feb 2009 12:00:24 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200902251200.n1PC0OD5049589@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Wed, 25 Feb 2009 12:00:15 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/security/audit audit_pipe.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2009 12:00:25 -0000 rwatson 2009-02-25 12:00:15 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/security/audit audit_pipe.c Log: SVN rev 189032 on 2009-02-25 12:00:15Z by rwatson Merge r184508 from head to stable/7: Historically, /dev/auditpipe has allows only whole records to be read via read(2), which meant that records longer than the buffer passed to read(2) were dropped. Instead take the approach of allowing partial reads to be continued across multiple system calls more in the style of streaming character device. This means retaining a record on the per-pipe queue in a partially read state, so maintain a current offset into the record. Keep the record on the queue during a read, so add a new lock, ap_sx, to serialize removal of records from the queue by either read(2) or ioctl(2) requesting a pipe flush. Modify the kqueue handler to return bytes left in the current record rather than simply the size of the current record. It is now possible to use praudit, which used the standard FILE * buffer sizes, to track much larger record sizes from /dev/auditpipe, such as very long command lines to execve(2). Sponsored by: Apple, Inc. Revision Changes Path 1.11.2.8 +86 -58 src/sys/security/audit/audit_pipe.c