[debian-edu-commits] [Git][debian-edu/upstream/libpam-mklocaluser][master] 3 commits: debian/pam-python.py: Converted using 2to3 and manual edit afterwards (dirmode).
WolfgangSchweer
gitlab at salsa.debian.org
Mon Dec 2 16:07:55 GMT 2019
WolfgangSchweer pushed to branch master at Debian Edu / upstream / libpam-mklocaluser
Commits:
22ab3e73 by Wolfgang Schweer at 2019-12-02T15:59:43Z
debian/pam-python.py: Converted using 2to3 and manual edit afterwards (dirmode).
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
f7c5b747 by Wolfgang Schweer at 2019-12-02T16:03:42Z
debian/{control,rules}: Adjusted for using python3.
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
d23fcc99 by Wolfgang Schweer at 2019-12-02T16:06:58Z
Add changelog entries for last commits
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
4 changed files:
- debian/changelog
- debian/control
- debian/pam-python.py
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+libpam-mklocaluser (0.16) UNRELEASED; urgency=medium
+
+ * debian/pam-python.py:
+ - Converted using 2to3 and manual edit afterwards (dirmode).
+..* debian/{control,rules}: Adjusted to match python3.
+
+ -- Wolfgang Schweer <wschweer at arcor.de> Mon, 02 Dec 2019 16:58:17 +0100
+
libpam-mklocaluser (0.15) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -3,7 +3,7 @@ Section: misc
Priority: optional
Maintainer: Debian Edu Developers <debian-edu at lists.debian.org>
Uploaders: Petter Reinholdtsen <pere at debian.org>
-Build-Depends: debhelper-compat (= 12), python, dh-python
+Build-Depends: debhelper-compat (= 12), python3, dh-python
Standards-Version: 4.4.0
Rules-Requires-Root: no
Homepage: http://www.skolelinux.org/
@@ -12,7 +12,7 @@ Vcs-Git: https://salsa.debian.org/debian-edu/upstream/libpam-mklocaluser.git
Package: libpam-mklocaluser
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, libpam-python
+Depends: ${misc:Depends}, ${python3:Depends}, libpam-python
Suggests: libpam-ccreds (>= 10-4) | libpam-sss
Description: Configure PAM to create a local user if it do not exist already
When the user log in for the first time, a local user is created in
=====================================
debian/pam-python.py
=====================================
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (C) 2010-2016 Petter Reinholdtsen <pere at hungry.com>
# 2010 Morten Werner Forsbring <werner at debian.org>
#
@@ -111,7 +111,7 @@ def check_and_create_localuser(pamh, user):
try:
groupinfo = grp.getgrgid(gid)
groupname = groupinfo[0]
- except KeyError, e:
+ except KeyError as e:
syslog.syslog("Unknown primary group with gid %d" % gid)
groupname = "[unknown]"
@@ -155,7 +155,7 @@ def check_and_create_localuser(pamh, user):
# Throw out user, as the log process cached the home directory
# and need to be restarted.
return pamh.PAM_TRY_AGAIN
- except Exception, e:
+ except Exception as e:
syslog.syslog("Failure while creating local user: %s " % (e))
pass
@@ -174,7 +174,7 @@ def pam_sm_open_session(pamh, flags, argv):
syslog.openlog("pam_mklocaluser", syslog.LOG_PID, syslog.LOG_AUTH)
try:
user = pamh.get_user(None)
- except pamh.exception, e:
+ except pamh.exception as e:
return e.pam_result
if user == None:
syslog.syslog("No user, ignoring pam-python for mklocaluser")
@@ -185,15 +185,15 @@ def pam_sm_open_session(pamh, flags, argv):
if pamh.rhost != None and 0 != len(pamh.rhost):
syslog.syslog("Remote login, ignoring pam-python for mklocaluser")
return pamh.PAM_SUCCESS
- except pamh.exception, e:
+ except pamh.exception as e:
return e.pam_result
try:
return check_and_create_localuser(pamh, user)
- except KeyError, e:
+ except KeyError as e:
syslog.syslog("Unknown username, should never happen: %s" % e)
return pamh.PAM_USER_UNKNOWN
- except Exception, e:
+ except Exception as e:
syslog.syslog("Unexpected exception, should never happen: %s" % e)
return pamh.PAM_SYSTEM_ERR
@@ -215,7 +215,7 @@ if __name__ == '__main__':
def Message(self, tag, str):
return str
def conversation(self, msg):
- print "PAM conversation: " + msg
+ print("PAM conversation: " + msg)
return
pamh = pam_handler()
user = sys.argv[1]
=====================================
debian/rules
=====================================
@@ -1,3 +1,3 @@
#!/usr/bin/make -f
%:
- dh "$@" --with python2
+ dh "$@" --with python3
View it on GitLab: https://salsa.debian.org/debian-edu/upstream/libpam-mklocaluser/compare/8ba37378441adae9bacb55566f599caf27ddcedd...d23fcc996c3176096582c170d07a1f1469c6f965
--
View it on GitLab: https://salsa.debian.org/debian-edu/upstream/libpam-mklocaluser/compare/8ba37378441adae9bacb55566f599caf27ddcedd...d23fcc996c3176096582c170d07a1f1469c6f965
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20191202/fd3ddc32/attachment-0001.html>
More information about the debian-edu-commits
mailing list