PERFORCE change 106552 for review
Robert Watson
rwatson at FreeBSD.org
Sat Sep 23 07:08:49 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106552
Change 106552 by rwatson at rwatson_peppercorn on 2006/09/23 14:07:43
If no command line argument is specified to auditreduce(1), use
stdin. This was the documented behavior previously, but was not
actually implemented.
Be a bit more specific in the auditreduce(1) man page about what
to do with auditreduce's output.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/HISTORY#37 edit
.. //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.1#11 edit
.. //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#16 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/HISTORY#37 (text+ko) ====
@@ -7,6 +7,10 @@
occurs while processing the return token.
- getacfilesz(3) API added to read new audit_control(5) filesz setting,
which auditd(8) now sets the kernel audit trail rotation size to.
+- auditreduce(1) now uses stdin if no file names are specified on the command
+ line; this was the documented behavior previously, but it was not
+ implemented. Be more specific in auditreduce(1)'s examples section about
+ what might be done with the output of auditreduce.
OpenBSM 1.0 alpha 11
@@ -253,4 +257,4 @@
to support reloading of kernel event table.
- Allow comments in /etc/security configuration files.
-$P4: //depot/projects/trustedbsd/openbsm/HISTORY#36 $
+$P4: //depot/projects/trustedbsd/openbsm/HISTORY#37 $
==== //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.1#11 (text+ko) ====
@@ -25,7 +25,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.1#10 $
+.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.1#11 $
.\"
.Dd January 24, 2004
.Dt AUDITREDUCE 1
@@ -136,6 +136,11 @@
.Pp
.Nm
-m AUE_SETLOGIN /var/audit/20031016184719.20031017122634
+.Pp
+Output from the above command lines will typically be piped to a new trail
+file, or via standard output to the
+.Xr praudit 1
+command.
.Sh SEE ALSO
.Xr praudit 1 ,
.Xr audit_control 5 ,
==== //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#16 (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#15 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#16 $
*/
/*
@@ -84,7 +84,7 @@
usage(const char *msg)
{
fprintf(stderr, "%s\n", msg);
- fprintf(stderr, "Usage: auditreduce [options] audit-trail-file [....] \n");
+ fprintf(stderr, "Usage: auditreduce [options] [file ...]\n");
fprintf(stderr, "\tOptions are : \n");
fprintf(stderr, "\t-A : all records\n");
fprintf(stderr, "\t-a YYYYMMDD[HH[[MM[SS]]] : after date\n");
@@ -704,8 +704,12 @@
argv += optind;
argc -= optind;
- if (argc == 0)
- usage("Filename needed");
+ if (argc == 0) {
+ if (select_records(stdin) == -1)
+ errx(EXIT_FAILURE,
+ "Couldn't select records from stdin");
+ exit(EXIT_SUCCESS);
+ }
/*
* XXX: We should actually be merging records here.
More information about the trustedbsd-cvs
mailing list