[Rpm-maint] [rpm-software-management/rpm] Fix rpmtsInitDB() argument confusion (#1525)

Panu Matilainen notifications at github.com
Tue Feb 2 12:36:34 UTC 2021


Since it's introduction, rpmtsInitDB() has passed the second argument directly to rpmdbInit() as permission bits. However commit 81fef9848051e5068694cde9b3c2be743d5a93e1 incorrectly documented this as being related to the db mode read/write *mode*, and also used it that way in the python bindings.

While looking at this, noticed that ndb passes hardcoded 0666 to open() whereas the rpm default open mode is 0644, use the API-requested mode instead. Sqlite doesn't seem to support passing a file mode request in the API (but it defaults to 0644 too).
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1525

-- Commit Summary --

  * Fix rpmtsInitDB() argument confusion
  * Honor requested file permissions when creating ndb database files

-- File Changes --

    M lib/backend/ndb/glue.c (10)
    M lib/rpmts.c (4)
    M lib/rpmts.h (5)
    M python/rpmts-py.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1525.patch
https://github.com/rpm-software-management/rpm/pull/1525.diff

-- 
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/pull/1525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210202/2d02109b/attachment-0001.html>


More information about the Rpm-maint mailing list