[Rpm-maint] [rpm-software-management/rpm] rpm is unable to find existing group (4.20.0 regression) (Issue #3594)
Jan Palus
notifications at github.com
Mon Feb 24 23:57:54 UTC 2025
jpalus created an issue (rpm-software-management/rpm#3594)
**Describe the bug**
rpm 4.20.x fails with ie:
```
warning: group http does not exist - using root
```
even though group exists:
```
$ grep http /etc/group
http::51:nginx
```
**To Reproduce**
Steps to reproduce the behavior:
1. Create a group with empty password field
2. Use the group in spec and build package
3. Try to install package with rpm 4.20.x
**Expected behavior**
Files have proper group
**Environment**
- OS / Distribution: PLD 3.0
- Version rpm 4.20.1
**Additional context**
I believe the regression was introduced with commit https://github.com/rpm-software-management/rpm/commit/f3eaeeb7341085e1850e914350cf1f33d538320d which makes unfortunate use of `strtok_r`. `strtok*` functions by definition do not handle empty fields since they are required to:
> Upon successful completion, strtok() shall return a pointer to the first byte of a token
(https://pubs.opengroup.org/onlinepubs/9799919799/)
and there's not a single byte in empty field.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3594
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3594 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250224/f6d7af5c/attachment.htm>
More information about the Rpm-maint
mailing list