summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorLuk Claes <luk@debian.org>2012-05-19 18:23:40 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-28 14:49:46 +0200
commit3c9c06ac05635dc0af3b29b15c3f568cbf57afdd (patch)
treec4eb482f08b98ab8cf81ddf6d06fcaa5d7fa5796 /source3/libsmb
parentd8c0646a5db34a390ceeb853e50c2d098b992c85 (diff)
downloadsamba-3c9c06ac05635dc0af3b29b15c3f568cbf57afdd.tar.gz
samba-3c9c06ac05635dc0af3b29b15c3f568cbf57afdd.tar.bz2
samba-3c9c06ac05635dc0af3b29b15c3f568cbf57afdd.zip
s3:libsmb: get rid of cli_state_capabilities
Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/async_smb.c4
-rw-r--r--source3/libsmb/cliconnect.c4
-rw-r--r--source3/libsmb/clidfs.c6
-rw-r--r--source3/libsmb/clientgen.c5
-rw-r--r--source3/libsmb/clifile.c4
-rw-r--r--source3/libsmb/clilist.c2
-rw-r--r--source3/libsmb/clireadwrite.c8
-rw-r--r--source3/libsmb/clitrans.c4
-rw-r--r--source3/libsmb/libsmb_file.c4
-rw-r--r--source3/libsmb/libsmb_server.c2
-rw-r--r--source3/libsmb/libsmb_stat.c4
-rw-r--r--source3/libsmb/proto.h1
12 files changed, 21 insertions, 27 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 8ca19111bf..2d4d3fed60 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -107,7 +107,7 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx,
additional_flags |= FLAG_CASELESS_PATHNAMES;
}
- if ((cli_state_capabilities(cli) & CAP_DFS) && cli->dfsroot) {
+ if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) {
additional_flags2 |= FLAGS2_DFS_PATHNAMES;
}
@@ -170,7 +170,7 @@ struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx,
additional_flags |= FLAG_CASELESS_PATHNAMES;
}
- if ((cli_state_capabilities(cli) & CAP_DFS) && cli->dfsroot) {
+ if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) {
additional_flags2 |= FLAGS2_DFS_PATHNAMES;
}
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index f61665b253..3a4850d3d6 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -346,7 +346,7 @@ static NTSTATUS cli_session_setup_lanman2(struct cli_state *cli, const char *use
static uint32_t cli_session_setup_capabilities(struct cli_state *cli,
uint32_t sesssetup_capabilities)
{
- uint32_t client_capabilities = cli_state_capabilities(cli);
+ uint32_t client_capabilities = smb1cli_conn_capabilities(cli->conn);
/*
* We only send capabilities based on the mask for:
@@ -2108,7 +2108,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
/* if the server supports extended security then use SPNEGO */
- if (cli_state_capabilities(cli) & CAP_EXTENDED_SECURITY) {
+ if (smb1cli_conn_capabilities(cli->conn) & CAP_EXTENDED_SECURITY) {
const char *remote_realm = cli_state_remote_realm(cli);
ADS_STATUS status = cli_session_setup_spnego(cli, user, pass,
workgroup,
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 97b6ec0d48..1eaec45eab 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -208,7 +208,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
here before trying to connect to the original share.
cli_check_msdfs_proxy() will fail if it is a normal share. */
- if ((cli_state_capabilities(c) & CAP_DFS) &&
+ if ((smb1cli_conn_capabilities(c->conn) & CAP_DFS) &&
cli_check_msdfs_proxy(ctx, c, sharename,
&newserver, &newshare,
force_encrypt,
@@ -596,10 +596,10 @@ static bool cli_dfs_check_error(struct cli_state *cli, NTSTATUS expected,
{
/* only deal with DS when we negotiated NT_STATUS codes and UNICODE */
- if (!(cli_state_capabilities(cli) & CAP_UNICODE)) {
+ if (!(smb1cli_conn_capabilities(cli->conn) & CAP_UNICODE)) {
return false;
}
- if (!(cli_state_capabilities(cli) & CAP_STATUS32)) {
+ if (!(smb1cli_conn_capabilities(cli->conn) & CAP_STATUS32)) {
return false;
}
if (NT_STATUS_EQUAL(status, expected)) {
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6f81ddde2d..ac59e8b315 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -435,11 +435,6 @@ bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
return ret;
}
-uint32_t cli_state_capabilities(struct cli_state *cli)
-{
- return smb1cli_conn_capabilities(cli->conn);
-}
-
uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs)
{
uint32_t ret = smb1cli_conn_max_xmit(cli->conn);
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 38b95e2457..fc5f5d7024 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -2839,7 +2839,7 @@ NTSTATUS cli_lock64(struct cli_state *cli, uint16_t fnum,
int ltype;
NTSTATUS status;
- if (! (cli_state_capabilities(cli) & CAP_LARGE_FILES)) {
+ if (! (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES)) {
return cli_lock32(cli, fnum, offset, len, timeout, lock_type);
}
@@ -2956,7 +2956,7 @@ NTSTATUS cli_unlock64(struct cli_state *cli,
struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK;
- if (! (cli_state_capabilities(cli) & CAP_LARGE_FILES)) {
+ if (! (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES)) {
return cli_unlock(cli, fnum, offset, len);
}
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 103d044f56..aa8012cb30 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -950,7 +950,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16 attribute,
goto fail;
}
- info_level = (cli_state_capabilities(cli) & CAP_NT_SMBS)
+ info_level = (smb1cli_conn_capabilities(cli->conn) & CAP_NT_SMBS)
? SMB_FIND_FILE_BOTH_DIRECTORY_INFO : SMB_FIND_INFO_STANDARD;
req = cli_list_send(frame, ev, cli, mask, attribute, info_level);
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 8f137c0e81..ac200c7ffd 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -52,7 +52,7 @@ static size_t cli_read_max_bufsize(struct cli_state *cli)
}
return useable_space;
- } else if (cli_state_capabilities(cli) & CAP_LARGE_READX) {
+ } else if (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_READX) {
/*
* Note: CAP_LARGE_READX also works with signing
*/
@@ -86,7 +86,7 @@ static size_t cli_write_max_bufsize(struct cli_state *cli,
if (cli->server_posix_capabilities & CIFS_UNIX_LARGE_WRITE_CAP) {
useable_space = 0xFFFFFF - data_offset;
- } else if (cli_state_capabilities(cli) & CAP_LARGE_WRITEX) {
+ } else if (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_WRITEX) {
useable_space = 0x1FFFF - data_offset;
} else {
return min_space;
@@ -155,7 +155,7 @@ struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
SSVAL(state->vwv + 8, 0, 0);
SSVAL(state->vwv + 9, 0, 0);
- if (cli_state_capabilities(cli) & CAP_LARGE_FILES) {
+ if (smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES) {
SIVAL(state->vwv + 10, 0,
(((uint64_t)offset)>>32) & 0xffffffff);
wct = 12;
@@ -840,7 +840,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
{
struct tevent_req *req, *subreq;
struct cli_write_andx_state *state;
- bool bigoffset = ((cli_state_capabilities(cli) & CAP_LARGE_FILES) != 0);
+ bool bigoffset = ((smb1cli_conn_capabilities(cli->conn) & CAP_LARGE_FILES) != 0);
uint8_t wct = bigoffset ? 14 : 12;
size_t max_write = cli_write_max_bufsize(cli, mode, wct);
uint16_t *vwv;
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 53c53f119e..5dd7008c59 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -80,7 +80,7 @@ struct tevent_req *cli_trans_send(
additional_flags |= FLAG_CASELESS_PATHNAMES;
}
- if ((cli_state_capabilities(cli) & CAP_DFS) && cli->dfsroot) {
+ if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) {
additional_flags2 |= FLAGS2_DFS_PATHNAMES;
}
@@ -174,7 +174,7 @@ NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli,
additional_flags |= FLAG_CASELESS_PATHNAMES;
}
- if ((cli_state_capabilities(cli) & CAP_DFS) && cli->dfsroot) {
+ if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) {
additional_flags2 |= FLAGS2_DFS_PATHNAMES;
}
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index c09011bb0a..9521542cb2 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -26,7 +26,7 @@
#include "libsmb/libsmb.h"
#include "libsmbclient.h"
#include "libsmb_internal.h"
-
+#include "../libcli/smb/smbXcli_base.h"
/*
* Routine to open() a file ...
@@ -551,7 +551,7 @@ SMBC_getatr(SMBCCTX * context,
}
/* if this is NT then don't bother with the getatr */
- if (cli_state_capabilities(targetcli) & CAP_NT_SMBS) {
+ if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) {
errno = EPERM;
TALLOC_FREE(frame);
return False;
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index f9a7599bdb..ccbb6f1aa5 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -489,7 +489,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
here before trying to connect to the original share.
cli_check_msdfs_proxy() will fail if it is a normal share. */
- if ((cli_state_capabilities(c) & CAP_DFS) &&
+ if ((smb1cli_conn_capabilities(c->conn) & CAP_DFS) &&
cli_check_msdfs_proxy(ctx, c, share,
&newserver, &newshare,
/* FIXME: cli_check_msdfs_proxy() does
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index 2a08b30d70..5cfbcb842c 100644
--- a/source3/libsmb/libsmb_stat.c
+++ b/source3/libsmb/libsmb_stat.c
@@ -26,7 +26,7 @@
#include "libsmb/libsmb.h"
#include "libsmbclient.h"
#include "libsmb_internal.h"
-
+#include "../libcli/smb/smbXcli_base.h"
/*
* Generate an inode number from file name for those things that need it
@@ -465,7 +465,7 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
}
/* See if DFS is supported */
- if ((cli_state_capabilities(cli) & CAP_DFS) && cli->dfsroot) {
+ if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) {
flags |= SMBC_VFS_FEATURE_DFS;
}
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index de69be2919..9662b92d6a 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -182,7 +182,6 @@ uint16_t cli_state_set_tid(struct cli_state *cli, uint16_t tid);
uint16_t cli_state_get_uid(struct cli_state *cli);
uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid);
bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
-uint32_t cli_state_capabilities(struct cli_state *cli);
uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs);
uint16_t cli_state_max_requests(struct cli_state *cli);
const uint8_t *cli_state_server_challenge(struct cli_state *cli);