RSS feed

nss-pam-ldapd branch master updated. 0.9.6-12-gfcea92d

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.6-12-gfcea92d

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  fcea92db2c3069209c1de7f35528560ddb3c216c (commit)
      from  c879485dd19f999797d255b2cf4baa61c3dd15c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit fcea92db2c3069209c1de7f35528560ddb3c216c
Author: Arthur de Jong <>
Date:   Fri Nov 13 13:47:39 2015 +0100

    Correct file readability check
    This uses access() instead of stat() to see if the file is readable by
    the current process. This fixes f089e01.

diff --git a/nslcd/cfg.c b/nslcd/cfg.c
index 9900314..fad37d2 100644
--- a/nslcd/cfg.c
+++ b/nslcd/cfg.c
@@ -508,19 +508,12 @@ static void check_permissions(const char *filename, const 
char *keyword)
 static void check_readable(const char *filename, int lnr,
                        const char *keyword, const char *path)
-  struct stat sb;
-  if (stat(path, &sb))
+  if (access(path, R_OK) != 0)
-    log_log(LOG_ERR, "%s:%d: %s: cannot stat() %s: %s",
+    log_log(LOG_ERR, "%s:%d: %s: error accessing %s: %s",
             filename, lnr, keyword, path, strerror(errno));
-  if (!S_ISREG(sb.st_mode))
-  {
-    log_log(LOG_ERR, "%s:%d: %s: %s is not a file",
-            filename, lnr, keyword, path);
-    exit(EXIT_FAILURE);
-  }
 /* check whether the specified path is a directory */


Summary of changes:
 nslcd/cfg.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

To unsubscribe send an email to or see