]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: fix incorrect return value in namecheck()
authorEric Sandeen <sandeen@redhat.com>
Fri, 1 Feb 2019 17:54:15 +0000 (11:54 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 1 Feb 2019 17:54:15 +0000 (11:54 -0600)
Obviously a directory entry with a '/' in the name should return
1, i.e. failure.  This was just a dumb thinko.

Fixes: 45571fd5885d ("xfs_repair: allow '/' in attribute names")
Reported-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/da_util.c

index c5e690c30b78a73e253f8e1f4dca989724c33647..4a258e584e2a1b3a486e0db8c766ec223f83c052 100644 (file)
@@ -31,7 +31,7 @@ namecheck(
 
        for (c = name, i = 0; i < length; i++, c++) {
                if (isadir && *c == '/')
-                       return 0;
+                       return 1;
                if (*c == '\0')
                        return 1;
        }