Skip to content

Commit b034312

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 4f0f3fe commit b034312

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
@@ -67,6 +67,7 @@ enum {
6767
/* Mount options that take no arguments */
6868
Opt_user_xattr, Opt_nouser_xattr,
6969
Opt_forceuid, Opt_noforceuid,
70+
Opt_forcegid, Opt_noforcegid,
7071
Opt_noblocksend, Opt_noautotune,
7172
Opt_hard, Opt_soft, Opt_perm, Opt_noperm,
7273
Opt_mapchars, Opt_nomapchars, Opt_sfu,
@@ -118,6 +119,8 @@ static const match_table_t cifs_mount_option_tokens = {
118119
{ Opt_nouser_xattr, "nouser_xattr" },
119120
{ Opt_forceuid, "forceuid" },
120121
{ Opt_noforceuid, "noforceuid" },
122+
{ Opt_forcegid, "forcegid" },
123+
{ Opt_noforcegid, "noforcegid" },
121124
{ Opt_noblocksend, "noblocksend" },
122125
{ Opt_noautotune, "noautotune" },
123126
{ Opt_hard, "hard" },
@@ -1190,6 +1193,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
11901193
case Opt_noforceuid:
11911194
override_uid = 0;
11921195
break;
1196+
case Opt_forcegid:
1197+
override_gid = 1;
1198+
break;
1199+
case Opt_noforcegid:
1200+
override_gid = 0;
1201+
break;
11931202
case Opt_noblocksend:
11941203
vol->noblocksnd = 1;
11951204
break;

0 commit comments

Comments
 (0)