From: Vladimir Serbinenko Date: Tue, 29 Dec 2015 16:43:05 +0000 (+0100) Subject: grub-mount: Fix oath parsing. X-Git-Tag: 2.02-beta3~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4111882828597cbf68ae6f9429b68d0210dc2d41;p=thirdparty%2Fgrub.git grub-mount: Fix oath parsing. Brackets detection was copied from somewhere else and makes no sense in case of grub-mount and prevents user from accessing and files with ) in them. --- diff --git a/util/grub-mount.c b/util/grub-mount.c index 0d0fea5f2..aca5f82e3 100644 --- a/util/grub-mount.c +++ b/util/grub-mount.c @@ -151,7 +151,6 @@ fuse_getattr (const char *path, struct stat *st) { struct fuse_getattr_ctx ctx; char *pathname, *path2; - const char *pathname_t; if (path[0] == '/' && path[1] == 0) { @@ -170,12 +169,7 @@ fuse_getattr (const char *path, struct stat *st) ctx.file_exists = 0; - pathname_t = grub_strchr (path, ')'); - if (! pathname_t) - pathname_t = path; - else - pathname_t++; - pathname = xstrdup (pathname_t); + pathname = xstrdup (path); /* Remove trailing '/'. */ while (*pathname && pathname[grub_strlen (pathname) - 1] == '/')