diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-22 16:53:51 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-22 18:17:41 +0200 |
commit | 6d4f9fc251fabc2951356db968e72b65ebf8c027 (patch) | |
tree | 9d8ca44636a261f9884fd785bc34ade7e0ee60e2 /source3 | |
parent | 477a8a7e479952640703ca2f30dc6e184a57edb1 (diff) | |
download | samba-6d4f9fc251fabc2951356db968e72b65ebf8c027.tar.gz samba-6d4f9fc251fabc2951356db968e72b65ebf8c027.tar.bz2 samba-6d4f9fc251fabc2951356db968e72b65ebf8c027.zip |
s3:libsmb: move cli_state->desthost to cli_state->conn.remote_name
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 22 18:17:41 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/client.h | 3 | ||||
-rw-r--r-- | source3/libsmb/clientgen.c | 8 | ||||
-rw-r--r-- | source3/libsmb/proto.h | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 86c5f22ce5..34d99d4c08 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -56,8 +56,6 @@ struct cli_state { int rap_error; NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */ - char *desthost; - /* The credentials used to open the cli_state connection. */ char *domain; char *user_name; @@ -125,6 +123,7 @@ struct cli_state { int fd; struct sockaddr_storage local_ss; struct sockaddr_storage remote_ss; + const char *remote_name; struct tevent_queue *outgoing; struct tevent_req **pending; } conn; diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 2b254294ac..559be9265b 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -163,7 +163,7 @@ NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, int fd, - const char *desthost, + const char *remote_name, int signing_state) { struct cli_state *cli = NULL; @@ -238,8 +238,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, } cli->conn.pending = NULL; - cli->desthost = talloc_strdup(cli, desthost); - if (cli->desthost == NULL) { + cli->conn.remote_name = talloc_strdup(cli, remote_name); + if (cli->conn.remote_name == NULL) { goto error; } @@ -378,7 +378,7 @@ const struct sockaddr_storage *cli_state_remote_sockaddr(struct cli_state *cli) const char *cli_state_remote_name(struct cli_state *cli) { - return cli->desthost; + return cli->conn.remote_name; } uint16_t cli_state_get_vc_num(struct cli_state *cli) diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 99446dcee2..7924091935 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -161,7 +161,7 @@ NTSTATUS cli_set_password(struct cli_state *cli, const char *password); NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password); struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, int fd, - const char *desthost, + const char *remote_name, int signing_state); bool cli_state_encryption_on(struct cli_state *cli); void cli_nt_pipes_close(struct cli_state *cli); |