[debian-edu-commits] debian-edu/upstream/ 14/71: More typos.

Petter Reinholdtsen pere at moszumanska.debian.org
Mon Jun 9 18:25:36 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 4f6e162653739525d93c4e535dc74f910c792ad0
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat May 1 15:44:07 2010 +0000

    More typos.
---
 debian/pam-python.py | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/debian/pam-python.py b/debian/pam-python.py
index 686e9c3..963eae0 100755
--- a/debian/pam-python.py
+++ b/debian/pam-python.py
@@ -42,14 +42,14 @@ def check_and_create_localuser(pamh, user):
   newhomedir = os.path.join(topdir, user)
   if not os.path.isdir(newhomedir):
     print "Creating local passwd entry uid=%d (%s) gid=%d(%s) gecos='%s' home=%s" % (uid, user, gid, groupname, gecos, newhomedir)
-    try:
-      # Add primary group to /etc/group
-      #cmd = "/usr/sbin/addgroup --gid %d %s" % (gid, groupname)
-      cmd = "/bin/echo '%s:x:%d:' >> /etc/group" % (groupname, gid)
-      runcmd(pamh, cmd)
-    except Exception, e:
-      print e
-      pass
+#    try:
+#      # Add primary group to /etc/group
+#      #cmd = "/usr/sbin/addgroup --gid %d %s" % (gid, groupname)
+#      cmd = "/bin/echo '%s:x:%d:' >> /etc/group" % (groupname, gid)
+#      runcmd(pamh, cmd)
+#    except Exception, e:
+#      print e
+#      pass
 
     try:
       # Add user entry with overridden home directory in /etc/passwd.
@@ -70,7 +70,7 @@ 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, "/sbin/ncsd -i passwd")
+      runcmd(pamh, "/usr/sbin/nscd -i passwd")
 
       # Throw out user, as the log process cached the home directory
       # and need to be restarted.
@@ -101,12 +101,11 @@ def pam_sm_open_session(pamh, flags, argv):
 
   # Only create local users for console logins
   try:
-    rhost = pamh.get_rhost(None)
+    if pamh.rhost != None:
+      print "Remote login, ignoring pam-python for localoffline"
+      return pamh.PAM_SUCCESS
   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)

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