mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
argument to change uid/gid (#927)
different from https://github.com/yggdrasil-network/yggdrasil-go/pull/817 in that it can resolve user names, automatically use user's primary gid & allows specifying gid in the same argument, with `:` eg `username:groupname`. feel free to criticize & suggest different argument name & description because i didn't put much of thought to that. --------- Co-authored-by: Neil <git@neilalexander.dev> Co-authored-by: VNAT <xepjk@protonmail.com> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
c4b29b735c
commit
34f087de1c
3 changed files with 106 additions and 0 deletions
10
cmd/yggdrasil/chuser_other.go
Normal file
10
cmd/yggdrasil/chuser_other.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
|
||||
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
|
||||
|
||||
package main
|
||||
|
||||
import "errors"
|
||||
|
||||
func chuser(user string) error {
|
||||
return errors.New("setting uid/gid is not supported on this platform")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue