2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

feat: 添加一层root用户检查

This commit is contained in:
耗子
2024-10-23 22:38:30 +08:00
parent 59c08f0850
commit 3c8f606d45

View File

@@ -1,10 +1,15 @@
package bootstrap
import (
"os"
"runtime/debug"
)
func boot() {
if os.Geteuid() != 0 {
panic("panel must run as root")
}
debug.SetGCPercent(10)
debug.SetMemoryLimit(64 << 20)