Skip to content

Commit

Permalink
debugfs: convert gid= argument from decimal, not octal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Vasiliy Kulikov <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
falconindy authored and gregkh committed Jan 11, 2013
1 parent 54b956b commit f1688e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts)
opts->uid = uid;
break;
case Opt_gid:
if (match_octal(&args[0], &option))
if (match_int(&args[0], &option))
return -EINVAL;
gid = make_kgid(current_user_ns(), option);
if (!gid_valid(gid))
Expand Down

0 comments on commit f1688e0

Please sign in to comment.