cifs: reinstate original behavior when uid=/gid= options are specified
authorJeff Layton <jlayton@redhat.com>
Fri, 31 Jul 2009 10:56:09 +0000 (06:56 -0400)
committerSteve French <sfrench@us.ibm.com>
Sun, 2 Aug 2009 03:47:25 +0000 (03:47 +0000)
commit9b9d6b2434fe942895c341b9a982f158529788ec
tree402b7f233fae53f45d5ad3a445360200b6fa2cc7
parent5bd9052d79daa4c8beb45436c408b6de672adb82
cifs: reinstate original behavior when uid=/gid= options are specified

This patch fixes the regression reported here:

http://bugzilla.kernel.org/show_bug.cgi?id=13861

commit 4ae1507f6d266d0cc3dd36e474d83aad70fec9e4 changed the default
behavior when the uid= or gid= option was specified for a mount. The
existing behavior was to always clobber the ownership information
provided by the server when these options were specified. The above
commit changed this behavior so that these options simply provided
defaults when the server did not provide this information (unless
"forceuid" or "forcegid" were specified)

This patch reverts this change so that the default behavior is restored.
It also adds "noforceuid" and "noforcegid" options to make it so that
ownership information from the server is preserved, even when the mount
has uid= or gid= options specified.

It also adds a couple of printk notices that pop up when forceuid or
forcegid options are specified without a uid= or gid= option.

Reported-by: Tom Chiverton <bugzilla.kernel.org@falkensweb.com>
Reviewed-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c