summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc-init.c3
-rw-r--r--src/s6-rc/s6-rc-update.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c
index dfc7b7c..fd08e89 100644
--- a/src/s6-rc/s6-rc-init.c
+++ b/src/s6-rc/s6-rc-init.c
@@ -60,6 +60,8 @@ int main (int argc, char const *const *argv)
if (!deref && compiled[0] != '/')
strerr_dief2x(100, compiled, " is not an absolute path") ;
+ if (live[0] != '/')
+ strerr_dief2x(100, live, " is not an absolute path") ;
if (argv[0][0] != '/')
strerr_dief2x(100, argv[0], " is not an absolute path") ;
if (strchr(prefix, '/') || strchr(prefix, '\n'))
@@ -101,6 +103,7 @@ int main (int argc, char const *const *argv)
memcpy(lfn + sa.len, "/servicedirs", 13) ;
memcpy(cfn, compiled, clen) ;
memcpy(cfn + clen, "/servicedirs", 13) ;
+ sa.len++ ;
if (!hiercopy(cfn, lfn))
{
cleanup(&sa) ;
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c
index cf17eaf..2c7ba9d 100644
--- a/src/s6-rc/s6-rc-update.c
+++ b/src/s6-rc/s6-rc-update.c
@@ -589,6 +589,8 @@ int main (int argc, char const *const *argv, char const *const *envp)
else deadline = tain_infinite_relative ;
}
if (!argc) dieusage() ;
+ if (live[0] != '/')
+ strerr_dief2x(100, live, " is not an absolute path") ;
if (argv[0][0] != '/')
strerr_dief2x(100, argv[0], " is not an absolute path") ;
livelen = strlen(live) ;