summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-07 16:49:39 +0200
committerGünther Deschner <gd@samba.org>2008-05-09 14:59:18 +0200
commit9b4ea32c2d42f5d7f3e52fad3f81d932e654d4d0 (patch)
treed576aac3c7c0330c2e89fac1a5e81ca669a7abcb
parentcdd9913c4a7d254ab3ef677737493f9f540272c7 (diff)
downloadsamba-9b4ea32c2d42f5d7f3e52fad3f81d932e654d4d0.tar.gz
samba-9b4ea32c2d42f5d7f3e52fad3f81d932e654d4d0.tar.bz2
samba-9b4ea32c2d42f5d7f3e52fad3f81d932e654d4d0.zip
dsgetdcname: add get_cldap_reply_server_flags().
Guenther (This used to be commit 3c05c56d4c0aac8106684cda3152c65299c63075)
-rw-r--r--source3/libsmb/dsgetdcname.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 1fd42120ee..5d6e2daba4 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -217,6 +217,38 @@ static NTSTATUS dsgetdcname_cache_refresh(TALLOC_CTX *mem_ctx,
/****************************************************************
****************************************************************/
+static uint32_t get_cldap_reply_server_flags(union nbt_cldap_netlogon *r,
+ uint32_t nt_version)
+{
+ switch (nt_version & 0x000000ff) {
+ case 0:
+ case 1:
+ return 0;
+ case 2:
+ case 3:
+ return r->logon3.server_type;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ return r->logon5.server_type;
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ return r->logon13.server_type;
+ default:
+ return r->logon29.server_type;
+ }
+}
+
+/****************************************************************
+****************************************************************/
+
#define RETURN_ON_FALSE(x) if (!x) return false;
static bool check_cldap_reply_required_flags(uint32_t ret_flags,