summaryrefslogtreecommitdiffstats
path: root/src/authz.h
diff options
context:
space:
mode:
authordev <dev@example>2026-11-15 11:32:51 +0000
committerdev <dev@example>2026-11-15 11:32:51 +0000
commit2e6dd4a8e9e5302efae6b7532f7f4609882fc21d (patch)
treebcf0ce30538dbea33156ec98da8fd8cfe0d0679e /src/authz.h
parentc2b95afc6aefbab69133a202cab95a50a2df82fc (diff)
downloadaccess-control-2e6dd4a8e9e5302efae6b7532f7f4609882fc21d.tar.gz
access-control-2e6dd4a8e9e5302efae6b7532f7f4609882fc21d.zip
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.
Diffstat (limited to 'src/authz.h')
-rw-r--r--src/authz.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/authz.h b/src/authz.h
index ad39b35..f9fbfa3 100644
--- a/src/authz.h
+++ b/src/authz.h
@@ -138,14 +138,6 @@ int cmd_validate(const policy_t *p, validate_opts o);
// util.c --------------------------------------------------------------------
-// A growing string. strncat with hand-computed room is how buffer bugs are
-// born.
-typedef struct {
- char *s; // never NULL once sb_init has run
- size_t len;
- size_t cap;
-} strbuf_t;
-
// A file, one entry per line. The newline is kept, and a last line without one
// is given one, so the lines may be written straight back out again.
typedef struct {
@@ -164,11 +156,6 @@ void lines_free(lines_t *l);
// nothing at all for a file that is optional here.
int authz_read_lines(const char *path, lines_t *l);
-void sb_init(strbuf_t *b);
-void sb_add(strbuf_t *b, const char *s);
-void sb_addf(strbuf_t *b, const char *fmt, ...);
-void sb_free(strbuf_t *b);
-
void *xmalloc(size_t n);
void *xrealloc(void *p, size_t n);
char *xstrdup(const char *s);