[SSSD] [PATCH] Use NSCD path in execl()

Jakub Hrozek jhrozek at redhat.com
Tue Jul 14 20:44:45 UTC 2015


Hi,

this is a small cleanup patch, see the commit message.
-------------- next part --------------
>From caf8b6842309c3fb7891b44b71815a37ed4c833b Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Fri, 5 Jun 2015 17:10:21 +0200
Subject: [PATCH] Use NSCD path in execl()

man execl says:
    The first argument, by convention, should point to the filename
    associated with the file being executed.

We used just 'nscd' instead.
---
 src/util/nscd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/nscd.c b/src/util/nscd.c
index 9f79a69cb5e0fe9674ace191fc90d448cfdf602a..f58aebcad69924bdd841a4bb51aedb0308237ac4 100644
--- a/src/util/nscd.c
+++ b/src/util/nscd.c
@@ -59,7 +59,7 @@ int flush_nscd_cache(enum nscd_db flush_db)
     nscd_pid = fork();
     switch (nscd_pid) {
     case 0:
-        execl(NSCD_PATH, "nscd", NSCD_RELOAD_ARG, service, NULL);
+        execl(NSCD_PATH, NSCD_PATH, NSCD_RELOAD_ARG, service, NULL);
         /* if this returns it is an error */
         DEBUG(SSSDBG_CRIT_FAILURE,
               "execl(3) failed: %d(%s)\n", errno, strerror(errno));
-- 
2.4.3



More information about the sssd-devel mailing list