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

2020-08-13 Thread Panu Matilainen
I agree --exportdb should work on read-only fs. Unprivileged user is a 
different matter, we can't really let unprivileged user to block system updates 
through ro-locking.

-- 
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#issuecomment-673395349___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


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

2020-06-10 Thread Ludwig Nussel
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___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint