Skip to content

Commit edaee89

Browse files
jtlaytongregkh
authored andcommitted
cifs: reinstate the forcegid option
commit 72bd481 upstream. Apparently this was lost when we converted to the standard option parser in 8830d7e Reported-by: Gregory Lee Bartholomew <gregory.lee.bartholomew@gmail.com> Cc: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d94a5db commit edaee89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fs/cifs/connect.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ enum {
7070
/* Mount options that take no arguments */
7171
Opt_user_xattr, Opt_nouser_xattr,
7272
Opt_forceuid, Opt_noforceuid,
73+
Opt_forcegid, Opt_noforcegid,
7374
Opt_noblocksend, Opt_noautotune,
7475
Opt_hard, Opt_soft, Opt_perm, Opt_noperm,
7576
Opt_mapchars, Opt_nomapchars, Opt_sfu,
@@ -121,6 +122,8 @@ static const match_table_t cifs_mount_option_tokens = {
121122
{ Opt_nouser_xattr, "nouser_xattr" },
122123
{ Opt_forceuid, "forceuid" },
123124
{ Opt_noforceuid, "noforceuid" },
125+
{ Opt_forcegid, "forcegid" },
126+
{ Opt_noforcegid, "noforcegid" },
124127
{ Opt_noblocksend, "noblocksend" },
125128
{ Opt_noautotune, "noautotune" },
126129
{ Opt_hard, "hard" },
@@ -1345,6 +1348,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
13451348
case Opt_noforceuid:
13461349
override_uid = 0;
13471350
break;
1351+
case Opt_forcegid:
1352+
override_gid = 1;
1353+
break;
1354+
case Opt_noforcegid:
1355+
override_gid = 0;
1356+
break;
13481357
case Opt_noblocksend:
13491358
vol->noblocksnd = 1;
13501359
break;

0 commit comments

Comments
 (0)