Opened 2 years ago
Last modified 1 year ago
Reported by: archie Assigned to: RpmTickets Priority: minor Milestone: rpm-4.12.0 Component: rpm Version: RPM Development Keywords: Cc:
On a system where:
Then rpm -V will (sometimes?) incorrectly report a changed user for 'foo' from 'aaa' to 'bbb'.
As we all know, file ownership in Linux is by UID, not username, so rpm is doing a reverse lookup from UID to username (probably using getpwnam(3)) and (perhaps by chance) getting the wrong answer ('bbb' instead of 'aaa') and then reporting this as a change, when in fact there is no change.
The rpm verify algorithm for user (and similarly group) ownership should instead be:
If duplicate UIDs are present on the system then what getpwuid() returns is just as much by chance as with getpwnam(), there's no abolute right or wrong at that point.
Reopening as per http://lists.rpm.org/pipermail/rpm-maint/2014-June/003700.html
...and close as fixed as per https://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=348eea3a4151b1dbe6f9976ef50cd7ba3820fa79
Whether the former behavior was downright incorrect is perhaps debatable
Thanks.
Just to correct the record, the original description of what the algorithm "should be" was wrong. It should have stated: