=== modified file 'TODO' --- TODO 2012-04-24 06:55:34 +0000 +++ TODO 2012-05-01 20:48:00 +0000 @@ -81,6 +81,8 @@ ** TODO CheckerCompleted method, deprecate CheckedOK ** TODO Secret Service API? http://standards.freedesktop.org/secret-service/ +** TODO [[info:python:What's%20New%20in%20Python%202%206][What's New in Python 2.6]] +*** Start at [[info:python:PEP%203101%20Advanced%20String%20Formatting][PEP 3101 Advanced String Formatting]] * mandos.xml ** Add mandos contact info in manual pages === modified file 'mandos' --- mandos 2012-05-01 20:33:23 +0000 +++ mandos 2012-05-01 20:48:00 +0000 @@ -2256,20 +2256,16 @@ except IOError: logger.error("Could not open file %r", pidfilename) - try: - uid = pwd.getpwnam("_mandos").pw_uid - gid = pwd.getpwnam("_mandos").pw_gid - except KeyError: + for name in ("_mandos", "mandos", "nobody"): try: - uid = pwd.getpwnam("mandos").pw_uid - gid = pwd.getpwnam("mandos").pw_gid + uid = pwd.getpwnam(name).pw_uid + gid = pwd.getpwnam(name).pw_gid + break except KeyError: - try: - uid = pwd.getpwnam("nobody").pw_uid - gid = pwd.getpwnam("nobody").pw_gid - except KeyError: - uid = 65534 - gid = 65534 + continue + else: + uid = 65534 + gid = 65534 try: os.setgid(gid) os.setuid(uid)