hakurei/cmd/hsu/hst.go
Ophestra a1214d350c
Some checks failed
Test / Create distribution (push) Successful in 26s
Test / Sandbox (push) Successful in 40s
Test / Hakurei (push) Successful in 45s
Test / Sandbox (race detector) (push) Successful in 1m0s
Test / Hpkg (push) Has been cancelled
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Has been skipped
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>
2025-11-04 08:19:04 +09:00

17 lines
333 B
Go

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 }