Skip to content

RPM Query behavior via sudo vs user #2322

Answered by pmatilai
gclair asked this question in Q&A
Discussion options

You must be logged in to vote

The regular user doesn't have write-permissions on the shared database environment (those __db.* files), which is required to register even a read-lock in there. So when running as a regular user, rpm cheats by using a private environment, which amounts to no locking at all wrt a concurrent writer. As in, it's unreliable and broken but the alternative of not allowing any queries for regular user is not really an option either.

Note that this is specific to the deprecated Berkeley DB backend which has been entirely dropped upstream. The newer backends do not have such an issue.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gclair
Comment options

Answer selected by pmatilai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants