#include "includes.h"
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_AUTH
-
/****************************************************************************
Support for server level security.
****************************************************************************/
{
struct smbcli_state *cli = NULL;
fstring desthost;
- struct in_addr dest_ip;
+ struct ipv4_addr dest_ip;
const char *p;
char *pserver;
BOOL connected_ok = False;
if (!connected_ok) {
release_server_mutex();
DEBUG(0,("password server not available\n"));
- smbcli_shutdown(cli);
+ talloc_free(cli);
return NULL;
}
desthost, &dest_ip)) {
release_server_mutex();
DEBUG(1,("password server fails session request\n"));
- smbcli_shutdown(cli);
+ talloc_free(cli);
return NULL;
}
if (!smbcli_negprot(cli)) {
DEBUG(1,("%s rejected the negprot\n",desthost));
release_server_mutex();
- smbcli_shutdown(cli);
+ talloc_free(cli);
return NULL;
}
!(cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) {
DEBUG(1,("%s isn't in user level security mode\n",desthost));
release_server_mutex();
- smbcli_shutdown(cli);
+ talloc_free(cli);
return NULL;
}
DEBUG(0,("%s rejected the initial session setup (%s)\n",
desthost, smbcli_errstr(cli)));
release_server_mutex();
- smbcli_shutdown(cli);
+ talloc_free(cli);
return NULL;
}
{
struct smbcli_state **cli = (struct smbcli_state **)private_data_pointer;
if (*cli && (*cli)->initialised) {
- smbcli_shutdown(*cli);
+ talloc_free(*cli);
}
}
} else if (cli->secblob.length < 8) {
/* We can't do much if we don't get a full challenge */
DEBUG(2,("make_auth_info_server: Didn't receive a full challenge from server\n"));
- smbcli_shutdown(cli);
+ talloc_free(cli);
return data_blob(NULL, 0);
}
if NT_STATUS_IS_OK(nt_status) {
struct passwd *pass = Get_Pwnam(user_info->internal_username.str);
if (pass) {
- nt_status = make_server_info_pw(server_info, pass);
+ nt_status = make_server_info_pw(auth_context, server_info, pass);
} else {
nt_status = NT_STATUS_NO_SUCH_USER;
}
}
if (locally_made_cli) {
- smbcli_shutdown(cli);
+ talloc_free(cli);
}
return(nt_status);