[debian-edu-commits] debian-edu/upstream/ 46/71: Do not create local home directory if the directory mentioned in passwd already exist.

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 ac864e38de41217c68604a6560119241ed43053f
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Fri Jul 23 15:28:17 2010 +0000

    Do not create local home directory if the directory mentioned in
    passwd already exist.
---
 debian/changelog     | 7 +++++++
 debian/pam-python.py | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 43b8032..81628fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libpam-mklocaluser (0.5) UNRELEASED; urgency=low
+
+  * Do not create local home directory if the directory mentioned in
+    passwd already exist.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Tue, 01 Jun 2010 21:01:16 +0200
+
 libpam-mklocaluser (0.4) unstable; urgency=low
 
   [ Morten Werner Forsbring ]
diff --git a/debian/pam-python.py b/debian/pam-python.py
index 563694b..3ca0e7c 100755
--- a/debian/pam-python.py
+++ b/debian/pam-python.py
@@ -66,7 +66,7 @@ def check_and_create_localuser(pamh, user):
     return pamh.PAM_USER_UNKNOWN
 
   newhomedir = os.path.join(topdir, user)
-  if not os.path.isdir(newhomedir):
+  if not os.path.isdir(homedir) and not os.path.isdir(newhomedir):
     syslog.syslog("Creating local passwd entry uid=%d(%s) gid=%d(%s) gecos='%s' home=%s" % (uid, user, gid, groupname, gecos, newhomedir))
     try:
       # Add user entry with overridden home directory in /etc/passwd.

-- 
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