UPSTREAM: debugfs: convert gid= argument from decimal, not octal
authorDave Reisner <dreisner@archlinux.org>
Wed, 2 Jan 2013 13:54:37 +0000 (08:54 -0500)
committerChromeBot <chrome-bot@google.com>
Wed, 6 Feb 2013 04:16:08 +0000 (20:16 -0800)
This patch technically breaks userspace, but I suspect that anyone who
actually used this flag would have encountered this brokenness, declared
it lunacy, and already sent a patch.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Reviewed-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chromium-os:23758
TEST=link build, debugfs mount options work with decimal for gid

Change-Id: I4a37f3bd13da0ced916bde8038de16ebc3504d5e
(cherry picked from upstream commit f1688e0431d3a395388e70fe21da89ed0de0c323)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42650
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
fs/debugfs/inode.c

index b80bc84..8bdbf7d 100644 (file)
@@ -174,7 +174,7 @@ static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts)
                        opts->uid = option;
                        break;
                case Opt_gid:
-                       if (match_octal(&args[0], &option))
+                       if (match_int(&args[0], &option))
                                return -EINVAL;
                        opts->gid = option;
                        break;