From cb9ebf0e1541c0e49380cda6d4c2d619a0e9933f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 4 Nov 2025 08:00:37 +0900 Subject: hst/grp_pwd: specify new uid format This leaves slots available for additional uid ranges in Rosa OS. This breaks all existing installations! Users are required to fix ownership manually. Closes #18. Signed-off-by: Ophestra --- cmd/hsu/hst.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cmd/hsu/hst.go (limited to 'cmd/hsu/hst.go') diff --git a/cmd/hsu/hst.go b/cmd/hsu/hst.go new file mode 100644 index 00000000..d7ffb89a --- /dev/null +++ b/cmd/hsu/hst.go @@ -0,0 +1,16 @@ +package main + +/* copied from hst and must never be changed */ + +const ( + userOffset = 100000 + rangeSize = userOffset / 10 + + identityStart = 0 + identityEnd = appEnd - appStart + + appStart = rangeSize * 1 + appEnd = appStart + rangeSize - 1 +) + +func toUser(userid, appid uint32) uint32 { return userid*userOffset + appStart + appid } -- cgit v1.3.1