diff options
author | Luke Leighton <lkcl@samba.org> | 1999-09-21 21:04:03 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-09-21 21:04:03 +0000 |
commit | 0a6eac0b79dd818ca747423c228eca876faf10af (patch) | |
tree | 4486d7820f6ec848632e874fabb57c898e6c8037 /source3/rpc_parse | |
parent | 701f9ed2c97ad50a4258e278a3674b8f5a747d8e (diff) | |
download | samba-0a6eac0b79dd818ca747423c228eca876faf10af.tar.gz samba-0a6eac0b79dd818ca747423c228eca876faf10af.tar.bz2 samba-0a6eac0b79dd818ca747423c228eca876faf10af.zip |
testing for attempts to get more info levels into samr_query_userinfo
(This used to be commit cc19d5cc5c20665beb3b7c5fcf7787d54e37ea71)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 2cd818aa0d..ccc9cdc183 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -4146,7 +4146,7 @@ void sam_io_user_info11(char *desc, SAM_USER_INFO_11 *usr, prs_struct *ps, int unknown_6 = 0x0000 04ec *************************************************************************/ -void make_sam_user_info_24(SAM_USER_INFO_24 *usr, +void make_sam_user_info24(SAM_USER_INFO_24 *usr, char newpass[516]) { memcpy(usr->pass, newpass, sizeof(usr->pass)); @@ -4155,7 +4155,7 @@ void make_sam_user_info_24(SAM_USER_INFO_24 *usr, /******************************************************************* reads or writes a structure. ********************************************************************/ -static void sam_io_user_info_24(char *desc, SAM_USER_INFO_24 *usr, prs_struct *ps, int depth) +static void sam_io_user_info24(char *desc, SAM_USER_INFO_24 *usr, prs_struct *ps, int depth) { if (usr == NULL) return; @@ -4569,6 +4569,22 @@ void make_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO *r_u, break; } + case 23: + { + r_u->ptr = 1; + r_u->info.id23 = (SAM_USER_INFO_23*)info; + + break; + } + + case 24: + { + r_u->ptr = 1; + r_u->info.id24 = (SAM_USER_INFO_24*)info; + + break; + } + default: { DEBUG(4,("make_samr_r_query_userinfo: unsupported switch level\n")); @@ -4596,7 +4612,7 @@ void samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO *r_u, prs_struc prs_uint16("switch_value", ps, depth, &(r_u->switch_value)); prs_align(ps); - if (r_u->ptr != 0 && r_u->switch_value != 0) + if (r_u->ptr != 0 && r_u->switch_value != 0 && r_u->info.id != NULL) { switch (r_u->switch_value) { @@ -4641,6 +4657,32 @@ void samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO *r_u, prs_struc } break; } + case 23: + { + if (r_u->info.id23 != NULL) + { + sam_io_user_info23("", r_u->info.id23, ps, depth); + } + else + { + DEBUG(2,("samr_io_r_query_userinfo: info pointer not initialised\n")); + return; + } + break; + } + case 24: + { + if (r_u->info.id24 != NULL) + { + sam_io_user_info24("", r_u->info.id24, ps, depth); + } + else + { + DEBUG(2,("samr_io_r_query_userinfo: info pointer not initialised\n")); + return; + } + break; + } default: { DEBUG(2,("samr_io_r_query_userinfo: unknown switch level\n")); @@ -4727,7 +4769,7 @@ void samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO *q_u, prs_struct *ps DEBUG(2,("samr_io_q_query_userinfo: info pointer not initialised\n")); return; } - sam_io_user_info_24("", q_u->info.id24, ps, depth); + sam_io_user_info24("", q_u->info.id24, ps, depth); break; } case 23: |