r9357: Remove DBGC_CLASS cruft copied over from Samba 3. I would like to
[samba.git] / source / auth / auth_server.c
index be272e625cacaf8635da6c0172e223578b1691fa..e5fe02efe7f9b6c9e97874d476c288a5cd75108e 100644 (file)
@@ -21,9 +21,6 @@
 
 #include "includes.h"
 
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_AUTH
-
 /****************************************************************************
  Support for server level security.
 ****************************************************************************/
@@ -32,7 +29,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
 {
        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;
@@ -78,7 +75,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
        if (!connected_ok) {
                release_server_mutex();
                DEBUG(0,("password server not available\n"));
-               smbcli_shutdown(cli);
+               talloc_free(cli);
                return NULL;
        }
        
@@ -86,7 +83,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
                                             desthost, &dest_ip)) {
                release_server_mutex();
                DEBUG(1,("password server fails session request\n"));
-               smbcli_shutdown(cli);
+               talloc_free(cli);
                return NULL;
        }
        
@@ -99,7 +96,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
        if (!smbcli_negprot(cli)) {
                DEBUG(1,("%s rejected the negprot\n",desthost));
                release_server_mutex();
-               smbcli_shutdown(cli);
+               talloc_free(cli);
                return NULL;
        }
 
@@ -107,7 +104,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
            !(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;
        }
 
@@ -121,7 +118,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
                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;
        }
        
@@ -140,7 +137,7 @@ static void free_server_private_data(void **private_data_pointer)
 {
        struct smbcli_state **cli = (struct smbcli_state **)private_data_pointer;
        if (*cli && (*cli)->initialised) {
-               smbcli_shutdown(*cli);
+               talloc_free(*cli);
        }
 }
 
@@ -170,7 +167,7 @@ static DATA_BLOB auth_get_challenge_server(const struct auth_context *auth_conte
                } 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);
                }
 
@@ -354,14 +351,14 @@ use this machine as the password server.\n"));
        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);