net/netns, misc tests: remove TestOnlySkipPrivilegedOps, argv checks
The netns UID check is sufficient for now. We can do something else later if/when needed.
This commit is contained in:
@ -11,13 +11,7 @@
|
||||
// operating system, and perhaps even by version of the OS.
|
||||
package netns
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"tailscale.com/syncs"
|
||||
)
|
||||
|
||||
var skipPrivileged syncs.AtomicBool
|
||||
import "net"
|
||||
|
||||
// Listener returns a new net.Listener with its Control hook func
|
||||
// initialized as necessary to run in logical network namespace that
|
||||
@ -32,10 +26,3 @@ func Listener() *net.ListenConfig {
|
||||
func Dialer() *net.Dialer {
|
||||
return &net.Dialer{Control: control}
|
||||
}
|
||||
|
||||
// TestOnlySkipPrivilegedOps disables any behavior in this package
|
||||
// that requires root or other elevated privileges. It's used only in
|
||||
// tests, and using it definitely breaks some Tailscale functionality.
|
||||
func TestOnlySkipPrivilegedOps() {
|
||||
skipPrivileged.Set(true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user