Skip to content

src/passwd.c: add audit messages for passwd#1533

Merged
ikerexxe merged 2 commits intoshadow-maint:masterfrom
ikerexxe:passwd-audit
Feb 13, 2026
Merged

src/passwd.c: add audit messages for passwd#1533
ikerexxe merged 2 commits intoshadow-maint:masterfrom
ikerexxe:passwd-audit

Conversation

@ikerexxe
Copy link
Copy Markdown
Collaborator

Add comprehensive audit messages for password operations, including unlock, delete, expire and aging operations.

Comment thread src/passwd.c
Comment thread src/passwd.c Outdated
Comment thread src/passwd.c
Comment thread src/passwd.c Outdated
Comment thread src/passwd.c Outdated
Comment thread src/passwd.c
Add comprehensive audit messages for password operations, including
unlock, delete and expire operations.

Change update_shadow() to look up the actual target user instead of
using a dummy `passwd` struct. This ensures audit logging gets the
correct target UID. Audit logs should record the UID of the user being
affected (target), not the UID of whoever is running the passwd command
(source).

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
@alejandro-colomar
Copy link
Copy Markdown
Collaborator

LGTM. I didn't check it thoroughly, as I'm starting to have fever, and my brain isn't ready for that, but feel free to commit. We could fix it later if it has any issues. It looks reasonably good.

@ikerexxe
Copy link
Copy Markdown
Collaborator Author

LGTM. I didn't check it thoroughly, as I'm starting to have fever, and my brain isn't ready for that, but feel free to commit. We could fix it later if it has any issues. It looks reasonably good.

Take care Alejandro! There are a lot of viruses going around these days, so I hope it's nothing serious

@ikerexxe ikerexxe merged commit 39e43c2 into shadow-maint:master Feb 13, 2026
12 checks passed
@ikerexxe ikerexxe deleted the passwd-audit branch February 13, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants