summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_samr.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-05 20:17:13 +0100
committerGünther Deschner <gd@samba.org>2008-02-07 10:07:00 +0100
commit38e5cf8f9580c77377e7adeeb867c7f8970ed121 (patch)
treea06f02dae98861410b2df368e93585c21cde42cd /source3/rpc_parse/parse_samr.c
parent9c22a27aadd191d68a34dc2289f3d92dddf42d11 (diff)
downloadsamba-38e5cf8f9580c77377e7adeeb867c7f8970ed121.tar.gz
samba-38e5cf8f9580c77377e7adeeb867c7f8970ed121.tar.bz2
samba-38e5cf8f9580c77377e7adeeb867c7f8970ed121.zip
Remove marshalling for SAMR_CHGPASSWD3.
Guenther (This used to be commit 41fc592f3a7745e7e34f0e0e4c92c66033547f16)
Diffstat (limited to 'source3/rpc_parse/parse_samr.c')
-rw-r--r--source3/rpc_parse/parse_samr.c184
1 files changed, 0 insertions, 184 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 1c2cf57b89..5de69feadb 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -4951,187 +4951,3 @@ bool samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u,
return True;
}
-
-/*******************************************************************
-inits a SAMR_Q_CHGPASSWD3 structure.
-********************************************************************/
-
-void init_samr_q_chgpasswd_user3(SAMR_Q_CHGPASSWD_USER3 * q_u,
- const char *dest_host, const char *user_name,
- const uchar nt_newpass[516],
- const uchar nt_oldhash[16],
- const uchar lm_newpass[516],
- const uchar lm_oldhash[16])
-{
- DEBUG(5, ("init_samr_q_chgpasswd_user3\n"));
-
- q_u->ptr_0 = 1;
- init_unistr2(&q_u->uni_dest_host, dest_host, UNI_FLAGS_NONE);
- init_uni_hdr(&q_u->hdr_dest_host, &q_u->uni_dest_host);
-
- init_unistr2(&q_u->uni_user_name, user_name, UNI_FLAGS_NONE);
- init_uni_hdr(&q_u->hdr_user_name, &q_u->uni_user_name);
-
- init_enc_passwd(&q_u->nt_newpass, (const char *)nt_newpass);
- init_enc_hash(&q_u->nt_oldhash, nt_oldhash);
-
- q_u->lm_change = 0x01;
-
- init_enc_passwd(&q_u->lm_newpass, (const char *)lm_newpass);
- init_enc_hash(&q_u->lm_oldhash, lm_oldhash);
-
- init_enc_passwd(&q_u->password3, NULL);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_chgpasswd_user3(const char *desc, SAMR_Q_CHGPASSWD_USER3 * q_u,
- prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_q_chgpasswd_user3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr_0", ps, depth, &q_u->ptr_0))
- return False;
-
- if(!smb_io_unihdr("", &q_u->hdr_dest_host, ps, depth))
- return False;
- if(!smb_io_unistr2("", &q_u->uni_dest_host, q_u->hdr_dest_host.buffer, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
- if(!smb_io_unihdr("", &q_u->hdr_user_name, ps, depth))
- return False;
- if(!smb_io_unistr2("", &q_u->uni_user_name, q_u->hdr_user_name.buffer,ps, depth))
- return False;
-
- if(!samr_io_enc_passwd("nt_newpass", &q_u->nt_newpass, ps, depth))
- return False;
- if(!samr_io_enc_hash("nt_oldhash", &q_u->nt_oldhash, ps, depth))
- return False;
-
- if(!prs_uint32("lm_change", ps, depth, &q_u->lm_change))
- return False;
-
- if(!samr_io_enc_passwd("lm_newpass", &q_u->lm_newpass, ps, depth))
- return False;
- if(!samr_io_enc_hash("lm_oldhash", &q_u->lm_oldhash, ps, depth))
- return False;
-
- if(!samr_io_enc_passwd("password3", &q_u->password3, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-inits a SAMR_R_CHGPASSWD_USER3 structure.
-********************************************************************/
-
-void init_samr_r_chgpasswd_user3(SAMR_R_CHGPASSWD_USER3 *r_u, NTSTATUS status,
- SAMR_CHANGE_REJECT *reject, SAM_UNK_INFO_1 *info)
-{
- DEBUG(5, ("init_samr_r_chgpasswd_user3\n"));
-
- r_u->status = status;
- r_u->info = 0;
- r_u->ptr_info = 0;
- r_u->reject = 0;
- r_u->ptr_reject = 0;
-
- if (info) {
- r_u->info = info;
- r_u->ptr_info = 1;
- }
- if (reject && (reject->reject_reason != Undefined)) {
- r_u->reject = reject;
- r_u->ptr_reject = 1;
- }
-}
-
-/*******************************************************************
- Reads or writes an SAMR_CHANGE_REJECT structure.
-********************************************************************/
-
-bool samr_io_change_reject(const char *desc, SAMR_CHANGE_REJECT *reject, prs_struct *ps, int depth)
-{
- if (reject == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_change_reject");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(UNMARSHALLING(ps))
- ZERO_STRUCTP(reject);
-
- if (!prs_uint32("reject_reason", ps, depth, &reject->reject_reason))
- return False;
-
- if (!prs_uint32("unknown1", ps, depth, &reject->unknown1))
- return False;
-
- if (!prs_uint32("unknown2", ps, depth, &reject->unknown2))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_chgpasswd_user3(const char *desc, SAMR_R_CHGPASSWD_USER3 *r_u,
- prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_r_chgpasswd_user3");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint32("ptr_info", ps, depth, &r_u->ptr_info))
- return False;
-
- /* special case: Windows 2000 can return stub data here saying
- NT_STATUS_NOT_SUPPORTED */
-
- if ( NT_STATUS_EQUAL( NT_STATUS_NOT_SUPPORTED, NT_STATUS(r_u->ptr_info)) ) {
- r_u->status = NT_STATUS_NOT_SUPPORTED;
- return True;
- }
-
- if (r_u->ptr_info && r_u->info != NULL) {
- /* SAM_UNK_INFO_1 */
- if (!sam_io_unk_info1("info", r_u->info, ps, depth))
- return False;
- }
-
- if (!prs_uint32("ptr_reject", ps, depth, &r_u->ptr_reject))
- return False;
-
- if (r_u->ptr_reject && r_u->reject != NULL) {
- /* SAMR_CHANGE_REJECT */
- if (!samr_io_change_reject("reject", r_u->reject, ps, depth))
- return False;
- }
-
- if (!prs_ntstatus("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}