diff options
author | Rob Austein <sra@hactrn.net> | 2016-03-21 03:31:41 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-03-21 03:31:41 +0000 |
commit | c456bb1fd3133b4e65f1f371b5358d3de55ebdbc (patch) | |
tree | a2a6a28a278eb5e3dbefcb62185dc56317522054 /rpki/rpkic.py | |
parent | 004393bdc2f3df5d85da88819bf47d72a883f7bb (diff) |
[6322] broke "make test", fix by allowing rpkic to run with warning
when RPKI_USER not found.
svn path=/branches/tk705/; revision=6323
Diffstat (limited to 'rpki/rpkic.py')
-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: |