diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-02 20:16:34 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-02 20:16:34 +0000 |
commit | dd3ccdd7d996c107766cdad3c403e8b8947b9e65 (patch) | |
tree | d316d368f0f71a70e2a064df58c89cc776c5035f /source/libsmb | |
parent | e21367c0ebdc5e202cdc39d50950bff089bf67f8 (diff) | |
download | samba-dd3ccdd7d996c107766cdad3c403e8b8947b9e65.tar.gz samba-dd3ccdd7d996c107766cdad3c403e8b8947b9e65.tar.xz samba-dd3ccdd7d996c107766cdad3c403e8b8947b9e65.zip |
new get_any_dc_name() function allows lookups of trusted domains from
lp_trusted_domains() parameter, so trusted domain logins should work,
right, if you put user = TRUSTED_DOMAIN\NTuser in "domain name map", right?
right - as _long_ as you're not using NTLMv2, because the damn NT username
gets mapped to the damn unix name too early, and NTLMv2 challenge-responses
are based on the client's user name, client's domain name, client's host name
etc damn etc.
so it becomes necessary to stop using char* username because this allows
for massive amounts of confusion as to which username is being referred to.
the underlying unix username on the local unix system that is associated with
the smbd process that represents the NT username? or the NT username itself?
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/clientgen.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 71242112867..5f898a8b0ec 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -31,8 +31,18 @@ extern int DEBUGLEVEL; * set the port that will be used for connections by the client */ -void copy_user_creds(struct user_credentials *to, const struct user_credentials *from) +void copy_user_creds(struct user_credentials *to, + const struct user_credentials *from) { + if (from == NULL) + { + to->domain[0] = 0; + to->user_name[0] = 0; + pwd_set_nullpwd(&to->pwd); + to->ntlmssp_flags = 0; + + return; + } safe_strcpy(to->domain , from->domain , sizeof(from->domain )-1); safe_strcpy(to->user_name, from->user_name, sizeof(from->user_name)-1); memcpy(&to->pwd, &from->pwd, sizeof(from->pwd)); @@ -2675,18 +2685,7 @@ initialise a client structure ****************************************************************************/ void cli_init_creds(struct cli_state *cli, const struct user_credentials *usr) { - if (usr != NULL) - { - copy_user_creds(&cli->usr, usr); - cli->ntlmssp_cli_flgs = usr->ntlmssp_flags; - } - else - { - cli->usr.domain[0] = 0; - cli->usr.user_name[0] = 0; - pwd_set_nullpwd(&cli->usr.pwd); - cli->ntlmssp_cli_flgs = 0; - } + copy_user_creds(&cli->usr, usr); } /**************************************************************************** @@ -3336,6 +3335,8 @@ BOOL cli_connect_auth(struct cli_state *cli, extern pstring global_myname; extern pstring scope; struct nmb_name calling, called; + + ZERO_STRUCTP(cli); if (!cli_initialise(cli)) { DEBUG(0,("unable to initialise client connection.\n")); @@ -3412,7 +3413,6 @@ BOOL cli_connect_servers_auth(struct cli_state *cli, if (!connected_ok) { DEBUG(0,("Domain password server not available.\n")); - cli_shutdown(cli); } return connected_ok; @@ -3485,7 +3485,6 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p) if (!connected_ok) { DEBUG(0,("cli_connect_serverlist: Domain password server not available.\n")); - cli_shutdown(cli); } return connected_ok; |