aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-netlogon.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-04-21 13:48:35 +0200
committerAnders Broman <a.broman58@gmail.com>2016-04-22 21:32:14 +0000
commitda63bcdc76a842d95fa68fb7b32d8d761f2cd491 (patch)
tree632a15249f826d6665f9361711cf26856002f750 /epan/dissectors/packet-dcerpc-netlogon.c
parente0eefbe20ad5a4e6618e71939f25957559b2a1ab (diff)
netlogon (DCERPC): fix build error unused parameter when don't have KERBEROS lib
Reported by Uli https://www.wireshark.org/lists/wireshark-dev/201604/msg00172.html and Benjamin https://code.wireshark.org/review/#/c/14971/ Use fix proposed by Guy https://www.wireshark.org/lists/wireshark-dev/201604/msg00176.html Change-Id: I4ca4fc3b9a9b52217f2675cb968125d97d94ed2e Reviewed-on: https://code.wireshark.org/review/15036 Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Uli Heilmeier <openid@heilmeier.eu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dcerpc-netlogon.c')
-rw-r--r--epan/dissectors/packet-dcerpc-netlogon.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c
index 7a81074e02..573f81fd38 100644
--- a/epan/dissectors/packet-dcerpc-netlogon.c
+++ b/epan/dissectors/packet-dcerpc-netlogon.c
@@ -6556,11 +6556,9 @@ static void str_to_unicode(const char *nt_password, char *nt_password_unicode)
nt_password_unicode[2*password_len]='\0';
}
}
-#endif
static guint32 get_keytab_as_list(md4_pass **p_pass_list, const char* ntlm_pass)
{
-#ifdef HAVE_KERBEROS
enc_key_t *ek;
md4_pass* pass_list;
md4_pass ntlm_pass_hash;
@@ -6607,11 +6605,8 @@ static guint32 get_keytab_as_list(md4_pass **p_pass_list, const char* ntlm_pass)
}
}
return nb_pass;
-#else
- *p_pass_list = NULL;
- return 0;
-#endif
}
+#endif
static int
netlogon_dissect_netrserverauthenticate23_reply(tvbuff_t *tvb, int offset,
@@ -6650,18 +6645,23 @@ netlogon_dissect_netrserverauthenticate23_reply(tvbuff_t *tvb, int offset,
debugprintf("Something strange happened while searching for authenticate_reply\n");
}
else {
+#ifdef HAVE_KERBEROS
md4_pass *pass_list=NULL;
guint32 list_size = 0;
- guint8 session_key[16];
+ unsigned int i = 0;
md4_pass password;
+#endif
+ guint8 session_key[16];
int found = 0;
- unsigned int i = 0;
vars->flags = flags;
vars->can_decrypt = FALSE;
+#ifdef HAVE_KERBEROS
list_size = get_keytab_as_list(&pass_list,gbl_nt_password);
debugprintf("Found %d passwords \n",list_size);
+#endif
if( flags & NETLOGON_FLAG_STRONGKEY ) {
+#ifdef HAVE_KERBEROS
guint8 zeros[4];
guint8 md5[16];
md5_state_t md5state;
@@ -6693,6 +6693,7 @@ netlogon_dissect_netrserverauthenticate23_reply(tvbuff_t *tvb, int offset,
break;
}
}
+#endif
}
else if( flags&NETLOGON_FLAG_USEAES)
{