[debian-edu-commits] debian-edu/upstream/ 52/71: Change module to only run /usr/sbin/nscd if it exist (Closes #597241).

Petter Reinholdtsen pere at moszumanska.debian.org
Mon Jun 9 18:25:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository libpam-mklocaluser.

commit 7a8b0e272e7d7330cec84200f175c6a055418ce3
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Fri Sep 17 22:18:45 2010 +0000

    Change module to only run /usr/sbin/nscd if it exist (Closes #597241).
---
 debian/changelog     | 1 +
 debian/pam-python.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 4ca1d24..4d7df7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ libpam-mklocaluser (0.6) UNRELEASED; urgency=low
     the user is already available locally (Closes: #597174).
   * Add code to handle missing primary group information when creating
     the local user.
+  * Change module to only run /usr/sbin/nscd if it exist (Closes #597241).
   * Update standards-version from 3.8.4 to 3.9.1.  No changes needed.
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri, 17 Sep 2010 11:24:46 +0200
diff --git a/debian/pam-python.py b/debian/pam-python.py
index 05cb237..8ba4f05 100755
--- a/debian/pam-python.py
+++ b/debian/pam-python.py
@@ -97,7 +97,8 @@ def check_and_create_localuser(pamh, user):
       runcmd(pamh, "/bin/chown -R %d:%d '%s'" % (uid, gid, newhomedir))
 
       # Flush nscd cache to get rid of original user entry
-      runcmd(pamh, "/usr/sbin/nscd -i passwd")
+      if os.access("/usr/sbin/nscd", os.X_OK):
+        runcmd(pamh, "/usr/sbin/nscd -i passwd")
 
       # Hook for adjusting the freshly created home directory
       # XXX Should be rewritten in python, I guess

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/libpam-mklocaluser.git



More information about the debian-edu-commits mailing list