diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/include/rpc_srvsvc.h | 24 | ||||
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 87 |
3 files changed, 113 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 469dacdd82..95cdfeda7f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -3711,6 +3711,8 @@ BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth); BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth); BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth); /* The following definitions come from rpc_parse/parse_wks.c */ diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h index ffd619df41..f814d3a70d 100644 --- a/source3/include/rpc_srvsvc.h +++ b/source3/include/rpc_srvsvc.h @@ -40,6 +40,7 @@ #define SRV_NET_REMOTE_TOD 0x1c #define SRV_NET_NAME_VALIDATE 0x21 #define SRV_NETSHAREENUM 0x24 +#define SRV_NETFILEQUERYSECDESC 0x27 #define MAX_SERVER_DISK_ENTRIES 15 @@ -763,5 +764,28 @@ typedef struct r_net_remote_tod } SRV_R_NET_REMOTE_TOD; +/* SRV_Q_NET_FILE_QUERY_SECDESC */ +typedef struct q_net_file_query_secdesc +{ + uint32 ptr_srv_name; + UNISTR2 uni_srv_name; + uint32 ptr_qual_name; + UNISTR2 uni_qual_name; + UNISTR2 uni_file_name; + uint32 unknown1; + uint32 unknown2; + uint32 unknown3; +} SRV_Q_NET_FILE_QUERY_SECDESC; + +/* SRV_R_NET_FILE_QUERY_SECDESC */ +typedef struct r_net_file_query_secdesc +{ + uint32 ptr_response; + uint32 size_response; + uint32 ptr_secdesc; + uint32 size_secdesc; + SEC_DESC *sec_desc; + uint32 status; +} SRV_R_NET_FILE_QUERY_SECDESC; #endif /* _RPC_SRVSVC_H */ diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 4abd93b159..ae6f99c56e 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -2560,3 +2560,90 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st return True; } + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth) +{ + if (q_n == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_q_net_file_query_secdesc"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_srv_name", ps, depth, &q_n->ptr_srv_name)) + return False; + + if(!smb_io_unistr2("", &q_n->uni_srv_name, True, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_qual_name", ps, depth, &q_n->ptr_qual_name)) + return False; + + if(!smb_io_unistr2("", &q_n->uni_qual_name, True, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!smb_io_unistr2("", &q_n->uni_file_name, True, ps, depth)) + return False; + + if(!prs_uint32("unknown1", ps, depth, &q_n->unknown1)) + return False; + + if(!prs_uint32("unknown2", ps, depth, &q_n->unknown2)) + return False; + + if(!prs_uint32("unknown3", ps, depth, &q_n->unknown3)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth) +{ + if (r_n == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_r_net_file_query_secdesc"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_response", ps, depth, &r_n->ptr_response)) + return False; + + if(!prs_uint32("size_response", ps, depth, &r_n->size_response)) + return False; + + if(!prs_uint32("ptr_secdesc", ps, depth, &r_n->ptr_secdesc)) + return False; + + if(!prs_uint32("size_secdesc", ps, depth, &r_n->size_secdesc)) + return False; + + if(!sec_io_desc("sec_desc", &r_n->sec_desc, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("status", ps, depth, &r_n->status)) + return False; + + return True; +} |