Repository navigation
Fix DynamicUser=yes with static User= whose UID and GID are different - #9720
Conversation
5d27b46 to
cfc9bf6
Compare
|
Are there any static user on Ubuntu whose uid and gid are different? Currently, the new test is meaningless on Ubuntu. |
When DynamicUser=yes and static User= are set, and the user has different uid and gid, then as the storage socket for the dynamic user does not contains gid, we need to obtain gid. Follow-up for 9ec655c. Fixes systemd#9702.
Perhaps this one: Available on Ubuntu (18.04) and Debian (Stretch) it seems. Also present on Fedora Rawhide, but it's a bit weirder there: 😕 In any case, seems to fit the bill. I guess one option is to create one explicitly for your tests. I imagine the tmpfiles tests already create users, no? Might perhaps want to do the same here... |
|
Thanks. A test for Ubuntu or Debian is added which uses user games. |
|
|
||
| [Service] | ||
| Type=oneshot | ||
| ExecStart=/bin/sh -x -c 'test "$$(id -nG)" = "adm" && test "$$(id -ng)" = "adm" && test "$$(id -nu)" = "adm"' |
|
|
|
@poettering BTW, what do you think about also storing gid in the storage socket? |
Fixes #9702.