Now we have SeSystemSecurity, remove the source3-only #ifdef.
[ira/wip.git] / libcli / netlogon.c
index e32842ec0a52469ee29b706c9b803d6e0edf6a22..ceb1c85c56b53cf4fb42f7e3aadd3425d275c2e2 100644 (file)
 #include "includes.h"
 #include "../libcli/netlogon.h"
 
-#undef DEBUG
-#define DEBUG(x, y)
-#undef DEBUGLVL
-#define DEBUGLVL(x) false
-#undef DEBUGLEVEL
-#define DEBUGLEVEL 0
-
 NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
                                         struct netlogon_samlogon_response *response)
 {
@@ -201,7 +194,17 @@ NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
                        data, mem_ctx, 
                        &response->data.samlogon);
                break;
+       case NETLOGON_RESPONSE2:
+               ndr_err = ndr_push_struct_blob(data, mem_ctx,
+                                              &response->data.response2,
+                                              (ndr_push_flags_fn_t)ndr_push_nbt_netlogon_response2);
+               if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+                       return ndr_map_error2ntstatus(ndr_err);
+               }
+               status = NT_STATUS_OK;
+               break;
        }
+
        return status;
 }
 
@@ -235,6 +238,15 @@ NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
                status = NT_STATUS_OK;
                response->response_type = NETLOGON_GET_PDC;
                break;
+       case LOGON_RESPONSE2:
+               ndr_err = ndr_pull_struct_blob(data, mem_ctx, &response->data.response2,
+                       (ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_response2);
+               if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+                       return ndr_map_error2ntstatus(ndr_err);
+               }
+               status = NT_STATUS_OK;
+               response->response_type = NETLOGON_RESPONSE2;
+               break;
        case LOGON_SAM_LOGON_RESPONSE:
        case LOGON_SAM_LOGON_PAUSE_RESPONSE:
        case LOGON_SAM_LOGON_USER_UNKNOWN:
@@ -249,6 +261,7 @@ NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
 
        /* These levels are queries, not responses */
        case LOGON_PRIMARY_QUERY:
+       case LOGON_REQUEST:
        case NETLOGON_ANNOUNCE_UAS:
        case LOGON_SAM_LOGON_REQUEST:
                status = NT_STATUS_INVALID_NETWORK_RESPONSE;