s3: fix NETLOGON_NT_VERSION version flags.
authorGünther Deschner <gd@samba.org>
Tue, 23 Sep 2008 19:08:25 +0000 (21:08 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 23 Sep 2008 21:20:10 +0000 (23:20 +0200)
Guenther

source3/libads/cldap.c
source3/libsmb/dsgetdcname.c
source3/winbindd/winbindd_cm.c

index 73b28b523acc18b79e356176b5cca7eebccdffa5..b89d285e8cca20fba08c3a20091027188b9ad849 100644 (file)
@@ -264,7 +264,7 @@ bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
                          const char *realm,
                          struct nbt_cldap_netlogon_5 *reply5)
 {
-       uint32_t nt_version = NETLOGON_VERSION_5 | NETLOGON_VERSION_5EX;
+       uint32_t nt_version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
        union nbt_cldap_netlogon *reply = NULL;
        bool ret;
 
@@ -273,7 +273,7 @@ bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
                return false;
        }
 
-       if (nt_version != (NETLOGON_VERSION_5 | NETLOGON_VERSION_5EX)) {
+       if (nt_version != (NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX)) {
                return false;
        }
 
@@ -322,32 +322,32 @@ bool pull_mailslot_cldap_reply(TALLOC_CTX *mem_ctx,
         * was able to reply to, we are fine and all done. otherwise we need to
         * assume downgraded replies which are painfully parsed here - gd */
 
-       if (nt_version_query & NETLOGON_VERSION_WITH_CLOSEST_SITE) {
-               nt_version_query &= ~NETLOGON_VERSION_WITH_CLOSEST_SITE;
+       if (nt_version_query & NETLOGON_NT_VERSION_WITH_CLOSEST_SITE) {
+               nt_version_query &= ~NETLOGON_NT_VERSION_WITH_CLOSEST_SITE;
        }
        ndr_err = ndr_pull_union_blob_all(blob, mem_ctx, r, nt_version_query,
                       (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon);
        if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                goto done;
        }
-       if (nt_version_query & NETLOGON_VERSION_5EX_WITH_IP) {
-               nt_version_query &= ~NETLOGON_VERSION_5EX_WITH_IP;
+       if (nt_version_query & NETLOGON_NT_VERSION_5EX_WITH_IP) {
+               nt_version_query &= ~NETLOGON_NT_VERSION_5EX_WITH_IP;
        }
        ndr_err = ndr_pull_union_blob_all(blob, mem_ctx, r, nt_version_query,
                       (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon);
        if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                goto done;
        }
-       if (nt_version_query & NETLOGON_VERSION_5EX) {
-               nt_version_query &= ~NETLOGON_VERSION_5EX;
+       if (nt_version_query & NETLOGON_NT_VERSION_5EX) {
+               nt_version_query &= ~NETLOGON_NT_VERSION_5EX;
        }
        ndr_err = ndr_pull_union_blob_all(blob, mem_ctx, r, nt_version_query,
                       (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon);
        if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                goto done;
        }
-       if (nt_version_query & NETLOGON_VERSION_5) {
-               nt_version_query &= ~NETLOGON_VERSION_5;
+       if (nt_version_query & NETLOGON_NT_VERSION_5) {
+               nt_version_query &= ~NETLOGON_NT_VERSION_5;
        }
        ndr_err = ndr_pull_union_blob_all(blob, mem_ctx, r, nt_version_query,
                       (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon);
index e82263554605d04360ce6e0f6e2faeebc7c64385..4cc587c58d347038a64c0222011b3c17b8613950 100644 (file)
@@ -1117,19 +1117,19 @@ static uint32_t map_ds_flags_to_nt_version(uint32_t flags)
        uint32_t nt_version = 0;
 
        if (flags & DS_PDC_REQUIRED) {
-               nt_version |= NETLOGON_VERSION_PDC;
+               nt_version |= NETLOGON_NT_VERSION_PDC;
        }
 
        if (flags & DS_GC_SERVER_REQUIRED) {
-               nt_version |= NETLOGON_VERSION_GC;
+               nt_version |= NETLOGON_NT_VERSION_GC;
        }
 
        if (flags & DS_TRY_NEXTCLOSEST_SITE) {
-               nt_version |= NETLOGON_VERSION_WITH_CLOSEST_SITE;
+               nt_version |= NETLOGON_NT_VERSION_WITH_CLOSEST_SITE;
        }
 
        if (flags & DS_IP_REQUIRED) {
-               nt_version |= NETLOGON_VERSION_IP;
+               nt_version |= NETLOGON_NT_VERSION_IP;
        }
 
        return nt_version;
@@ -1148,8 +1148,8 @@ static NTSTATUS process_dc_dns(TALLOC_CTX *mem_ctx,
        int i = 0;
        bool valid_dc = false;
        union nbt_cldap_netlogon *r = NULL;
-       uint32_t nt_version = NETLOGON_VERSION_5 |
-                             NETLOGON_VERSION_5EX;
+       uint32_t nt_version = NETLOGON_NT_VERSION_5 |
+                             NETLOGON_NT_VERSION_5EX;
        uint32_t ret_flags = 0;
        NTSTATUS status;
 
@@ -1236,9 +1236,9 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
        fstring tmp_dc_name;
        union nbt_cldap_netlogon *r = NULL;
        bool store_cache = false;
-       uint32_t nt_version = NETLOGON_VERSION_1 |
-                             NETLOGON_VERSION_5 |
-                             NETLOGON_VERSION_5EX_WITH_IP;
+       uint32_t nt_version = NETLOGON_NT_VERSION_1 |
+                             NETLOGON_NT_VERSION_5 |
+                             NETLOGON_NT_VERSION_5EX_WITH_IP;
 
        if (!msg_ctx) {
                msg_ctx = msg_context(mem_ctx);
@@ -1295,7 +1295,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
 
                        ZERO_STRUCT(logon1);
 
-                       nt_version = NETLOGON_VERSION_1;
+                       nt_version = NETLOGON_NT_VERSION_1;
 
                        logon1.nt_version = nt_version;
                        logon1.pdc_name = tmp_dc_name;
index ce851649ba7c3608e570ccc18eeb8d2803bdab8c..db43101a3475711bd133c300ab02c7a374b95360 100644 (file)
@@ -1080,7 +1080,7 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
                fstring name )
 {
        struct ip_service ip_list;
-       uint32_t nt_version = NETLOGON_VERSION_1;
+       uint32_t nt_version = NETLOGON_NT_VERSION_1;
 
        ip_list.ss = *pss;
        ip_list.port = 0;