summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/auditreduce/Makefile6
-rw-r--r--usr/src/cmd/auditreduce/main.c22
2 files changed, 19 insertions, 9 deletions
diff --git a/usr/src/cmd/auditreduce/Makefile b/usr/src/cmd/auditreduce/Makefile
index 9984ce57a6..1c39fe869f 100644
--- a/usr/src/cmd/auditreduce/Makefile
+++ b/usr/src/cmd/auditreduce/Makefile
@@ -24,7 +24,7 @@
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
TABLEDIR = ../praudit
@@ -44,8 +44,8 @@ LDLIBS += -lnsl -lbsm -lscf -ltsol
CERRWARN += $(CNOWARN_UNINIT)
CERRWARN += -_gcc=-Wno-parentheses
-# false positives / need cleanup
-SMOFF += indenting,no_if_block,strcpy_overflow
+# false positive
+SMOFF += strcpy_overflow
.KEEP_STATE:
diff --git a/usr/src/cmd/auditreduce/main.c b/usr/src/cmd/auditreduce/main.c
index 3137bd9e9c..910b5aaf7e 100644
--- a/usr/src/cmd/auditreduce/main.c
+++ b/usr/src/cmd/auditreduce/main.c
@@ -25,6 +25,10 @@
*/
/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
* The Secure SunOS audit reduction tool - auditreduce.
* Document SM0071 is the primary source of information on auditreduce.
*
@@ -247,11 +251,13 @@ mfork(audit_pcb_t *pcb, int nsp, int lo, int hi)
* Convert descriptors to streams.
*/
if ((pcbn->pcb_fpr = fdopen(fildes[0], "r")) == NULL) {
- perror(gettext("auditreduce: couldn't get read stream for pipe"));
+ perror(gettext("auditreduce: couldn't get read "
+ "stream for pipe"));
return (-1);
}
if ((pcbn->pcb_fpw = fdopen(fildes[1], "w")) == NULL) {
- perror(gettext("auditreduce: couldn't get write stream for pipe"));
+ perror(gettext("auditreduce: couldn't get "
+ "write stream for pipe"));
return (-1);
}
if ((procno = fork()) == -1) {
@@ -400,8 +406,10 @@ c_close(audit_pcb_t *pcb, int i)
for (j = 0; j <= i; j++) {
pcbt = &pcb->pcb_below[j];
if (fclose(pcbt->pcb_fpr) == EOF) {
- if (!f_quiet)
- perror(gettext("auditreduce: initial close on pipe failed"));
+ if (!f_quiet) {
+ perror(gettext("auditreduce: initial close "
+ "on pipe failed"));
+ }
}
/*
* Free the buffer allocated to hold incoming records.
@@ -426,8 +434,10 @@ static void
p_close(audit_pcb_t *pcbn)
{
if (fclose(pcbn->pcb_fpw) == EOF) {
- if (!f_quiet)
- perror(gettext("auditreduce: close for write pipe failed"));
+ if (!f_quiet) {
+ perror(gettext("auditreduce: close for write "
+ "pipe failed"));
+ }
}
}