commit - 3039b005314e94c1558771544b2064a1a10507fd
commit + a474b672ce9285ba515ade45d6e91fe4a1648d2a
blob - fbc17257cbb8ceb3f87916183d64f1660a16d0f7
blob + be28e070e622a6bb2ad28de4120884dfffc27dfc
--- gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c
+++ gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c
switch (rule->access) {
case GOTSYS_ACCESS_DENIED:
- access = "deny";
+ access = "deny ";
break;
case GOTSYS_ACCESS_PERMITTED:
- access = "permit";
+ access = "permit ";
break;
default:
return got_error_fmt(GOT_ERR_PARSE_CONFIG,
}
if (rule->authorization & GOTSYS_AUTH_WRITE)
- authorization = "rw";
+ authorization = "rw ";
else if (rule->authorization & GOTSYS_AUTH_READ)
- authorization = "ro";
+ authorization = "ro ";
else
- return got_error_fmt(GOT_ERR_PARSE_CONFIG,
- "unknown access rule authorization flags 0x%x",
- rule->authorization);
+ authorization = "";
- ret = dprintf(gotd_conf_tmpfd, "\t%s %s %s\n",
+ ret = dprintf(gotd_conf_tmpfd, "\t%s%s%s\n",
access, authorization, rule->identifier);
if (ret == -1)
return got_error_from_errno2("dprintf",
gotd_conf_tmppath);
- if (ret != 3 + strlen(access) + strlen(authorization) +
+ if (ret != 1 + strlen(access) + strlen(authorization) +
strlen(rule->identifier) + 1) {
return got_error_fmt(GOT_ERR_IO,
"short write to %s", gotd_conf_tmppath);