syscall

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetUID

func SetUID(uid uintptr) func() error

SetUID - This is very hacky way of making one process to operate under multiple UIDs, which breaks POSIX semantics (ref. https://man7.org/linux/man-pages/man7/nptl.7.html) The go's native syscall.Setuid is designed in a way, that all threads will switch to provided UID, so we have to use the Linux's setuid() syscall directly (it doesn't honor POSIX semantics).

This logic exists to potentially run tests with DNS UDP conntrack zone splitting enabled.

ref. https://stackoverflow.com/a/66523695

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL