From 6ec1ae35b4dda41a59c03666aedaf3744bd5312c Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 27 May 2000 04:51:02 +0000 Subject: hack to get setprinter working, level2, null sec desc. (This used to be commit 3f976e713924a2fa47194ae3edfa3f1592e4cf1c) --- source3/aparser/cifs.struct | 12 ++++++++---- source3/rpc_parse/parse_spoolss.c | 22 ++++++++++++++++++++-- 2 files changed, 28 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/aparser/cifs.struct b/source3/aparser/cifs.struct index 8d5cef4d8f..e9ec462b1e 100644 --- a/source3/aparser/cifs.struct +++ b/source3/aparser/cifs.struct @@ -529,8 +529,10 @@ typedef struct _R_SMB { uint8 reh; uint16 err; uint8 flg; - uint8 flg2; - uint8 reb[13]; + uint16 flg2; + uint16 reserved; + uint8 SecuritySignature[8]; + uint16 pad; uint16 tid; uint16 pid; uint16 uid; @@ -557,8 +559,10 @@ typedef struct _Q_SMB { uint8 reh; uint16 err; uint8 flg; - uint8 flg2; - uint8 reb[13]; + uint16 flg2; + uint16 reserved; + uint8 SecuritySignature[8]; + uint16 pad; uint16 tid; uint16 pid; uint16 uid; diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index c33cf58762..4148caa7b2 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -2907,6 +2907,8 @@ BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps ********************************************************************/ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth) { + uint32 ptr_sec_desc = 0; + prs_debug(ps, depth, desc, "spoolss_io_q_setprinter"); depth++; @@ -2924,8 +2926,24 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) return False; - if (!sec_io_desc_buf(desc, &q_u->secdesc_ctr, ps, depth)) - return False; + switch (q_u->level) + { + case 2: + { + ptr_sec_desc = q_u->info.info_2->secdesc_ptr; + break; + } + case 3: + { + ptr_sec_desc = q_u->info.info_3->secdesc_ptr; + break; + } + } + if (ptr_sec_desc) + { + if (!sec_io_desc_buf(desc, &q_u->secdesc_ctr, ps, depth)) + return False; + } if(!prs_uint32("command", ps, depth, &q_u->command)) return False; -- cgit