diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-01-15 07:40:40 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-01-15 07:40:40 +0000 |
commit | eb6312af9fcf91b7709af50b499bc3b01eddeee5 (patch) | |
tree | 6f20a72d565c45f6a793f40d7434706564cd104e /source3/rpc_parse/parse_lsa.c | |
parent | 0a8b4417bcb73b9146c5eb60fdede8d8cbbb437d (diff) | |
download | samba-eb6312af9fcf91b7709af50b499bc3b01eddeee5.tar.gz samba-eb6312af9fcf91b7709af50b499bc3b01eddeee5.tar.bz2 samba-eb6312af9fcf91b7709af50b499bc3b01eddeee5.zip |
added cli_lsa_enum_account_rights() call. Note that this is in
principal similar to the existing cli_lsa_enum_privsaccount() call,
except that cli_lsa_enum_account_rights() doesn't require a call to
open_account first. There is also the minor matter that
cli_lsa_enum_account_rights() works whereas
cli_lsa_enum_privsaccount() doesn't!
this call can be used to find what privileges an account or group
has. This is a first step towards proper privileges support in Samba.
(This used to be commit 65bac11d716f873dcdbda528313c33634c26a072)
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 56398e7cf0..7c9f74da37 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -2236,3 +2236,63 @@ BOOL lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *r_c, return True; } + + +/******************************************************************* + Inits an LSA_Q_ENUM_ACCT_RIGHTS structure. +********************************************************************/ +void init_q_enum_acct_rights(LSA_Q_ENUM_ACCT_RIGHTS *q_q, + POLICY_HND *hnd, + uint32 count, + DOM_SID *sid) +{ + DEBUG(5, ("init_q_enum_acct_rights\n")); + + q_q->pol = *hnd; + q_q->count = count; + q_q->sid = *sid; +} + +/******************************************************************* +reads or writes a LSA_Q_ENUM_ACCT_RIGHTS structure. +********************************************************************/ +BOOL lsa_io_q_enum_acct_rights(const char *desc, LSA_Q_ENUM_ACCT_RIGHTS *q_q, prs_struct *ps, int depth) +{ + if (q_q == NULL) + return False; + + prs_debug(ps, depth, desc, "lsa_io_q_enum_acct_rights"); + depth++; + + if (!smb_io_pol_hnd("", &q_q->pol, ps, depth)) + return False; + + if(!prs_uint32("count ", ps, depth, &q_q->count)) + return False; + + if(!smb_io_dom_sid("sid", &q_q->sid, ps, depth)) + return False; + + return True; +} + + +/******************************************************************* +reads or writes a LSA_R_ENUM_ACCT_RIGHTS structure. +********************************************************************/ +BOOL lsa_io_r_enum_acct_rights(const char *desc, LSA_R_ENUM_ACCT_RIGHTS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_enum_acct_rights"); + depth++; + + if(!prs_uint32("count ", ps, depth, &r_c->count)) + return False; + + if(!smb_io_unistr_array("rights", &r_c->rights, ps, depth)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} |