diff options
Diffstat (limited to 'rpki')
-rw-r--r-- | rpki/rpkic.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rpki/rpkic.py b/rpki/rpkic.py index 68cac4b2..199a685d 100644 --- a/rpki/rpkic.py +++ b/rpki/rpkic.py @@ -151,7 +151,10 @@ class main(Cmd): try: os.setreuid(uid, pwd.getpwnam(rpki.autoconf.RPKI_USER).pw_uid) - except (KeyError, OSError) as e: + except KeyError: + # This is normal when testing uninstalled code, but warn user just in case + print "Warning: User \"{}\" not found, not dropping privileges".format(rpki.autoconf.RPKI_USER) + except OSError as e: sys.exit("Couldn't drop privs to user {}: {!s}".format(rpki.autoconf.RPKI_USER, e)) except Exception as e: |