From aee261e784915df4283e3bffaadac54ee36ec49e Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 27 Oct 1997 19:00:38 +0000 Subject: added LSA_Q_CLOSE and LSA_R_CLOSE (also to smb.h). implemented in smbclient. updated Query Info Policy to report domain name and domain sid for info levels 3 and 5. fixed bug in dom_sid_to_string (idauths decoded wrong). fixed bug in DOM_SID: subauths are 32 bit not 16. (This used to be commit 2f3cca23e2465ca6a3a31fda005af1fd74f6af92) --- source3/lsaparse.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'source3/lsaparse.c') diff --git a/source3/lsaparse.c b/source3/lsaparse.c index 39ef6c596b..7a62b7c903 100644 --- a/source3/lsaparse.c +++ b/source3/lsaparse.c @@ -107,6 +107,64 @@ char* lsa_io_q_query(BOOL io, LSA_Q_QUERY_INFO *q_q, char *q, char *base, int al return q; } +/******************************************************************* +makes an LSA_Q_CLOSE structure. +********************************************************************/ +void make_q_close(LSA_Q_CLOSE *q_c, LSA_POL_HND *hnd) +{ + if (q_c == NULL || hnd == NULL) return; + + DEBUG(5,("make_q_close\n")); + + memcpy(&(q_c->pol), hnd, sizeof(q_c->pol)); +} + + +/******************************************************************* +reads or writes an LSA_Q_CLOSE structure. +********************************************************************/ +char* lsa_io_q_close(BOOL io, LSA_Q_CLOSE *q_c, char *q, char *base, int align, int depth) +{ + if (q_c == NULL) return NULL; + + DEBUG(5,("%s%04x lsa_io_q_close\n", tab_depth(depth), PTR_DIFF(q, base))); + depth++; + + q = smb_io_pol_hnd(io, &(q_c->pol), q, base, align, depth); + + return q; +} + +/******************************************************************* +makes an LSA_R_CLOSE structure. +********************************************************************/ +void make_r_close(LSA_R_CLOSE *q_r, LSA_POL_HND *hnd) +{ + if (q_r == NULL || hnd == NULL) return; + + DEBUG(5,("make_r_close\n")); + + memcpy(&(q_r->pol), hnd, sizeof(q_r->pol)); +} + + +/******************************************************************* +reads or writes an LSA_R_CLOSE structure. +********************************************************************/ +char* lsa_io_r_close(BOOL io, LSA_R_CLOSE *r_c, char *q, char *base, int align, int depth) +{ + if (r_c == NULL) return NULL; + + DEBUG(5,("%s%04x lsa_io_r_close\n", tab_depth(depth), PTR_DIFF(q, base))); + depth++; + + q = smb_io_pol_hnd(io, &(r_c->pol), q, base, align, depth); + + DBG_RW_IVAL("status", depth, base, io, q, r_c->status); q += 4; + + return q; +} + /******************************************************************* reads or writes an LSA_Q_QUERY_INFO structure. ********************************************************************/ -- cgit