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
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>
17 lines
333 B
Go
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 }
|