From 5b4c4698e8ae75093292f49ee6456f85f95a3d5d Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 30 Jun 2016 14:29:40 +0200 Subject: Unification and cleanup of syslog log levels. * libpam/pam_handlers.c: Make memory allocation failures LOG_CRIT. * libpam/pam_modutil_priv.c: Make memory allocation failures LOG_CRIT. * modules/pam_echo/pam_echo.c: Make memory allocation failures LOG_CRIT. * modules/pam_env/pam_env.c: Make memory allocation failures LOG_CRIT. * modules/pam_exec/pam_exec.c: Make memory allocation failures LOG_CRIT. * modules/pam_filter/pam_filter.c: Make all non-memory call errors LOG_ERR. * modules/pam_group/pam_group.c: Make memory allocation failures LOG_CRIT. * modules/pam_issue/pam_issue.c: Make memory allocation failures LOG_CRIT. * modules/pam_lastlog/pam_lastlog.c: The lastlog file creation is syslogged with LOG_NOTICE, memory allocation errors with LOG_CRIT, other errors with LOG_ERR. * modules/pam_limits/pam_limits.c: User login limit messages are syslogged with LOG_NOTICE, stale utmp entry with LOG_INFO, non-memory errors with LOG_ERR. * modules/pam_listfile/pam_listfile.c: Rejection of user is syslogged with LOG_NOTICE. * modules/pam_namespace/pam_namespace.c: Make memory allocation failures LOG_CRIT. * modules/pam_nologin/pam_nologin.c: Make memory allocation failures LOG_CRIT, other errors LOG_ERR. * modules/pam_securetty/pam_securetty.c: Rejection of access is syslogged with LOG_NOTICE, non-memory errors with LOG_ERR. * modules/pam_selinux/pam_selinux.c: Make memory allocation failures LOG_CRIT. * modules/pam_succeed_if/pam_succeed_if.c: Make all non-memory call errors LOG_ERR. * modules/pam_time/pam_time.c: Make memory allocation failures LOG_CRIT. * modules/pam_timestamp/pam_timestamp.c: Make memory allocation failures LOG_CRIT. * modules/pam_unix/pam_unix_acct.c: Make all non-memory call errors LOG_ERR. * modules/pam_unix/pam_unix_passwd.c: Make memory allocation failures LOG_CRIT, other errors LOG_ERR. * modules/pam_unix/pam_unix_sess.c: Make all non-memory call errors LOG_ERR. * modules/pam_unix/passverify.c: Unknown user is syslogged with LOG_NOTICE. * modules/pam_unix/support.c: Unknown user is syslogged with LOG_NOTICE and max retries ignorance by application likewise. * modules/pam_unix/unix_chkpwd.c: Make all non-memory call errors LOG_ERR. * modules/pam_userdb/pam_userdb.c: Password authentication error is syslogged with LOG_NOTICE. * modules/pam_xauth/pam_xauth.c: Make memory allocation failures LOG_CRIT. --- modules/pam_namespace/pam_namespace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/pam_namespace') diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c index d02ea09e..f541f891 100644 --- a/modules/pam_namespace/pam_namespace.c +++ b/modules/pam_namespace/pam_namespace.c @@ -712,7 +712,7 @@ static char *md5hash(const char *instname, struct instance_data *idata) MD5((const unsigned char *)instname, strlen(instname), inst_digest); if ((md5inst = malloc(MD5_DIGEST_LENGTH * 2 + 1)) == NULL) { - pam_syslog(idata->pamh, LOG_ERR, "Unable to allocate buffer"); + pam_syslog(idata->pamh, LOG_CRIT, "Unable to allocate buffer"); return NULL; } @@ -801,12 +801,12 @@ static int form_context(const struct polydir_s *polyptr, scontext = context_new(scon); if (! scontext) { - pam_syslog(idata->pamh, LOG_ERR, "out of memory"); + pam_syslog(idata->pamh, LOG_CRIT, "out of memory"); goto fail; } fcontext = context_new(*origcon); if (! fcontext) { - pam_syslog(idata->pamh, LOG_ERR, "out of memory"); + pam_syslog(idata->pamh, LOG_CRIT, "out of memory"); goto fail; } if (context_range_set(fcontext, context_range_get(scontext)) != 0) { @@ -815,7 +815,7 @@ static int form_context(const struct polydir_s *polyptr, } *i_context=strdup(context_str(fcontext)); if (! *i_context) { - pam_syslog(idata->pamh, LOG_ERR, "out of memory"); + pam_syslog(idata->pamh, LOG_CRIT, "out of memory"); goto fail; } @@ -1130,7 +1130,7 @@ static int check_inst_parent(char *ipath, struct instance_data *idata) */ inst_parent = (char *) malloc(strlen(ipath)+1); if (!inst_parent) { - pam_syslog(idata->pamh, LOG_ERR, "Error allocating pathname string"); + pam_syslog(idata->pamh, LOG_CRIT, "Error allocating pathname string"); return PAM_SESSION_ERR; } -- cgit v1.2.3