summaryrefslogtreecommitdiff
path: root/source3/libsmb/cliconnect.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-02 13:39:05 +0200
committerJeremy Allison <jra@samba.org>2013-04-11 14:38:06 -0700
commit9879c88e913ae446ba977baeeeabb298309f5948 (patch)
tree061dba02100247fac5dd9fadc18b6d3af88082d6 /source3/libsmb/cliconnect.c
parent0e1e0a6e4153a585e13bebf617e264523bb13454 (diff)
downloadsamba-9879c88e913ae446ba977baeeeabb298309f5948.tar.gz
samba-9879c88e913ae446ba977baeeeabb298309f5948.tar.bz2
samba-9879c88e913ae446ba977baeeeabb298309f5948.zip
libsmbclient: Remove unused sync wrappers
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r--source3/libsmb/cliconnect.c201
1 files changed, 0 insertions, 201 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 7ec0653d5d..baf79315e0 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -293,40 +293,6 @@ static NTSTATUS cli_session_setup_lanman2_recv(struct tevent_req *req)
return tevent_req_simple_recv_ntstatus(req);
}
-static NTSTATUS cli_session_setup_lanman2(struct cli_state *cli, const char *user,
- const char *pass, size_t passlen,
- const char *workgroup)
-{
- TALLOC_CTX *frame = talloc_stackframe();
- struct tevent_context *ev;
- struct tevent_req *req;
- NTSTATUS status = NT_STATUS_NO_MEMORY;
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- /*
- * Can't use sync call while an async call is in flight
- */
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
- ev = samba_tevent_context_init(frame);
- if (ev == NULL) {
- goto fail;
- }
- req = cli_session_setup_lanman2_send(frame, ev, cli, user, pass, passlen,
- workgroup);
- if (req == NULL) {
- goto fail;
- }
- if (!tevent_req_poll_ntstatus(req, ev, &status)) {
- goto fail;
- }
- status = cli_session_setup_lanman2_recv(req);
- fail:
- TALLOC_FREE(frame);
- return status;
-}
-
/****************************************************************************
Work out suitable capabilities to offer the server.
****************************************************************************/
@@ -536,44 +502,6 @@ NTSTATUS cli_session_setup_guest_recv(struct tevent_req *req)
return tevent_req_simple_recv_ntstatus(req);
}
-static NTSTATUS cli_session_setup_guest(struct cli_state *cli)
-{
- TALLOC_CTX *frame = talloc_stackframe();
- struct tevent_context *ev;
- struct tevent_req *req;
- NTSTATUS status = NT_STATUS_OK;
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- /*
- * Can't use sync call while an async call is in flight
- */
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
- ev = samba_tevent_context_init(frame);
- if (ev == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
-
- req = cli_session_setup_guest_send(frame, ev, cli);
- if (req == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
-
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
- goto fail;
- }
-
- status = cli_session_setup_guest_recv(req);
- fail:
- TALLOC_FREE(frame);
- return status;
-}
-
/****************************************************************************
Do a NT1 plaintext session setup.
****************************************************************************/
@@ -739,40 +667,6 @@ static NTSTATUS cli_session_setup_plain_recv(struct tevent_req *req)
return tevent_req_simple_recv_ntstatus(req);
}
-static NTSTATUS cli_session_setup_plain(struct cli_state *cli,
- const char *user, const char *pass,
- const char *workgroup)
-{
- TALLOC_CTX *frame = talloc_stackframe();
- struct tevent_context *ev;
- struct tevent_req *req;
- NTSTATUS status = NT_STATUS_NO_MEMORY;
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- /*
- * Can't use sync call while an async call is in flight
- */
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
- ev = samba_tevent_context_init(frame);
- if (ev == NULL) {
- goto fail;
- }
- req = cli_session_setup_plain_send(frame, ev, cli, user, pass,
- workgroup);
- if (req == NULL) {
- goto fail;
- }
- if (!tevent_req_poll_ntstatus(req, ev, &status)) {
- goto fail;
- }
- status = cli_session_setup_plain_recv(req);
- fail:
- TALLOC_FREE(frame);
- return status;
-}
-
/****************************************************************************
do a NT1 NTLM/LM encrypted session setup - for when extended security
is not negotiated.
@@ -1100,41 +994,6 @@ static NTSTATUS cli_session_setup_nt1_recv(struct tevent_req *req)
return tevent_req_simple_recv_ntstatus(req);
}
-static NTSTATUS cli_session_setup_nt1(struct cli_state *cli, const char *user,
- const char *pass, size_t passlen,
- const char *ntpass, size_t ntpasslen,
- const char *workgroup)
-{
- TALLOC_CTX *frame = talloc_stackframe();
- struct tevent_context *ev;
- struct tevent_req *req;
- NTSTATUS status = NT_STATUS_NO_MEMORY;
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- /*
- * Can't use sync call while an async call is in flight
- */
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
- ev = samba_tevent_context_init(frame);
- if (ev == NULL) {
- goto fail;
- }
- req = cli_session_setup_nt1_send(frame, ev, cli, user, pass, passlen,
- ntpass, ntpasslen, workgroup);
- if (req == NULL) {
- goto fail;
- }
- if (!tevent_req_poll_ntstatus(req, ev, &status)) {
- goto fail;
- }
- status = cli_session_setup_nt1_recv(req);
- fail:
- TALLOC_FREE(frame);
- return status;
-}
-
/* The following is calculated from :
* (smb_size-4) = 35
* (smb_wcnt * 2) = 24 (smb_wcnt == 12 in cli_session_setup_blob_send() )
@@ -1554,33 +1413,6 @@ static ADS_STATUS cli_session_setup_kerberos_recv(struct tevent_req *req)
return state->ads_status;
}
-static ADS_STATUS cli_session_setup_kerberos(struct cli_state *cli,
- const char *principal)
-{
- struct tevent_context *ev;
- struct tevent_req *req;
- ADS_STATUS status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
- }
- ev = samba_tevent_context_init(talloc_tos());
- if (ev == NULL) {
- goto fail;
- }
- req = cli_session_setup_kerberos_send(ev, ev, cli, principal);
- if (req == NULL) {
- goto fail;
- }
- if (!tevent_req_poll(req, ev)) {
- status = ADS_ERROR_SYSTEM(errno);
- goto fail;
- }
- status = cli_session_setup_kerberos_recv(req);
-fail:
- TALLOC_FREE(ev);
- return status;
-}
#endif /* HAVE_KRB5 */
/****************************************************************************
@@ -2097,39 +1929,6 @@ static ADS_STATUS cli_session_setup_spnego_recv(struct tevent_req *req)
return state->result;
}
-static ADS_STATUS cli_session_setup_spnego(struct cli_state *cli,
- const char *user,
- const char *pass,
- const char *user_domain,
- const char * dest_realm)
-{
- struct tevent_context *ev;
- struct tevent_req *req;
- ADS_STATUS result = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
- NTSTATUS status;
-
- if (smbXcli_conn_has_async_calls(cli->conn)) {
- return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
- }
- ev = samba_tevent_context_init(talloc_tos());
- if (ev == NULL) {
- goto fail;
- }
- req = cli_session_setup_spnego_send(ev, ev, cli, user, pass,
- user_domain, dest_realm);
- if (req == NULL) {
- goto fail;
- }
- if (!tevent_req_poll_ntstatus(req, ev, &status)) {
- result = ADS_ERROR_NT(status);
- goto fail;
- }
- result = cli_session_setup_spnego_recv(req);
-fail:
- TALLOC_FREE(ev);
- return result;
-}
-
struct cli_session_setup_state {
uint8_t dummy;
};