diff options
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); |