mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-20 14:03:39 +03:00
nspawn: fix UID map string
We send/recv the set of payload uid, host uid, payload gid, host gid. Hence, the index must be incremented with 4, instead of 2. Fixes #23664. (cherry picked from commit 05ab439a62de8bb47e4137d2a8a473a307ccfb33)
This commit is contained in:
parent
73a327d2f4
commit
20037219b7
@ -4137,8 +4137,8 @@ static int make_uid_map_string(
|
||||
* quadruplet, consisting of host and container UID + GID. */
|
||||
|
||||
for (size_t i = 0; i < n_bind_user_uid; i++) {
|
||||
uid_t payload_uid = bind_user_uid[i*2+offset],
|
||||
host_uid = bind_user_uid[i*2+offset+1];
|
||||
uid_t payload_uid = bind_user_uid[i*4+offset],
|
||||
host_uid = bind_user_uid[i*4+offset+1];
|
||||
|
||||
assert(previous_uid <= payload_uid);
|
||||
assert(payload_uid < arg_uid_range);
|
||||
|
Loading…
x
Reference in New Issue
Block a user