summaryrefslogtreecommitdiff
path: root/nslcd/invalidator.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd/invalidator.c')
-rw-r--r--nslcd/invalidator.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/nslcd/invalidator.c b/nslcd/invalidator.c
index 550ca8b..d0474bc 100644
--- a/nslcd/invalidator.c
+++ b/nslcd/invalidator.c
@@ -116,7 +116,7 @@ static void exec_invalidate(const char *db)
_exit(EXIT_FAILURE);
break;
case -1: /* we are the parent, but have an error */
- log_log(LOG_ERR, "invalidator: fork() failed: %s", strerror(errno));
+ log_log(LOG_ERR, "invalidator: fork() failed");
break;
default: /* we are the parent */
/* wait for child exit */
@@ -127,7 +127,7 @@ static void exec_invalidate(const char *db)
}
while ((i < 0) && (errno == EINTR));
if (i < 0)
- log_log(LOG_ERR, "invalidator: waitpid(%d) failed: %s", (int)cpid, strerror(errno));
+ log_log(LOG_ERR, "invalidator: waitpid(%d) failed", (int)cpid);
else if (WIFEXITED(status))
{
i = WEXITSTATUS(status);
@@ -177,11 +177,10 @@ static void handle_requests(int fd)
else if (i < 0)
{
if (errno == EINTR)
- log_log(LOG_DEBUG, "invalidator: read failed (ignored): %s",
- strerror(errno));
+ log_log(LOG_DEBUG, "invalidator: read failed (ignored)");
else
{
- log_log(LOG_ERR, "invalidator: read failed: %s", strerror(errno));
+ log_log(LOG_ERR, "invalidator: read failed");
_exit(EXIT_SUCCESS);
}
}
@@ -206,21 +205,21 @@ int invalidator_start(void)
/* set up a pipe for communication */
if (pipe(pipefds) < 0)
{
- log_log(LOG_ERR, "pipe() failed: %s", strerror(errno));
+ log_log(LOG_ERR, "pipe() failed");
return -1;
}
/* set O_NONBLOCK on the write end to ensure that a hanging invalidator
process does not bring down the rest of the application */
if ((i = fcntl(pipefds[1], F_GETFL, 0)) < 0)
{
- log_log(LOG_ERR, "fctnl(F_GETFL) failed: %s", strerror(errno));
+ log_log(LOG_ERR, "fctnl(F_GETFL) failed");
close(pipefds[0]);
close(pipefds[1]);
return -1;
}
if (fcntl(pipefds[1], F_SETFL, i | O_NONBLOCK) < 0)
{
- log_log(LOG_ERR, "fctnl(F_SETFL,O_NONBLOCK) failed: %s", strerror(errno));
+ log_log(LOG_ERR, "fctnl(F_SETFL,O_NONBLOCK) failed");
close(pipefds[0]);
close(pipefds[1]);
return -1;
@@ -229,7 +228,7 @@ int invalidator_start(void)
cpid = fork();
if (cpid < 0)
{
- log_log(LOG_ERR, "fork() failed: %s", strerror(errno));
+ log_log(LOG_ERR, "fork() failed");
close(pipefds[0]);
close(pipefds[1]);
return -1;
@@ -269,6 +268,5 @@ void invalidator_do(enum nss_map_selector map)
c = (uint8_t)map;
rc = write(signalfd, &c, sizeof(uint8_t));
if (rc <= 0)
- log_log(LOG_WARNING, "error signalling invalidator: %s",
- strerror(errno));
+ log_log(LOG_WARNING, "error signalling invalidator");
}