ssh/tailssh: limit setgroups to 16 on macOS

Fixes #4938

Signed-off-by: Adam Eijdenberg <adam@continusec.com>
This commit is contained in:
Adam Eijdenberg
2022-06-26 03:41:15 +00:00
committed by Brad Fitzpatrick
parent 7f807fef6c
commit 9294a14a37
3 changed files with 18 additions and 1 deletions

View File

@@ -177,3 +177,7 @@ func maybeStartLoginSessionLinux(logf logger.Logf, ia incubatorArgs) (func() err
func (ia *incubatorArgs) loginArgs() []string {
return []string{ia.loginCmdPath, "-f", ia.localUser, "-h", ia.remoteIP, "-p"}
}
func setGroups(groupIDs []int) error {
return syscall.Setgroups(groupIDs)
}