]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: user-mounted loopback fs cannot be unmounted by user
authorKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 15:15:07 +0000 (17:15 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 15:15:07 +0000 (17:15 +0200)
Addresses: https://bugs.archlinux.org/task/31624
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_umount.c

index 36ed435cf508fb212f8dc83c0adf19bdc2469d03..17ec1f0a48bdc609f9f5da4ec0844149bcc4cef9 100644 (file)
@@ -150,7 +150,7 @@ static int is_associated_fs(const char *devname, struct libmnt_fs *fs)
        int flags = 0;
 
        /* check if it begins with /dev/loop */
-       if (strncmp(devname, _PATH_DEV_LOOP, sizeof(_PATH_DEV_LOOP)))
+       if (strncmp(devname, _PATH_DEV_LOOP, sizeof(_PATH_DEV_LOOP) - 1))
                return 0;
 
        src = mnt_fs_get_srcpath(fs);