gitea: the patch spool is read by the module's own account
Review round 1: since gitea runs as its own account, the tools no longer run as the machine's account that owns the forge-patches directory; they read and remove the named file as any other account may. Builds: design 47 H2 H-A-543
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// A patch too large to type into a call is handed over as a file (novox/hq issue 852). The caller writes it into
|
||||
// one spool directory the module declares (mode 0733: anyone writes, nobody lists) and names it in patch_file,
|
||||
// with the file's SHA-256. The tool runs as the machine's account, so it reads nothing but that directory: the
|
||||
// with the file's SHA-256. The tool runs as the module's own account gitea, and reads nothing but that directory: the
|
||||
// name is 32 to 64 characters of [0-9a-f], so it holds no separator and no dot; the file must be a regular file
|
||||
// (never a symlink); and its hash must be the caller's, because without the sticky bit another writer could have
|
||||
// replaced it. The file is removed once taken, whether the commit was made or not.
|
||||
|
||||
Reference in New Issue
Block a user