summaryrefslogtreecommitdiff
path: root/src/supervision/s6-svdir-link.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-28 23:56:14 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-28 23:56:14 +0000
commit1719a60278cf36558b568349c0c9f9b5eb91c999 (patch)
tree5a3bf4cb7942837e55c9d5a3225cb474ad22cdd1 /src/supervision/s6-svdir-link.c
parentfa7f29ff4b5aef142143e9c1d887d73788b703e4 (diff)
downloads6-1719a60278cf36558b568349c0c9f9b5eb91c999.tar.xz
s6-svdir-(un)link fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/supervision/s6-svdir-link.c')
-rw-r--r--src/supervision/s6-svdir-link.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/supervision/s6-svdir-link.c b/src/supervision/s6-svdir-link.c
index 6eeb0a2..8329197 100644
--- a/src/supervision/s6-svdir-link.c
+++ b/src/supervision/s6-svdir-link.c
@@ -91,7 +91,8 @@ int main (int argc, char const *const *argv)
if (argc < 3) dieusage() ;
if (!argv[0][0]) strerr_dief1x(100, "invalid scandir") ;
- if (!argv[1][0]) strerr_dief1x(100, "invalid name") ;
+ if (!argv[1][0] || argv[1][0] == '.' || argv[1][0] == '/')
+ strerr_dief1x(100, "invalid name") ;
if (!argv[2][0]) strerr_dief1x(100, "invalid servicedir") ;
checkscandir(argv[0]) ;