Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Give a hand-run instance the file modes and socket directory Linux packaging provides

8f24ae1f8c7873da346344c2686b02aac6df781b · Keenan Nemetz · 12d ago · parent a4a6d1e9

Give a hand-run instance the file modes and socket directory Linux packaging provides

Three things a Vole forge gets from its Linux package are missing when it runs
on macOS, and all three are silent.

The systemd unit sets UMask=0027. launchd has no equivalent, so SQLite, git, the
CI spool, and the ACME client would create group- and world-readable files. The
data directory is 0700, so it is contained, but the defence is the unit's today.
internal/secure.Restrict sets the umask in the long-running commands instead: a
packaged Linux install already has it, and setting it where the unit did is
harmless.

The front-door socket lives in /run/vole, which exists because tmpfiles.d and the
post-install script create it. A hand-run instance has nothing to do that, so
`ssh_listen = "socket"` failed with ENOENT before any clone could try. The
listener now creates the directory (0750) when it is missing and warns that the
sshd account still needs access to it. An existing directory is untouched: its
group and setgid bit are the installer's decision.

macOS puts /var behind a symlink to /private/var, so the same config file reached
two ways compared unequal and `vole admin init` printed a --config hint it did
not need. The comparison resolves symlinks on the directory, which also works for
a file that does not exist yet.

Closes: 01M7ZVF0E8YXKD6A8TNX1MW8B3

internal/secure/umask_other.go +7

@@ -0,0 +1,7 @@
1 //go:build !unix
2
3 package secure
4
5 // Restrict does nothing where there is no process umask. Vole's supported
6 // platforms are Unix; this exists so the command builds elsewhere.
7 func Restrict() {}