From 14ea1011c64648462bb795c6c5ceb66dae5787b7 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 13 Jan 2022 09:58:50 +0100 Subject: pam_limits: don't fail on missing config files (#418) A config with only comments or an empty one is completely fine for pam_limits. So don't complain about missing config files either. --- modules/pam_limits/pam_limits.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/pam_limits') diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index 06800b48..0f91e05b 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -831,6 +831,9 @@ parse_config_file(pam_handle_t *pamh, const char *uname, uid_t uid, gid_t gid, if (fil == NULL) #endif { + if (err == ENOENT) + return PAM_SUCCESS; + pam_syslog (pamh, LOG_WARNING, "cannot read settings from %s: %s", CONF_FILE, strerror(err)); -- cgit v1.2.3