summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-09-21 12:03:29 +0000
committerLaurent Bercot <ska@appnovation.com>2022-09-21 12:03:29 +0000
commit4f804382997c41efa078e2e085bbc42aafdebb2b (patch)
tree6d644f55932e694d4201fc225b52abcc92d6fea4
parent355d6a83810e1b7bb3bc2ccd3102141dbea63821 (diff)
downloads6-4f804382997c41efa078e2e085bbc42aafdebb2b.tar.xz
bugfix: s6-accessrules-fs-from-cdb's incorrectly terminated string
Also overview typo fix. Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--doc/overview.html2
-rw-r--r--src/conn-tools/s6-accessrules-fs-from-cdb.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/overview.html b/doc/overview.html
index b127542..bb7c763 100644
--- a/doc/overview.html
+++ b/doc/overview.html
@@ -383,7 +383,7 @@ implemented for instance in the
<p>
s6 provides you with a few more tools to control and monitor your
-services. services. For instance:
+services. For instance:
</p>
<ul>
diff --git a/src/conn-tools/s6-accessrules-fs-from-cdb.c b/src/conn-tools/s6-accessrules-fs-from-cdb.c
index d2cb4af..ce1ff9c 100644
--- a/src/conn-tools/s6-accessrules-fs-from-cdb.c
+++ b/src/conn-tools/s6-accessrules-fs-from-cdb.c
@@ -26,7 +26,7 @@ static void cleanup ()
static int domkdir (char const *s)
{
- return mkdir(s, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH | S_ISGID) < 0 ? (errno == EEXIST) : 1 ;
+ return mkdir(s, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH | S_ISGID) < 0 ? errno == EEXIST : 1 ;
}
static void mkdirp (char *s)
@@ -105,9 +105,9 @@ static int doit (char const *key, uint32_t klen, char const *data, uint32_t dlen
memcpy(name, basedir, basedirlen) ;
name[basedirlen] = '/' ;
memcpy(name + basedirlen + 1, key, klen) ;
- name[basedirlen + klen + 1 + klen] = 0 ;
+ name[basedirlen + 1 + klen] = 0 ;
mkdirp(name) ;
- name[basedirlen + klen + 1] = '/' ;
+ name[basedirlen + 1 + klen] = '/' ;
if (data[0] == 'A')
{
memcpy(name + basedirlen + klen + 2, "allow", 6) ;