]> git.saurik.com Git - apt.git/commit
do not try to chown if not run as root
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 13 Jul 2013 21:05:55 +0000 (23:05 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 12 Aug 2013 16:01:37 +0000 (18:01 +0200)
commit11b126f9d229c85bfc7a6092527af46f7314f188
tree663e959951f81f800441df048e73808d74399984
parent7a2690a3bf59244fff417ab494f68fd9301b74d9
do not try to chown if not run as root

If this code is run as non-root we are in a special situation (e.g. in
our testcases) where it is obvious that we can't enforce user/group on
any file, so skip this code altogether instead of bugging users with
an error message – which we also switch to a warning as a failure to
open the file is "just" a warning, so the 'wrong' owner shouldn't be
that much of an issue.

The file is still handled with chmod, so all the security we can enforce
is still enforced of course, which also gets a warning if it fails.

Git-Dch: Ignore
apt-pkg/deb/dpkgpm.cc