diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-07-13 05:58:14 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-07-24 15:12:03 -0400 |
commit | 29e20f9c65fae245d6fd4fce31cc5d01cde3d93f (patch) | |
tree | 3e8410588672f7f0947c4c9bffd2455f855d0b02 /fs/cifs/connect.c | |
parent | d60622eb5a23904facf4a4efac60f5bfa810d7d4 (diff) |
CIFS: Make CAP_* checks protocol independent
Since both CIFS and SMB2 use ses->capabilities (server->capabilities)
field but flags are different we should make such checks protocol
independent.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 5ab173fd6339..6df6fa14cba8 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3634,7 +3634,7 @@ try_mount_again: | |||
3634 | } | 3634 | } |
3635 | 3635 | ||
3636 | /* tell server which Unix caps we support */ | 3636 | /* tell server which Unix caps we support */ |
3637 | if (tcon->ses->capabilities & CAP_UNIX) { | 3637 | if (cap_unix(tcon->ses)) { |
3638 | /* reset of caps checks mount to see if unix extensions | 3638 | /* reset of caps checks mount to see if unix extensions |
3639 | disabled for just this mount */ | 3639 | disabled for just this mount */ |
3640 | reset_cifs_unix_caps(xid, tcon, cifs_sb, volume_info); | 3640 | reset_cifs_unix_caps(xid, tcon, cifs_sb, volume_info); |
@@ -3993,7 +3993,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, | |||
3993 | ses->flags = 0; | 3993 | ses->flags = 0; |
3994 | ses->capabilities = server->capabilities; | 3994 | ses->capabilities = server->capabilities; |
3995 | if (linuxExtEnabled == 0) | 3995 | if (linuxExtEnabled == 0) |
3996 | ses->capabilities &= (~CAP_UNIX); | 3996 | ses->capabilities &= (~server->vals->cap_unix); |
3997 | 3997 | ||
3998 | cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", | 3998 | cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", |
3999 | server->sec_mode, server->capabilities, server->timeAdj); | 3999 | server->sec_mode, server->capabilities, server->timeAdj); |
@@ -4100,7 +4100,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid) | |||
4100 | goto out; | 4100 | goto out; |
4101 | } | 4101 | } |
4102 | 4102 | ||
4103 | if (ses->capabilities & CAP_UNIX) | 4103 | if (cap_unix(ses)) |
4104 | reset_cifs_unix_caps(0, tcon, NULL, vol_info); | 4104 | reset_cifs_unix_caps(0, tcon, NULL, vol_info); |
4105 | out: | 4105 | out: |
4106 | kfree(vol_info->username); | 4106 | kfree(vol_info->username); |