[Rpm-maint] [rpm-software-management/rpm] Add back support for NSS-based user/group resolution (PR #4085)
Panu Matilainen
notifications at github.com
Tue Jan 20 09:51:02 UTC 2026
@pmatilai commented on this pull request.
> long id;
- if (lookup_num(pwfile(), thisUname, 0, 2, &id))
- return -1;
- rpmug->unameMap.insert({thisUname, id});
+ if (pwfile() || !rstreq(rpmcliRootDir, "/")) {
rpmcliRootDir only works for rpm(8), but we need this to work for all API users.
It's not so much whether a root is set but a whether we're in it or not at the time of the lookup, and rpmChrootDone() should work for that.
Hmm, but a process can do multiple transactions, which might have different roots and all. Since rpmug is a global entity, the cache should be flushed whenever the lookup root changes. For that, you'll need to add a function to rpmchroot.cc for retrieving the currently set root.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4085#pullrequestreview-3681298166
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/4085/review/3681298166 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260120/96e706a1/attachment.htm>
More information about the Rpm-maint
mailing list