summaryrefslogtreecommitdiff
path: root/modules/pam_motd
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-04-26 11:12:59 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-04-26 11:12:59 +0000
commit1e14a517cf9b52c4d1697467d1c235215b8519cb (patch)
tree04cc5de477819eee9b209a7cf0cae093fce4fed7 /modules/pam_motd
parent62cd745d730e5ba13d5d7092ac566fc0b2148e61 (diff)
pam_motd: remove redundant prefix from syslog messages
pam_syslog already does all the prefixing we need. * modules/pam_motd/pam_motd.c (pam_split_string, try_to_display_directories_with_overrides): Remove "pam_motd: " prefix from strings passed to pam_syslog. Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
Diffstat (limited to 'modules/pam_motd')
-rw-r--r--modules/pam_motd/pam_motd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c
index 3be129a5..6017bb40 100644
--- a/modules/pam_motd/pam_motd.c
+++ b/modules/pam_motd/pam_motd.c
@@ -108,7 +108,7 @@ static int pam_split_string(const pam_handle_t *pamh, char *arg, char delim,
arg_split = calloc(num_strs, sizeof(char *));
if (arg_split == NULL) {
- pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate string array");
+ pam_syslog(pamh, LOG_CRIT, "failed to allocate string array");
goto out;
}
@@ -202,11 +202,11 @@ static void try_to_display_directories_with_overrides(pam_handle_t *pamh,
}
if ((dirscans = calloc(num_motd_dirs, sizeof(struct dirent **))) == NULL) {
- pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirent arrays");
+ pam_syslog(pamh, LOG_CRIT, "failed to allocate dirent arrays");
goto out;
}
if ((dirscans_sizes = calloc(num_motd_dirs, sizeof(int))) == NULL) {
- pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirent array sizes");
+ pam_syslog(pamh, LOG_CRIT, "failed to allocate dirent array sizes");
goto out;
}
@@ -216,7 +216,7 @@ static void try_to_display_directories_with_overrides(pam_handle_t *pamh,
filter_dirents, alphasort);
if (rv < 0) {
if (errno != ENOENT || report_missing) {
- pam_syslog(pamh, LOG_ERR, "pam_motd: error scanning directory %s: %m",
+ pam_syslog(pamh, LOG_ERR, "error scanning directory %s: %m",
motd_dir_path_split[i]);
}
dirscans_sizes[i] = rv;
@@ -229,7 +229,7 @@ static void try_to_display_directories_with_overrides(pam_handle_t *pamh,
/* Allocate space for all file names found in the directories, including duplicates. */
if ((dirnames_all = calloc(dirscans_size_total, sizeof(char *))) == NULL) {
- pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirname array");
+ pam_syslog(pamh, LOG_CRIT, "failed to allocate dirname array");
goto out;
}