diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-04 08:00:37 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-04 08:24:41 +0900 |
| commit | cb9ebf0e1541c0e49380cda6d4c2d619a0e9933f (patch) | |
| tree | 8bd0bfe3714fd5975dcacb69c0a2afcd2e04c687 /cmd/hsu/hst.go | |
| parent | 9a2a7b749f41f73c2c11e4a4557516307838457b (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'cmd/hsu/hst.go')
| -rw-r--r-- | cmd/hsu/hst.go | 16 |
1 files changed, 16 insertions, 0 deletions
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 } |
