spoolowner

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package spoolowner keeps every file in a run's spool directory with the directory's owner. The directory has two writers that may run as different users: wardyn-runnerd, and the egress proxy as the user the directory was handed to (a root wardyn-runnerd on a rootful daemon hands it to the proxy image's non-root user). A file either of them creates there (each rewrite is a new file, renamed into place) must stay readable and writable by the other for the run's whole life.

Index

Constants

This section is empty.

Variables

View Source
var (
	ProcessUID = os.Geteuid
	Chown      = func(f *os.File, uid, gid int) error { return f.Chown(uid, gid) }
)

ProcessUID and Chown are this process's effective uid and the fchown of an open file. They are variables only so a test, which cannot be root, can stand in for another user.

Functions

func Keep

func Keep(root *os.Root, f *os.File) error

Keep gives f, an open file in the directory root holds, to that directory's owner, and does nothing when this process already is that owner (every case but a root wardyn-runnerd beside a non-root proxy). It acts on the open file, never on a name, and changes no mode. A file with more than one link is refused and left as it is: a name that already existed could be a hard link to a file outside the spool, which must never be handed over.

Types

This section is empty.

Jump to

Keyboard shortcuts

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