diff options
author | Matthew Chapman <matty@samba.org> | 2000-01-12 06:09:05 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 2000-01-12 06:09:05 +0000 |
commit | 9a1c6d598269d9e1c8f5e4c5d039ee21a7a3868a (patch) | |
tree | e16409e046a3bee0b9df95d6e8093e52e755ea20 /source/lsarpcd | |
parent | bb9fdf1647d043faeb6420d0e3c7b3911edddaea (diff) | |
download | samba-9a1c6d598269d9e1c8f5e4c5d039ee21a7a3868a.tar.gz |
the hacked up LsaOpenSecret stub was segfaulting. rather than waste
time debugging it i rewrote it a little better.
Diffstat (limited to 'source/lsarpcd')
-rw-r--r-- | source/lsarpcd/srv_lsa.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/source/lsarpcd/srv_lsa.c b/source/lsarpcd/srv_lsa.c index ac35f8b703b..086f11d405d 100644 --- a/source/lsarpcd/srv_lsa.c +++ b/source/lsarpcd/srv_lsa.c @@ -646,23 +646,16 @@ static void api_lsa_close( rpcsrv_struct *p, prs_struct *data, static void api_lsa_open_secret( rpcsrv_struct *p, prs_struct *data, prs_struct *rdata) { - /* XXXX this is NOT good */ - char *q = prs_data(rdata, rdata->offset); - - SIVAL(q, 0, 0); - q += 4; - SIVAL(q, 0, 0); - q += 4; - SIVAL(q, 0, 0); - q += 4; - SIVAL(q, 0, 0); - q += 4; - SIVAL(q, 0, 0); - q += 4; - SIVAL(q, 0, 0xC0000000 | NT_STATUS_OBJECT_NAME_NOT_FOUND); - q += 4; - - rdata->offset += 24; + LSA_R_OPEN_SECRET r_o; + LSA_Q_OPEN_SECRET q_o; + + lsa_io_q_open_secret("", &q_o, data, 0); + + ZERO_STRUCT(r_o); + r_o.status = 0xC0000000 | NT_STATUS_OBJECT_NAME_NOT_FOUND; + + /* store the response in the SMB stream */ + lsa_io_r_open_secret("", &r_o, rdata, 0); } /*************************************************************************** |