ldconfig

package
v0.0.0-...-80568f1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct{}

Backend is responsible for maintaining ldconfig cache.

func (*Backend) Initialize

func (b *Backend) Initialize(opts *interfaces.SecurityBackendOptions) error

Initialize does nothing for this backend.

func (*Backend) Name

func (b *Backend) Name() interfaces.SecuritySystem

Name returns the name of the backend.

func (*Backend) NewSpecification

NewSpecification returns a new specification associated with this backend.

func (*Backend) Remove

func (b *Backend) Remove(snapName string) error

Remove removes modules ldconfig files specific to a given snap. This method should be called after removing a snap.

If the method fails it should be re-tried (with a sensible strategy) by the caller.

func (*Backend) SandboxFeatures

func (b *Backend) SandboxFeatures() []string

SandboxFeatures returns the list of features supported by snapd for ldconfig.

func (*Backend) Setup

Setup will make the ldconfig backend generate the needed configuration files and re-create the ld cache.

If the method fails it should be re-tried (with a sensible strategy) by the caller.

type SnapSlot

type SnapSlot struct {
	SnapName string
	SlotName string
}

SnapSlot is the key for libDirs: directories are per snap slot.

type Specification

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

Specification assists in collecting library directories associated with an interface.

Unlike the Backend itself (which is stateless and non-persistent) this type holds internal state that is used by the ldconfig backend during the interface setup process.

func (*Specification) AddConnectedPlug

func (spec *Specification) AddConnectedPlug(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error

AddConnectedPlug records ldconfig-specific side-effects of having a connected plug.

func (*Specification) AddConnectedSlot

func (spec *Specification) AddConnectedSlot(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error

AddConnectedSlot records ldconfig-specific side-effects of having a connected slot.

func (*Specification) AddLibDirs

func (spec *Specification) AddLibDirs(dirs []string) error

AddLibDirs adds dirs with libraries to the specification.

func (*Specification) AddPermanentPlug

func (spec *Specification) AddPermanentPlug(iface interfaces.Interface, plug *snap.PlugInfo) error

AddPermanentPlug records ldconfig-specific side-effects of having a plug.

func (*Specification) AddPermanentSlot

func (spec *Specification) AddPermanentSlot(iface interfaces.Interface, slot *snap.SlotInfo) error

AddPermanentSlot records ldconfig-specific side-effects of having a slot.

func (*Specification) LibDirs

func (spec *Specification) LibDirs() map[SnapSlot][]string

Jump to

Keyboard shortcuts

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