[Rpm-maint] [rpm-software-management/rpm] check UID_0_USER before we use it. (Issue #1838)
Einsler Lee
notifications at github.com
Fri Nov 19 03:50:15 UTC 2021
Now, rpm set this macro by scaning `/etc/passwd`. But if `/etc/passwd` doesn't exist, UID_0_USER will be set to "".
We encountered this problem when we build our rpm packages on obs, and found Users and Groups of many files (especially those no %attr set in spec file) are not set. After some diging, we can reproduce this problem by removing `/etc/passwd`.
So, maybe we should check UID_0_USER before we use it. i.e. If it's `\0`, we fail or set it to `root` by default.
--
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/1838
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211118/1b3fe98e/attachment.html>
More information about the Rpm-maint
mailing list