Versions in this module Expand all Collapse all v0 v0.12.1 Dec 22, 2025 v0.12.0 Nov 8, 2025 v0.11.2 Sep 12, 2025 v0.11.1 Sep 6, 2025 v0.11.0 Sep 2, 2025 v0.10.2 Aug 7, 2025 v0.10.1 Jul 22, 2025 v0.10.0 Jul 20, 2025 Changes in this version + var ErrNoSecurityCtx = errors.New("security context not found") + var ErrSecurityCtxDataAssertion = errors.New("data type cannot be asserted") + func DropCapabilities() error + func ExecAsUser(data any) error + func GetDefaultRunAsUser() (string, error) + type Config struct + Caps []cap.Value + ReadPaths []string + ReadWritePaths []string + RunAsUser string + type ExecSecurityCtxData struct + Cmd []string + Context context.Context + Environ []string + GID int + Logger *slog.Logger + StdOut []byte + UID int + type Manager struct + func NewManager(c *Config, logger *slog.Logger) (*Manager, error) + func (m *Manager) DeleteACLEntries() error + func (m *Manager) DropPrivileges(enableEffective bool) error + type SCConfig struct + Caps []cap.Value + ExecNatively bool + Func func(any) error + Logger *slog.Logger + Name string + type SecurityContext struct + Name string + func NewSecurityContext(c *SCConfig) (*SecurityContext, error) + func (s *SecurityContext) Exec(data any) error