]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
Don't log audit messages with UNKNOWN hostname
authorAllison Karlitskaya <allison.karlitskaya@redhat.com>
Wed, 3 Sep 2025 18:07:55 +0000 (20:07 +0200)
committerDamien Miller <djm@mindrot.org>
Mon, 29 Sep 2025 23:51:51 +0000 (09:51 +1000)
commite5055ef26abcffd3f99669e411ea6b35ca166111
tree1bf85c95110d10c96be02bb050dd02ef60d71879
parentd343df4019b4369ce7f87e9bf6bbc80b81cd263d
Don't log audit messages with UNKNOWN hostname

The `host` parameter to audit_log_acct_message() is documented as
follows:

      host - The hostname if known. If not available pass a NULL.

but we pass the string "UNKNOWN" in case we don't know the hostname.
Make sure we pass NULL instead.

This avoids having the audit system attempt to perform a DNS lookup on
the hostname "UNKNOWN", which tends to result in long delays when
attempting to login.
audit-linux.c