From d124107051bf11015b480cc60979ce587bed854a Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 07:55:50 +0000 Subject: Prepare for a new update Reverting patches so we can apply the latest update and changes can be seen in the spec file and sources. --- diff --git a/audisp/plugins/syslog/audisp-syslog.c b/audisp/plugins/syslog/audisp-syslog.c index 9daa021..2515e0b 100644 --- a/audisp/plugins/syslog/audisp-syslog.c +++ b/audisp/plugins/syslog/audisp-syslog.c @@ -181,7 +181,7 @@ static inline void write_syslog(char *s) mptr = stpcpy(mptr, fval ? fval : "?"); mptr = stpcpy(mptr, " "); rc = auparse_next_field(au); - if (!header && fname && strcmp(fname, "type") == 0) { + if (!header && strcmp(fname, "type") == 0) { mptr = stpcpy(mptr, "msg=audit("); time_t t = auparse_get_time(au); diff --git a/lib/libaudit.h b/lib/libaudit.h index 0eea55f..ac22e2c 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -290,10 +290,6 @@ extern "C" { #define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */ #endif -#ifndef AUDIT_BPF -#define AUDIT_BPF 1334 /* BPF load/unload */ -#endif - #ifndef AUDIT_MAC_CALIPSO_ADD #define AUDIT_MAC_CALIPSO_ADD 1418 /* NetLabel: add CALIPSO DOI entry */ #endif diff --git a/lib/msg_typetab.h b/lib/msg_typetab.h index 81b1ea5..d668f34 100644 --- a/lib/msg_typetab.h +++ b/lib/msg_typetab.h @@ -125,7 +125,6 @@ _S(AUDIT_KERN_MODULE, "KERN_MODULE" ) _S(AUDIT_FANOTIFY, "FANOTIFY" ) _S(AUDIT_TIME_INJOFFSET, "TIME_INJOFFSET" ) _S(AUDIT_TIME_ADJNTPVAL, "TIME_ADJNTPVAL" ) -_S(AUDIT_BPF, "BPF" ) _S(AUDIT_AVC, "AVC" ) _S(AUDIT_SELINUX_ERR, "SELINUX_ERR" ) _S(AUDIT_AVC_PATH, "AVC_PATH" ) diff --git a/src/auditctl.c b/src/auditctl.c index 1150911..ac08e47 100644 --- a/src/auditctl.c +++ b/src/auditctl.c @@ -809,7 +809,6 @@ static int setopt(int count, int lineno, char *vars[]) retval = -1; } else { const char*s = optarg; - char *umsg; while (*s) { if (*s < 32) { audit_msg(LOG_ERR, @@ -818,18 +817,11 @@ static int setopt(int count, int lineno, char *vars[]) } s++; } - if (asprintf(&umsg, "text=%s", optarg) < 0) { - audit_msg(LOG_ERR, "Can't create user event"); - return -1; - } if (audit_log_user_message( fd, AUDIT_USER, - umsg, NULL, NULL, NULL, 1) <= 0) - retval = -1; - else { - free(umsg); - return -2; // success - no reply for this - } - free(umsg); + optarg, NULL, NULL, NULL, 1) <= 0) + retval = -1; + else + return -2; // success - no reply for this } break; case 'R': diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c index e709456..54452e8 100644 --- a/src/ausearch-lol.c +++ b/src/ausearch-lol.c @@ -324,11 +324,8 @@ int lol_add_record(lol *lo, char *buff) } // Eat standalone EOE, main event was already marked complete - if (e.type == AUDIT_EOE) { - free((char *)e.node); - free(n.message); + if (e.type == AUDIT_EOE) return 0; - } // Create new event and fill it in l = malloc(sizeof(llist));