diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-01-28 21:31:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-01-28 21:31:45 +0000 |
commit | 79b26867c0ff712e9400f06fdb0a65bcb5e668b7 (patch) | |
tree | 9a5cf66cb51cf255321d3e3d419bfe1d1552d4b1 /source3/rpc_parse/parse_lsa.c | |
parent | 4571637a4bdd0d63367186f5612e49934fe568f6 (diff) | |
download | samba-79b26867c0ff712e9400f06fdb0a65bcb5e668b7.tar.gz samba-79b26867c0ff712e9400f06fdb0a65bcb5e668b7.tar.bz2 samba-79b26867c0ff712e9400f06fdb0a65bcb5e668b7.zip |
added LsaRemoveAccountRights
this now gives us complete remove privileges control in the client
libs, so we are in good shape for starting on the server side.
(This used to be commit bf99440398db86f46233eb2f5adddffb61280a1b)
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index ac0242b113..3c9c02a23a 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -2356,3 +2356,64 @@ BOOL lsa_io_r_add_acct_rights(const char *desc, LSA_R_ADD_ACCT_RIGHTS *r_c, prs_ return True; } + + +/******************************************************************* + Inits an LSA_Q_REMOVE_ACCT_RIGHTS structure. +********************************************************************/ +void init_q_remove_acct_rights(LSA_Q_REMOVE_ACCT_RIGHTS *q_q, + POLICY_HND *hnd, + DOM_SID *sid, + uint32 removeall, + uint32 count, + const char **rights) +{ + DEBUG(5, ("init_q_remove_acct_rights\n")); + + q_q->pol = *hnd; + init_dom_sid2(&q_q->sid, sid); + q_q->removeall = removeall; + init_unistr2_array(&q_q->rights, count, rights); + q_q->count = 5; +} + + +/******************************************************************* +reads or writes a LSA_Q_REMOVE_ACCT_RIGHTS structure. +********************************************************************/ +BOOL lsa_io_q_remove_acct_rights(const char *desc, LSA_Q_REMOVE_ACCT_RIGHTS *q_q, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_remove_acct_rights"); + depth++; + + if (!smb_io_pol_hnd("", &q_q->pol, ps, depth)) + return False; + + if(!smb_io_dom_sid2("sid", &q_q->sid, ps, depth)) + return False; + + if(!prs_uint32("removeall", ps, depth, &q_q->removeall)) + return False; + + if(!prs_uint32("count", ps, depth, &q_q->rights.count)) + return False; + + if(!smb_io_unistr2_array("rights", &q_q->rights, ps, depth)) + return False; + + return True; +} + +/******************************************************************* +reads or writes a LSA_R_ENUM_ACCT_RIGHTS structure. +********************************************************************/ +BOOL lsa_io_r_remove_acct_rights(const char *desc, LSA_R_REMOVE_ACCT_RIGHTS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_remove_acct_rights"); + depth++; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} |