| Summary: | [RFE] Allow non-equality comparisons for uid and gid fields | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | emahoney |
| Component: | audit | Assignee: | Steve Grubb <sgrubb> |
| Status: | CLOSED ERRATA | QA Contact: | Ondrej Moriš <omoris> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | cww, mthacker, omoris |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | audit-2.8-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-10 12:18:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 1420851, 1476406 | ||
|
Description
emahoney
2016-11-28 18:07:58 UTC
Fixed in upstream commit c661ba7. Test program to check this feature:
#include <stdio.h>
#include <auparse.h>
#include <stdlib.h>
#define LOG "./audit.log"
int main(void)
{
auparse_state_t *au;
char *error = NULL;
char expr[1024];
snprintf(expr, sizeof(expr),
"(auid >= 500 && auid <= 5000)");
//"(\\record_type >= 1130 && \\record_type <= 1140)");
au = auparse_init(AUSOURCE_FILE, LOG);
if (ausearch_add_expression(au, expr, &error, AUSEARCH_RULE_CLEAR)) {
fprintf(stderr, "Criteria error: %s\n", error);
free(error);
}
while (ausearch_next_event(au) > 0) {
int i_auid, serial;
const char *auid;
int type = auparse_get_type(au);
auid = auparse_find_field(au, "auid");
if (auid) {
i_auid = auparse_get_field_int(au);
serial = auparse_get_serial(au);
printf("type:%d, auid:%d serial:%d\n",
type, i_auid, serial);
}
}
auparse_destroy(au);
return 0;
}
audit-2.8-1.el7 was built to resolve this issue. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0760 |