[Rpm-maint] [rpm-software-management/rpm] rpmdb --exportdb needs write access to the lock file (#1266)

Ludwig Nussel notifications at github.com
Wed Jun 10 11:46:04 UTC 2020


rpmdb --exportdb calls rpmtxnBegin() with RPMTXN_READ flags. Internally that function calls rpmlockNew() and rpmlockAcquire(). Neither function has a flags parameter to specify what kind of lock is requested. rpmlockNew() automatically creates a read lock if it can't open the .rpm.lock file in RW mode. rpmlockAcquire() however wants to establish a write lock always so won't work on a  read-only lock.

So in the end it means that means rpmdb --exportdb only works as root on a read-write file system. Doesn't work for unprivileged users, nor on read only file systems. That doesn't seem to be intentional given the rpmlockNew() fallback to a read lock.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1266
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200610/1bd0862a/attachment.html>


More information about the Rpm-maint mailing list