commit a78d49b8eecbbd9f0a6dbef688ac4a4a0e88fe8d
parent ae33cbb87a1109b718a535c7587433662dc98071
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Thu, 10 Dec 2020 14:25:59 +0000
bugfix: sarealpath() API
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libs6/s6_supervise_link.c b/src/libs6/s6_supervise_link.c
@@ -110,7 +110,7 @@ int s6_supervise_link (char const *scdir, char const *const *servicedirs, size_t
memcpy(lname + scdirlen + 1 + prefixlen, p, len + 1) ;
rpsa.len = 0 ;
lstart = lnames.len ;
- if (!sarealpath(&rpsa, servicedirs[i]) || !stralloc_0(&rpsa)) goto err ;
+ if (sarealpath(&rpsa, servicedirs[i]) < 0 || !stralloc_0(&rpsa)) goto err ;
if (!stralloc_catb(&lnames, p, len + 1)) goto err ;
if (symlink(rpsa.s, lname) < 0) goto errl ;
}