lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.8-5-ge8a4705

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

nss-pam-ldapd branch master updated. 0.9.8-5-ge8a4705



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  e8a4705337613bd6400700e7f43bccca04e5587f (commit)
       via  9a5097110da43c52236a39e2897940b86b5575e9 (commit)
       via  c05e3265b7f62b83937f204119555c6a73f29b29 (commit)
      from  9760dcef59da6ffbf1826724fa79621d74255e06 (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 -----------------------------------------------------------------
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=e8a4705337613bd6400700e7f43bccca04e5587f

commit e8a4705337613bd6400700e7f43bccca04e5587f
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Feb 17 14:02:27 2018 +0100

    Fix running pylint on distcheck
    
    This sets PYTHONPATH so that both the source and build directories are
    used to find constants.py.

diff --git a/tests/test_pylint.sh b/tests/test_pylint.sh
index 0ba2f83..b97600a 100755
--- a/tests/test_pylint.sh
+++ b/tests/test_pylint.sh
@@ -24,6 +24,8 @@ set -e
 # find source directory
 srcdir="${srcdir-`dirname "$0"`}"
 top_srcdir="${top_srcdir-${srcdir}/..}"
+builddir="${builddir-`dirname "$0"`}"
+top_builddir="${top_builddir-${builddir}/..}"
 
 # if Pylint is missing, ignore
 if ! pylint --version > /dev/null 2> /dev/null
@@ -41,10 +43,13 @@ rcfile="$absdir/pylint.rc"
 disable=$(sed -n 's/^disable=\(.*\)$/\1/p' "$rcfile")
 
 # run Pylint in both pynslcd and utils directories
-( cd "$top_srcdir/pynslcd" ;
-  pylint --errors-only --rcfile "$rcfile" --disable "$disable" *.py)
-( cd "$top_srcdir/utils" ;
-  pylint --errors-only --rcfile "$rcfile" --disable "$disable" *.py)
+for dir in pynslcd utils
+do
+  echo "Running pylint in $dir..."
+  dir_builddir="$(cd "${top_builddir}/${dir}" && pwd)"
+  ( cd "${top_srcdir}/${dir}" ;
+    PYTHONPATH="${dir_builddir}" pylint --errors-only --rcfile "$rcfile" 
--disable "$disable" *.py)
+done
 
 # Pylint has the following exit codes:
 #  0 if everything went fine

https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=9a5097110da43c52236a39e2897940b86b5575e9

commit 9a5097110da43c52236a39e2897940b86b5575e9
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Feb 17 14:02:06 2018 +0100

    Mark case blocks without break statement
    
    This avoids a gcc warning in non-empty case blocks without a break
    statement by explicitly marking those blocks.

diff --git a/common/expr.c b/common/expr.c
index a5691b5..092ce7a 100644
--- a/common/expr.c
+++ b/common/expr.c
@@ -310,6 +310,7 @@ MUST_USE static const char *parse_expression(
         break;
       case '\\': /* escaped character, unescape */
         (*ptr)++;
+        FALLTHROUGH; /* no break needed here */
       default: /* just copy the text */
         if ((size_t)j >= buflen)
           return NULL;
@@ -356,7 +357,7 @@ SET *expr_vars(const char *str, SET *set)
         break;
       case '\\': /* escaped character, unescape */
         i++;
-        /* no break needed here */
+        FALLTHROUGH; /* no break needed here */
       default: /* just skip */
         i++;
     }
diff --git a/compat/attrs.h b/compat/attrs.h
index 83f1777..0d13073 100644
--- a/compat/attrs.h
+++ b/compat/attrs.h
@@ -79,6 +79,13 @@
 #define NORETURN    /* no attribute */
 #endif
 
+/* we don't need an explicit break statement in this case block */
+#if GCC_VERSION(7, 0)
+#define FALLTHROUGH __attribute__((fallthrough))
+#else
+#define FALLTHROUGH /* no attribute */
+#endif
+
 /* define __STRING if it's not yet defined */
 #ifndef __STRING
 #ifdef __STDC__

https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=c05e3265b7f62b83937f204119555c6a73f29b29

commit c05e3265b7f62b83937f204119555c6a73f29b29
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Fri Feb 16 22:13:19 2018 +0100

    Increase size of hostname buffer
    
    This increases the host name buffer to support host names (that include
    FQDNs) to 255 characters and removes the reliance on HOST_NAME_MAX and
    _POSIX_HOST_NAME_MAX which may be smaller in some situations.
    
    Closes https://github.com/arthurdejong/nss-pam-ldapd/issues/22

diff --git a/nslcd/cfg.c b/nslcd/cfg.c
index 60d860e..348e800 100644
--- a/nslcd/cfg.c
+++ b/nslcd/cfg.c
@@ -5,7 +5,7 @@
 
    Copyright (C) 1997-2005 Luke Howard
    Copyright (C) 2007 West Consulting
-   Copyright (C) 2007-2017 Arthur de Jong
+   Copyright (C) 2007-2018 Arthur de Jong
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -425,7 +425,7 @@ static void add_uris_from_dns(const char *filename, int lnr,
 {
   int rc;
   char *hostlist = NULL, *nxt;
-  char buf[HOST_NAME_MAX + sizeof("ldap://";)];
+  char buf[BUFLEN_HOSTNAME + sizeof("ldap://";)];
   log_log(LOG_DEBUG, "query %s for SRV records", domain);
   rc = ldap_domain2hostlist(domain, &hostlist);
   if (rc != LDAP_SUCCESS)
diff --git a/nslcd/common.h b/nslcd/common.h
index ffa07ba..26fcf48 100644
--- a/nslcd/common.h
+++ b/nslcd/common.h
@@ -3,7 +3,7 @@
    This file is part of the nss-pam-ldapd library.
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006-2014 Arthur de Jong
+   Copyright (C) 2006-2018 Arthur de Jong
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -150,15 +150,6 @@ int invalidator_start(void);
 /* signal invalidator to invalidate the selected external cache */
 void invalidator_do(enum ldap_map_selector map);
 
-/* fallback definition of HOST_NAME_MAX */
-#ifndef HOST_NAME_MAX
-#ifdef _POSIX_HOST_NAME_MAX
-#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
-#else
-#define HOST_NAME_MAX 255
-#endif /* _POSIX_HOST_NAME_MAX */
-#endif /* not HOST_NAME_MAX */
-
 /* common buffer lengths */
 #define BUFLEN_NAME         256  /* user, group names and such */
 #define BUFLEN_SAFENAME     300  /* escaped name */
@@ -167,7 +158,7 @@ void invalidator_do(enum ldap_map_selector map);
 #define BUFLEN_DN           512  /* distinguished names */
 #define BUFLEN_SAFEDN       600  /* escapedd dn */
 #define BUFLEN_FILTER      4096  /* search filters */
-#define BUFLEN_HOSTNAME (HOST_NAME_MAX + 1)  /* host names (+ escaped) */
+#define BUFLEN_HOSTNAME     256  /* host names or FQDN (and safe version) */
 #define BUFLEN_MESSAGE     1024  /* message strings */
 
 /* provide strtouid() function alias */

-----------------------------------------------------------------------

Summary of changes:
 common/expr.c        |  3 ++-
 compat/attrs.h       |  7 +++++++
 nslcd/cfg.c          |  4 ++--
 nslcd/common.h       | 13 ++-----------
 tests/test_pylint.sh | 13 +++++++++----
 5 files changed, 22 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/nss-pam-ldapd-commits/