summaryrefslogtreecommitdiff
path: root/nslcd/nsswitch.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-17 23:11:47 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-17 23:11:47 -0500
commit051ee4061b1f605b4b95a868c8c4d84b5dfd09b8 (patch)
tree65bc83123aa3e3b74f93b2c049f87aa093a7d371 /nslcd/nsswitch.c
parentc588513154f287bb5ce3766c39696a9c4a16f149 (diff)
Have log_log automatically append strerror(errno)
Instead of having strerror used everywhere. I did this because strerror is NOT thread safe. This still isn't thread safe, but at least now it's all in one place, easy to fix.
Diffstat (limited to 'nslcd/nsswitch.c')
-rw-r--r--nslcd/nsswitch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nslcd/nsswitch.c b/nslcd/nsswitch.c
index 56cb21b..526d773 100644
--- a/nslcd/nsswitch.c
+++ b/nslcd/nsswitch.c
@@ -56,7 +56,7 @@ void nsswitch_check_reload(void)
cached_shadow_lastcheck = t;
if (stat(NSSWITCH_FILE, &buf))
{
- log_log(LOG_ERR, "stat(%s) failed: %s", NSSWITCH_FILE, strerror(errno));
+ log_log(LOG_ERR, "stat(%s) failed", NSSWITCH_FILE);
/* trigger a recheck anyway */
cached_shadow_uses_module = CACHED_UNKNOWN;
return;
@@ -140,7 +140,7 @@ static int shadow_uses_module(const char *module_name)
/* open config file */
if ((fp = fopen(NSSWITCH_FILE, "r")) == NULL)
{
- log_log(LOG_ERR, "cannot open %s: %s", NSSWITCH_FILE, strerror(errno));
+ log_log(LOG_ERR, "cannot open %s", NSSWITCH_FILE);
return 0;
}
/* read file and parse lines */