Page MenuHomePhorge

No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/plugins/password/helpers/chpass-wrapper.py b/plugins/password/helpers/chpass-wrapper.py
index 61bba849e..e56811561 100644
--- a/plugins/password/helpers/chpass-wrapper.py
+++ b/plugins/password/helpers/chpass-wrapper.py
@@ -1,32 +1,32 @@
#!/usr/bin/env python
import sys
import pwd
import subprocess
BLACKLIST = (
# add blacklisted users here
#'user1',
)
try:
username, password = sys.stdin.readline().split(':', 1)
-except ValueError, e:
+except ValueError:
sys.exit('Malformed input')
try:
user = pwd.getpwnam(username)
-except KeyError, e:
+except KeyError:
sys.exit('No such user: %s' % username)
if user.pw_uid < 1000:
sys.exit('Changing the password for user id < 1000 is forbidden')
if username in BLACKLIST:
sys.exit('Changing password for user %s is forbidden (user blacklisted)' %
username)
handle = subprocess.Popen('/usr/sbin/chpasswd', stdin = subprocess.PIPE)
handle.communicate('%s:%s' % (username, password))
sys.exit(handle.returncode)

File Metadata

Mime Type
text/x-diff
Expires
Thu, Mar 19, 8:42 AM (16 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
456911
Default Alt Text
(1 KB)

Event Timeline