diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2022-01-13 09:58:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 09:58:50 +0100 |
commit | 14ea1011c64648462bb795c6c5ceb66dae5787b7 (patch) | |
tree | f563088a571550cf0f6b2f780caa994a0cdc3667 | |
parent | d590cf5509c8aab41af13ed35cc00cc92513bd59 (diff) | |
download | pam-14ea1011c64648462bb795c6c5ceb66dae5787b7.tar.gz pam-14ea1011c64648462bb795c6c5ceb66dae5787b7.tar.bz2 pam-14ea1011c64648462bb795c6c5ceb66dae5787b7.zip |
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.
-rw-r--r-- | modules/pam_limits/pam_limits.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)); |