RSS feed

nss-pam-ldapd branch master updated. 0.9.7-1-ga3da150

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

nss-pam-ldapd branch master updated. 0.9.7-1-ga3da150

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  a3da150a81ebe23b59d6cbc4f2899cc50cd81225 (commit)
      from  c286bb51ea052cc8b27ee034cd1e67999a746e91 (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 a3da150a81ebe23b59d6cbc4f2899cc50cd81225
Author: Arthur de Jong <>
Date:   Tue Aug 30 18:48:03 2016 +0200

    Replace Python assertions with exceptions
    The assertions can be optimised out when compiling the modules with -O
    which would break the protocol handling. This ensures that errors are
    properly handled even if optimisation is enabled.
    Thanks Yu-Chun Huang for reporting this.

diff --git a/utils/ b/utils/
index 22d18b7..0ea8257 100644
--- a/utils/
+++ b/utils/
@@ -96,8 +96,11 @@ class NslcdClient(object):
             # flush the stream
             # read and check response version number
-            assert self.read_int32() == constants.NSLCD_VERSION
-            assert self.read_int32() == self.action
+            if self.read_int32() != constants.NSLCD_VERSION:
+                raise IOError('NSLCD protocol error')
+            if self.read_int32() != self.action:
+                raise IOError('NSLCD protocol error')
+            # reset action to ensure that it is only the first time
             self.action = None
         # get the NSLCD_RESULT_* marker and return it
         return self.read_int32()
@@ -125,7 +128,8 @@ def usermod(username, asroot=False, password=None, 
     # read the response
-    assert con.get_response() == constants.NSLCD_RESULT_BEGIN
+    if con.get_response() != constants.NSLCD_RESULT_BEGIN:
+        raise IOError('NSLCD protocol error')
     response = {}
     while True:
         key = con.read_int32()


Summary of changes:
 utils/ | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

To unsubscribe send an email to or see