Wireshark-dev: [Wireshark-dev] r30631 failed to compile without kerberos
From: Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>
Date: Tue, 20 Oct 2009 12:12:38 +0200
Hi,

compilation error of packet-dcerpc-netlogon.c:

packet-dcerpc-netlogon.c: In function 'get_keytab_as_list':
packet-dcerpc-netlogon.c:6822: error: 'enc_key_t' undeclared (first use in this function)
packet-dcerpc-netlogon.c:6822: error: (Each undeclared identifier is reported only once
packet-dcerpc-netlogon.c:6822: error: for each function it appears in.)
packet-dcerpc-netlogon.c:6822: error: 'ek' undeclared (first use in this function)
cc1: warnings being treated as errors
packet-dcerpc-netlogon.c:6823: error: ISO C90 forbids mixed declarations and code
packet-dcerpc-netlogon.c:6827: error: 'krb_decrypt' undeclared (first use in this function)
packet-dcerpc-netlogon.c:6831: error: implicit declaration of function 'read_keytab_file_from_preferences'
packet-dcerpc-netlogon.c:6833: error: 'enc_key_list' undeclared (first use in this function)

works with attached patch.
diff --git epan/dissectors/packet-dcerpc-netlogon.c epan/dissectors/packet-dcerpc-netlogon.c
index a86a012..7a6414c 100644
--- epan/dissectors/packet-dcerpc-netlogon.c
+++ epan/dissectors/packet-dcerpc-netlogon.c
@@ -6819,13 +6819,14 @@ netlogon_dissect_netrserverauthenticate3_rqst(tvbuff_t *tvb, int offset,
 
 static guint32 get_keytab_as_list(md4_pass **p_pass_list)
 {
+#if HAVE_KERBEROS
 	enc_key_t *ek;
 	md4_pass* pass_list;
 	int i = 0;
 	guint32 nb_pass = 0;
 
 	if(!krb_decrypt){
-		pass_list=NULL;
+		*p_pass_list=NULL; /* ??? */
 		return 0;
 	}
 	read_keytab_file_from_preferences();
@@ -6846,7 +6847,10 @@ static guint32 get_keytab_as_list(md4_pass **p_pass_list)
 		}
 	}
 	return nb_pass;
-
+#else
+	*p_pass_list = NULL;
+	return 0;
+#endif
 }
 
 static int