fix logic bug inside extroot uuid verification code
authorJohn Crispin <john@phrozen.org>
Wed, 31 Aug 2016 16:16:31 +0000 (18:16 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 31 Aug 2016 16:16:31 +0000 (18:16 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
block.c

diff --git a/block.c b/block.c
index 720ecb11dc25814638ee8bee051fff58d135a1c6..2e95c033b53ba23b091498e396e2db41e9f0141a 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1108,7 +1108,7 @@ static int check_extroot(char *path)
                                         tag, errno, strerror(errno));
                        fclose(fp);
 
-                       if (*uuid || !strcasecmp(uuid, pr->uuid))
+                       if (*uuid && !strcasecmp(uuid, pr->uuid))
                                return 0;
 
                        ULOG_ERR("extroot: UUID mismatch (root: %s, %s: %s)\n",