
Basically the function formerly known as do_main() in main.go has been renamed launch() and moved into launch.go. Now there are main.go and main_unix.go files implementing minmial main() functions which load a config and pass it to launch. This allows separating unix-specific security stuff (both the actual system calls which won't compile on other platforms and the definition of command line switches) out from the platform agnostic implementation of the main server logic. It also simplifies the interaction of relative paths in config files with chrooting. Docs still need updating...
14 lines
399 B
Go
14 lines
399 B
Go
// +build js nacl plan9 windows
|
|
|
|
package main
|
|
|
|
type userInfo struct {
|
|
}
|
|
|
|
// Restrict access to the files specified in config in an OS-dependent way.
|
|
// This is intended to be called immediately prior to accepting client
|
|
// connections and may be used to establish a security "jail" for the molly
|
|
// brown executable.
|
|
func enableSecurityRestrictions(config Config, ui userInfo) error {
|
|
return nil
|
|
}
|