From 9308bc100681fdb0fd87c0536c1c8fcb266c53e9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 14 Oct 2016 13:46:35 +0000 Subject: bugfix: random_sauniquename API in s6-rc-update --- src/s6-rc/s6-rc-update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c index da56250..a43d165 100644 --- a/src/s6-rc/s6-rc-update.c +++ b/src/s6-rc/s6-rc-update.c @@ -334,7 +334,7 @@ static inline void make_new_livedir (unsigned char const *oldstate, s6rc_db_t co if (sareadlink(&satmp, live) < 0) strerr_diefu2sys(111, "readlink ", live) ; if (!s6rc_sanitize_dir(sa, live, &dirlen)) dienomem() ; llen = sa->len ; - if (!random_sauniquename(sa, 8) || !stralloc_0(sa)) dienomem() ; + if (random_sauniquename(sa, 8) < 0 || !stralloc_0(sa)) dienomem() ; newlen = --sa->len ; if (mkdir(sa->s + sabase, 0755) < 0) strerr_diefu2sys(111, "mkdir ", sa->s + sabase) ; { -- cgit v1.2.3