priv

package
v4.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropPrivsFunc added in v4.2.2

type DropPrivsFunc func() error

func EscalateRealEffective added in v4.2.2

func EscalateRealEffective() (DropPrivsFunc, error)

EscalateRealEffective locks the current goroutine to execute on the current OS thread, and then escalates the real and effective uid of the current OS thread to root (uid 0). The previous real uid is set as the saved set-user-ID. A dropPrivsFunc is returned, which must be called to drop privileges and unlock the goroutine at the earliest suitable point.

Jump to

Keyboard shortcuts

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