capability

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package capability provides utilities for capabilities manipulation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithSecBitNoRootDisabled

func RunWithSecBitNoRootDisabled(f func() error) error

RunWithSecBitNoRootDisabled runs the provided function with the thread secure bit SECBIT_NOROOT disabled.

func RunWithSecBitNoRootEnabled

func RunWithSecBitNoRootEnabled(f func() error) error

RunWithSecBitNoRootEnabled runs the provided function with the thread secure bit SECBIT_NOROOT enabled.

func SetFile

func SetFile(filePath, capabilities string) (err error)

SetFile sets the provided capabilities on the file at the provided path. The provided capabilities must be encoded using the syntax specified in cap_from_text(3).

Types

type FuncError

type FuncError struct {
	// contains filtered or unexported fields
}

FuncError wraps the error produced by the execution of the function provided to RunWithSecBitNoRootEnabled and RunWithSecBitNoRootDisabled.

func (*FuncError) Error

func (e *FuncError) Error() string

Jump to

Keyboard shortcuts

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