From 2e6dd4a8e9e5302efae6b7532f7f4609882fc21d Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 15 Nov 2026 11:32:51 +0000 Subject: Three things the removal left behind The shipped example policy still told operators that `git-authz grant` and `revoke` edit a source copy. Both exit 64 now, so the header says why the deployed copy is read-only instead - the hook must not be able to change who can push - and stops short of naming a command that no longer exists. container/git-host-key made the same claim from the other side: that `validate` cross-checks keys and the rest of the wiring. It does not any more. The text now says what git-host-key itself guarantees, the option prefix it writes onto each key, and what it does not: a key edited in by hand can still lose the identity, and the name still needs a rule. sb_init/sb_add/sb_addf/sb_free and strbuf_t were orphaned when edit.c went - nothing else ever built a string buffer - so they are gone, with the stdarg.h include that only sb_addf needed. 64 lines. src/ and cmd/ are 1,431 non-blank lines. make strict, make test and make sanitizer are clean, sanitizers silent, and the example policy still parses to its 7 rules. --- container/git-host-key | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'container') diff --git a/container/git-host-key b/container/git-host-key index 10d8131..4c7c2dc 100755 --- a/container/git-host-key +++ b/container/git-host-key @@ -23,9 +23,10 @@ Usage: git-host-key list user, fingerprint and comment per key git-host-key rm remove every key of -Keys are cross-checked by 'git-authz validate', which also checks the rest of -the wiring: identity-less keys, keys pinned somewhere other than git-shell, and -identities with no policy rule. +Each key is written with the option prefix above, so a push made with one arrives +named rather than anonymous. Nothing re-checks that afterwards: a key edited in +by hand can lose the identity option, and the name a key carries still needs a +rule in the policy file. Files: GIT_HOST_AUTHORIZED_KEYS authoritative file (default /etc/git-host/secrets/authorized_keys) -- cgit v1.2.3