s4-schannel: add ldb suffix to schannel functions.
authorGünther Deschner <gd@samba.org>
Tue, 25 Aug 2009 19:09:53 +0000 (21:09 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 27 Aug 2009 13:55:18 +0000 (15:55 +0200)
Guenther

libcli/auth/schannel_state_ldb.c
libcli/auth/schannel_state_proto.h
source4/auth/gensec/schannel.c
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 047d80ac1117a18d616b63f8f4375f64170e150b..37458c7cc576d445a0a7778268a0e8c335cfb186 100644 (file)
@@ -72,9 +72,9 @@ static struct dom_sid *schannel_ldb_val_dom_sid(TALLOC_CTX *mem_ctx,
   remember an established session key for a netr server authentication
   use a simple ldb structure
 */
-NTSTATUS schannel_store_session_key(struct ldb_context *ldb,
-                                   TALLOC_CTX *mem_ctx,
-                                   struct netlogon_creds_CredentialState *creds)
+NTSTATUS schannel_store_session_key_ldb(struct ldb_context *ldb,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct netlogon_creds_CredentialState *creds)
 {
        struct ldb_message *msg;
        struct ldb_val val, seed, client_state, server_state;
@@ -159,10 +159,10 @@ NTSTATUS schannel_store_session_key(struct ldb_context *ldb,
 /*
   read back a credentials back for a computer
 */
-NTSTATUS schannel_fetch_session_key(struct ldb_context *ldb,
-                                   TALLOC_CTX *mem_ctx,
-                                   const char *computer_name,
-                                   struct netlogon_creds_CredentialState **creds)
+NTSTATUS schannel_fetch_session_key_ldb(struct ldb_context *ldb,
+                                       TALLOC_CTX *mem_ctx,
+                                       const char *computer_name,
+                                       struct netlogon_creds_CredentialState **creds)
 {
        struct ldb_result *res;
        int ret;
@@ -261,14 +261,14 @@ NTSTATUS schannel_fetch_session_key(struct ldb_context *ldb,
   the caller needs some of that information.
 
 */
-NTSTATUS schannel_creds_server_step_check(struct ldb_context *ldb,
-                                         TALLOC_CTX *mem_ctx,
-                                         const char *computer_name,
-                                         bool schannel_required_for_call,
-                                         bool schannel_in_use,
-                                         struct netr_Authenticator *received_authenticator,
-                                         struct netr_Authenticator *return_authenticator,
-                                         struct netlogon_creds_CredentialState **creds_out)
+NTSTATUS schannel_creds_server_step_check_ldb(struct ldb_context *ldb,
+                                             TALLOC_CTX *mem_ctx,
+                                             const char *computer_name,
+                                             bool schannel_required_for_call,
+                                             bool schannel_in_use,
+                                             struct netr_Authenticator *received_authenticator,
+                                             struct netr_Authenticator *return_authenticator,
+                                             struct netlogon_creds_CredentialState **creds_out)
 {
        struct netlogon_creds_CredentialState *creds;
        NTSTATUS nt_status;
@@ -283,8 +283,8 @@ NTSTATUS schannel_creds_server_step_check(struct ldb_context *ldb,
         * disconnects) we must update the database every time we
         * update the structure */
 
-       nt_status = schannel_fetch_session_key(ldb, ldb, computer_name,
-                                              &creds);
+       nt_status = schannel_fetch_session_key_ldb(ldb, ldb, computer_name,
+                                                  &creds);
 
        /* If we are flaged that schannel is required for a call, and
         * it is not in use, then make this an error */
@@ -305,7 +305,7 @@ NTSTATUS schannel_creds_server_step_check(struct ldb_context *ldb,
        }
 
        if (NT_STATUS_IS_OK(nt_status)) {
-               nt_status = schannel_store_session_key(ldb, mem_ctx, creds);
+               nt_status = schannel_store_session_key_ldb(ldb, mem_ctx, creds);
        }
 
        if (NT_STATUS_IS_OK(nt_status)) {
index 99b950e9cafdda464bfb77c72fd1bbe765f67249..042e1dd9401c77b332a25f5b74756249b9a5628c 100644 (file)
 
 /* The following definitions come from /home/jeremy/src/samba/git/master/source3/../source4/../libcli/auth/schannel_state.c  */
 
-NTSTATUS schannel_store_session_key(struct ldb_context *ldb,
-                                   TALLOC_CTX *mem_ctx,
-                                   struct netlogon_creds_CredentialState *creds);
-NTSTATUS schannel_fetch_session_key(struct ldb_context *ldb,
-                                   TALLOC_CTX *mem_ctx,
-                                   const char *computer_name, 
-                                   struct netlogon_creds_CredentialState **creds);
-NTSTATUS schannel_creds_server_step_check(struct ldb_context *ldb,
-                                         TALLOC_CTX *mem_ctx, 
-                                         const char *computer_name,
-                                         bool schannel_required_for_call,
-                                         bool schannel_in_use,
-                                         struct netr_Authenticator *received_authenticator,
-                                         struct netr_Authenticator *return_authenticator,
-                                         struct netlogon_creds_CredentialState **creds_out) ;
+NTSTATUS schannel_store_session_key_ldb(struct ldb_context *ldb,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct netlogon_creds_CredentialState *creds);
+NTSTATUS schannel_fetch_session_key_ldb(struct ldb_context *ldb,
+                                       TALLOC_CTX *mem_ctx,
+                                       const char *computer_name,
+                                       struct netlogon_creds_CredentialState **creds);
+NTSTATUS schannel_creds_server_step_check_ldb(struct ldb_context *ldb,
+                                             TALLOC_CTX *mem_ctx,
+                                             const char *computer_name,
+                                             bool schannel_required_for_call,
+                                             bool schannel_in_use,
+                                             struct netr_Authenticator *received_authenticator,
+                                             struct netr_Authenticator *return_authenticator,
+                                             struct netlogon_creds_CredentialState **creds_out);
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)
 
index 08fce2f049fca7154e5fc3c8bc575a75c7041cee..8e56f671d7b0f2dd4e2b8b9db856cefad138e435 100644 (file)
@@ -135,8 +135,8 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
                        return NT_STATUS_ACCESS_DENIED;
                }
                /* pull the session key for this client */
-               status = schannel_fetch_session_key(schannel_ldb, 
-                                                   out_mem_ctx, workstation, &creds);
+               status = schannel_fetch_session_key_ldb(schannel_ldb,
+                                                       out_mem_ctx, workstation, &creds);
                talloc_free(schannel_ldb);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(3, ("Could not find session key for attempted schannel connection from %s: %s\n",
index cee94d8ea6959d7fd8fee07ca9c741b1a21ed8ef..b364062ba1722ceec31d79525da0ae875d49c1c5 100644 (file)
@@ -260,7 +260,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
                return NT_STATUS_ACCESS_DENIED;
        }
 
-       nt_status = schannel_store_session_key(schannel_ldb, mem_ctx, creds);
+       nt_status = schannel_store_session_key_ldb(schannel_ldb, mem_ctx, creds);
        talloc_free(schannel_ldb);
 
        return nt_status;
@@ -342,12 +342,12 @@ static NTSTATUS dcesrv_netr_creds_server_step_check(struct dcesrv_call_state *dc
        if (!ldb) {
                return NT_STATUS_ACCESS_DENIED;
        }
-       nt_status = schannel_creds_server_step_check(ldb, mem_ctx,
-                                                    computer_name,
-                                                    schannel_global_required,
-                                                    schannel_in_use,
-                                                    received_authenticator, 
-                                                    return_authenticator, creds_out); 
+       nt_status = schannel_creds_server_step_check_ldb(ldb, mem_ctx,
+                                                        computer_name,
+                                                        schannel_global_required,
+                                                        schannel_in_use,
+                                                        received_authenticator,
+                                                        return_authenticator, creds_out);
        talloc_free(ldb);
        return nt_status;
 }
@@ -677,7 +677,7 @@ static NTSTATUS dcesrv_netr_LogonSamLogonEx(struct dcesrv_call_state *dce_call,
                return NT_STATUS_ACCESS_DENIED;
        }
        
-       nt_status = schannel_fetch_session_key(ldb, mem_ctx, r->in.computer_name, &creds);
+       nt_status = schannel_fetch_session_key_ldb(ldb, mem_ctx, r->in.computer_name, &creds);
        if (!NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
        }