Skip to content

Commit

Permalink
rootless: allocate 1G subuids from 524288 (0x80000)
Browse files Browse the repository at this point in the history
systemd-homed expects the subuid range to be within
524288-1878982656 (0x80000-0x6fff0000).
See `userdbctl(1)`.

This commit also increases the subuids from 64K to 1G.

Fix issue 1396
Fix issue 1227

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Oct 11, 2024
1 parent 5d41ca2 commit 8204ca9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ fi

# Set up subuid
for f in /etc/subuid /etc/subgid; do
grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:100000:65536" >>$f
# systemd-homed expects the subuid range to be within 524288-1878982656 (0x80000-0x6fff0000).
# See userdbctl.
grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:524288:1073741824" >>$f
done

# Start systemd session
Expand Down

0 comments on commit 8204ca9

Please sign in to comment.