From 6ed674023620cc77e3276561f913b7a62ed26245 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 9 Mar 2003 01:13:41 +0000 Subject: Don't fault on error returns (ptr == 0) for this LSA query. (for example, query to non-dc) Andrew Bartlett (This used to be commit d1dde5f684652f86e63ac6cfa34ff42a680693de) --- source3/rpc_parse/parse_lsa.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 53a0fc958d..2753ae524a 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -2219,18 +2219,21 @@ BOOL lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *r_c, if(!prs_uint32("ptr", ps, depth, &r_c->ptr)) return False; - if(!prs_uint16("info_class", ps, depth, &r_c->info_class)) - return False; - switch(r_c->info_class) { - case 0x000c: - if (!lsa_io_dns_dom_info("info12", &r_c->info.dns_dom_info, - ps, depth)) + + if (r_c->ptr != 0) { + if(!prs_uint16("info_class", ps, depth, &r_c->info_class)) return False; + switch(r_c->info_class) { + case 0x000c: + if (!lsa_io_dns_dom_info("info12", &r_c->info.dns_dom_info, + ps, depth)) + return False; break; - default: - DEBUG(0,("lsa_io_r_query_info2: unknown info class %d\n", - r_c->info_class)); - return False; + default: + DEBUG(0,("lsa_io_r_query_info2: unknown info class %d\n", + r_c->info_class)); + return False; + } } if(!prs_align(ps)) -- cgit