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 ¶
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 ¶
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.