]> git.ipfire.org Git - thirdparty/shadow.git/commit
Fix useradd audit event logging of ID field
authorMichael Vetter <jubalh@iodoru.org>
Thu, 15 Dec 2022 10:52:58 +0000 (11:52 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 15 Dec 2022 22:29:42 +0000 (16:29 -0600)
commit37412f505ed0bc5c9e3f04b2266b40f8f6fc310f
treecb1ae6642b8f3d9a70fb4ce8e2c2d9037d890347
parent6b6e005ce1cc4a5e4fc7fc40a52f2ed229f54b5b
Fix useradd audit event logging of ID field

When useradd sends its ADD_USER event, it is filling in the id field. This is not yet written to disk. When auditd sees the event and the log format is enriched, auditd tries to lookup the user name but it does not exist. This causes the event to never be resolvable since ausearch relies on the lookup information attached by auditd.

The fix is to not send the id information for any event until after close_files() is called. Just the acct field is all that is

Patch by Steve Grubb (afaik).

Reported at https://bugzilla.redhat.com/show_bug.cgi?id=1713432
src/useradd.c