From 70260e44750356fecb40ff5fcb0f91bcc911ab5f Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 21 Feb 2018 17:27:44 +0100 Subject: udf: Ignore [ug]id=ignore mount options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently uid=ignore and gid=ignore make no sense without uid= and gid= respectively as they result in all files having invalid uid / gid which then doesn't allow even root to modify files and thus causes confusion. And since commit ca76d2d8031f "UDF: fix UID and GID mount option ignorance" (from over 10 years ago) uid= overrides all uids on disk as uid=ignore does. So just silently ignore uid=ignore mount option. Reviewed-by: Pali Rohár Signed-off-by: Jan Kara --- fs/udf/super.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'fs/udf/super.c') diff --git a/fs/udf/super.c b/fs/udf/super.c index 28ee2ac2503d..4d671be50059 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -348,12 +348,8 @@ static int udf_show_options(struct seq_file *seq, struct dentry *root) seq_puts(seq, ",shortad"); if (UDF_QUERY_FLAG(sb, UDF_FLAG_UID_FORGET)) seq_puts(seq, ",uid=forget"); - if (UDF_QUERY_FLAG(sb, UDF_FLAG_UID_IGNORE)) - seq_puts(seq, ",uid=ignore"); if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_FORGET)) seq_puts(seq, ",gid=forget"); - if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_IGNORE)) - seq_puts(seq, ",gid=ignore"); if (UDF_QUERY_FLAG(sb, UDF_FLAG_UID_SET)) seq_printf(seq, ",uid=%u", from_kuid(&init_user_ns, sbi->s_uid)); if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_SET)) @@ -609,14 +605,12 @@ static int udf_parse_options(char *options, struct udf_options *uopt, uopt->flags |= (1 << UDF_FLAG_NLS_MAP); break; #endif - case Opt_uignore: - uopt->flags |= (1 << UDF_FLAG_UID_IGNORE); - break; case Opt_uforget: uopt->flags |= (1 << UDF_FLAG_UID_FORGET); break; + case Opt_uignore: case Opt_gignore: - uopt->flags |= (1 << UDF_FLAG_GID_IGNORE); + /* These options are superseeded by uid= */ break; case Opt_gforget: uopt->flags |= (1 << UDF_FLAG_GID_FORGET); -- cgit v1.2.3-70-g09d2