mirror of https://github.com/tailscale/tailscale/
ssh/tailssh: unify some of the incubator_* GOOS files into incubator.go
In prep for fix for #6888 Change-Id: I79f780c6467a9b7ac03017b27d412d6b0d2f7e6b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>pull/6914/head
parent
ebbf5c57b3
commit
8047dfa2dc
@ -1,21 +0,0 @@
|
||||
// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package tailssh
|
||||
|
||||
import "syscall"
|
||||
|
||||
func (ia *incubatorArgs) loginArgs() []string {
|
||||
return []string{ia.loginCmdPath, "-fp", "-h", ia.remoteIP, ia.localUser}
|
||||
}
|
||||
|
||||
func setGroups(groupIDs []int) error {
|
||||
// darwin returns "invalid argument" if more than 16 groups are passed to syscall.Setgroups
|
||||
// some info can be found here:
|
||||
// https://opensource.apple.com/source/samba/samba-187.8/patches/support-darwin-initgroups-syscall.auto.html
|
||||
// this fix isn't great, as anyone reading this has probably just wasted hours figuring out why
|
||||
// some permissions thing isn't working, due to some arbitrary group ordering, but it at least allows
|
||||
// this to work for more things than it previously did.
|
||||
return syscall.Setgroups(groupIDs[:16])
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package tailssh
|
||||
|
||||
import "syscall"
|
||||
|
||||
func (ia *incubatorArgs) loginArgs() []string {
|
||||
return []string{ia.loginCmdPath, "-fp", "-h", ia.remoteIP, ia.localUser}
|
||||
}
|
||||
|
||||
func setGroups(groupIDs []int) error {
|
||||
return syscall.Setgroups(groupIDs)
|
||||
}
|
Loading…
Reference in New Issue