When marshalling a netshareenum request the share ctr has to be initialised
authorTim Potter <tpot@samba.org>
Tue, 28 May 2002 08:41:50 +0000 (08:41 +0000)
committerTim Potter <tpot@samba.org>
Tue, 28 May 2002 08:41:50 +0000 (08:41 +0000)
to an empty value instead of a null pointer otherwise the server service
crashes on NT.
(This used to be commit c7214baa0540a0c7d23d3023b2c2ff4cde0f9f7f)

source3/rpc_parse/parse_srv.c

index 9c9d5f1e9cb9e513c787b147bdd13f41f6963bf9..f469b479238a5c52d7839ea143c967d898fa9e00 100644 (file)
@@ -658,7 +658,9 @@ void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
        init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name);
 
        q_n->ctr.info_level = q_n->ctr.switch_value = info_level;
-       q_n->ctr.ptr_share_info = 0;
+       q_n->ctr.ptr_share_info = 1;
+       q_n->ctr.num_entries = 0;
+       q_n->ctr.ptr_entries = 0;
        q_n->preferred_len = preferred_len;
 
        memcpy(&q_n->enum_hnd, hnd, sizeof(*hnd));