Cope better with being run through sudo
commit8fcff7446ffe8d26d87a166039088c7db060f17c
authorThomas Leonard <talex5@gmail.com>
Sun, 4 Jan 2009 14:00:30 +0000 (4 14:00 +0000)
committerThomas Leonard <talex5@gmail.com>
Sun, 4 Jan 2009 15:06:52 +0000 (4 15:06 +0000)
treeec82f0a7a7f0dae50fc8bb0e555b9393e924215b
parenta03133ff083f89842ebf5de45ae2cf01bb286f8a
Cope better with being run through sudo

If we find ourselves running as root but $HOME is owned by a user, get
root's real home from /etc/passwd and use that for the configuration and
cache files and for gpg's home. Otherwise, we are likely to create
root-owned files in the user's home directory.
zeroinstall/injector/gpg.py
zeroinstall/support/basedir.py