This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d1ff4b8427aab0ad735735a1bfc9a8f037c8fda0 commit d1ff4b8427aab0ad735735a1bfc9a8f037c8fda0 Author: Guillem Jover <[email protected]> AuthorDate: Sun Dec 1 04:21:43 2019 +0100 libdpkg: Consider msdbrw_needsuperuser equivalent to msdbrw_write When checking for missing access to the dpkg database directory, we should consider msdbrw_needsuperuser equivalent to msdbrw_write, as the former is a superset of the latter. --- debian/changelog | 2 ++ lib/dpkg/dbmodify.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f141aa57e..1f33193d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,6 +41,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium * update-alternatives: Create the administrative directory on demand. * dpkg-split: Cope with a missing parts/ database directory. * dpkg-split: Create the parts/ database directory on demand. + * libdpkg: Consider msdbrw_needsuperuser equivalent to msdbrw_write, so + the same checks are performed on normal non --force-not-root operation. * Perl modules: - Dpkg::Source::Package: Verify original tarball signatures at build time. - Dpkg::BuildFlags: Add new unset() method. diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c index 763293170..012e06033 100644 --- a/lib/dpkg/dbmodify.c +++ b/lib/dpkg/dbmodify.c @@ -289,7 +289,7 @@ modstatdb_open(enum modstatdb_rw readwritereq) if (errno != EACCES) ohshite(_("unable to access the dpkg database directory %s"), dpkg_db_get_dir()); - else if (readwritereq == msdbrw_write) + else if (readwritereq >= msdbrw_write) ohshit(_("required read/write access to the dpkg database directory %s"), dpkg_db_get_dir()); cstatus= msdbrw_readonly; -- Dpkg.Org's dpkg

