Skip to content

Commit 9214ea6

Browse files
committed
rootless: allocate 1G subuids from 524288 (0x80000)
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]>
1 parent 4561580 commit 9214ea6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ fi
6363

6464
# Set up subuid
6565
for f in /etc/subuid /etc/subgid; do
66-
grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:100000:65536" >>$f
66+
# systemd-homed expects the subuid range to be within 524288-1878982656 (0x80000-0x6fff0000).
67+
# See userdbctl.
68+
# 1073741824 (1G) is just an arbitrary number.
69+
# 1073741825-1878982656 is left blank for additional accounts.
70+
grep -qw "${LIMA_CIDATA_USER}" $f || echo "${LIMA_CIDATA_USER}:524288:1073741824" >>$f
6771
done
6872

6973
# Start systemd session

0 commit comments

Comments
 (0)