[debian-edu-commits] debian-edu/upstream/ 08/71: Do not create home directories for remote logins.

Petter Reinholdtsen pere at moszumanska.debian.org
Mon Jun 9 18:25:35 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 b75032d9506840fc8bbdadb02a3699eb677bc70e
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat May 1 12:33:04 2010 +0000

    Do not create home directories for remote logins.
---
 debian/pam-python.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/debian/pam-python.py b/debian/pam-python.py
index 46a7b93..5acac60 100755
--- a/debian/pam-python.py
+++ b/debian/pam-python.py
@@ -80,6 +80,16 @@ def pam_sm_open_session(pamh, flags, argv):
   if user == None:
     print "No user, ignoring pam-python for localoffline"
     return pamh.PAM_USER_UNKNOWN
+
+  # Only create local users for console logins
+  try:
+    rhost = pamh.get_rhost(None)
+  except pamh.exception, e:
+    return e.pam_result
+  if rhost != None:
+    print "Remote login, ignoring pam-python for localoffline"
+    return pamh.PAM_SUCCESS
+    
   try:
     return check_and_create_localuser(pamh, user)
   except KeyError, e:

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