diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-07-13 13:58:14 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-07-24 14:12:03 -0500 |
commit | 29e20f9c65fae245d6fd4fce31cc5d01cde3d93f (patch) | |
tree | 3e8410588672f7f0947c4c9bffd2455f855d0b02 /fs/cifs/connect.c | |
parent | d60622eb5a23904facf4a4efac60f5bfa810d7d4 (diff) | |
download | op-kernel-dev-29e20f9c65fae245d6fd4fce31cc5d01cde3d93f.zip op-kernel-dev-29e20f9c65fae245d6fd4fce31cc5d01cde3d93f.tar.gz |
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 5ab173f..6df6fa1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3634,7 +3634,7 @@ try_mount_again: } /* tell server which Unix caps we support */ - if (tcon->ses->capabilities & CAP_UNIX) { + if (cap_unix(tcon->ses)) { /* reset of caps checks mount to see if unix extensions disabled for just this mount */ 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, ses->flags = 0; ses->capabilities = server->capabilities; if (linuxExtEnabled == 0) - ses->capabilities &= (~CAP_UNIX); + ses->capabilities &= (~server->vals->cap_unix); cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", server->sec_mode, server->capabilities, server->timeAdj); @@ -4100,7 +4100,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid) goto out; } - if (ses->capabilities & CAP_UNIX) + if (cap_unix(ses)) reset_cifs_unix_caps(0, tcon, NULL, vol_info); out: kfree(vol_info->username); |