diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-05-24 05:14:16 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-05-24 05:14:16 +0000 |
commit | 9c3d5d6fd0dd9e2e62a33d0822a72d5209fe3ffb (patch) | |
tree | 573cb8949102074a22f33b4c2706f7947348278e /source3/libsmb | |
parent | 40669777a5f74617fdd80dea3ff5a45a9e9a1aa4 (diff) | |
download | samba-9c3d5d6fd0dd9e2e62a33d0822a72d5209fe3ffb.tar.gz samba-9c3d5d6fd0dd9e2e62a33d0822a72d5209fe3ffb.tar.bz2 samba-9c3d5d6fd0dd9e2e62a33d0822a72d5209fe3ffb.zip |
Remove the password length paramater from cli_full_connection - it really
didn't make any sense, and its was always just strlen(password) anyway.
This fixes it to be strlen(password)+1
Andrew Bartlett
(This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index f41c3b7701..7d18692236 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1030,7 +1030,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip) /* Initialise client credentials for authenticated pipe access */ static void init_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password, int pass_len) + char* domain, char* password) { ZERO_STRUCTP(creds); @@ -1052,7 +1052,7 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, struct in_addr *dest_ip, int port, char *service, char *service_type, char *user, char *domain, - char *password, int pass_len) + char *password) { struct ntuser_creds creds; NTSTATUS nt_status; @@ -1113,7 +1113,8 @@ again: return nt_status; } - if (!cli_session_setup(cli, user, password, pass_len, password, pass_len, + if (!cli_session_setup(cli, user, password, strlen(password)+1, + password, strlen(password)+1, domain)) { DEBUG(1,("failed session setup\n")); nt_status = cli_nt_error(cli); @@ -1125,7 +1126,7 @@ again: if (service) { if (!cli_send_tconX(cli, service, service_type, - (char*)password, pass_len)) { + (char*)password, strlen(password)+1)) { DEBUG(1,("failed tcon_X\n")); nt_status = cli_nt_error(cli); cli_shutdown(cli); @@ -1135,7 +1136,7 @@ again: } } - init_creds(&creds, user, domain, password, pass_len); + init_creds(&creds, user, domain, password); cli_init_creds(cli, &creds); *output_cli = cli; |