pam/pam_access-hostname-debug.patch
Thorsten Kukuk 8fc5e81cde - pam_access backports from upstream:
- pam_access-doc-IPv6-link-local.patch:
    Document only partial supported IPv6 link local addresses
  - pam_access-hostname-debug.patch:
    Don't print error if we cannot resolve a hostname, does not
    need to be a hostname
  - pam_shells-fix-econf-memory-leak.patch:
    Free econf keys variable
  - disable-examples.patch:
    Don't build examples

OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam?expand=0&rev=278
2023-08-07 10:24:04 +00:00

28 lines
1.0 KiB
Diff

From 741acf4ff707d53b94947736a01eeeda5e2c7e98 Mon Sep 17 00:00:00 2001
From: Thorsten Kukuk <kukuk@suse.com>
Date: Fri, 4 Aug 2023 15:46:16 +0200
Subject: [PATCH] pam_access: make non-resolveable hostname a debug output
(#590)
* modules/pam_access/pam_access.c (network_netmask_match): Don't print
an error if a string is not resolveable, only a debug message in debug
mode. We even don't know if that entry is for remote logins or not.
---
modules/pam_access/pam_access.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index f70b7e495..985dc7de2 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -876,7 +876,8 @@ network_netmask_match (pam_handle_t *pamh,
*/
if (getaddrinfo (tok, NULL, NULL, &ai) != 0)
{
- pam_syslog(pamh, LOG_ERR, "cannot resolve hostname \"%s\"", tok);
+ if (item->debug)
+ pam_syslog(pamh, LOG_DEBUG, "cannot resolve hostname \"%s\"", tok);
return NO;
}