*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
if(!lsa_io_dom_r_ref ("dom_ref", r_s->dom_ref, ps, depth)) /* domain reference info */
return False;
- if(!lsa_io_trans_names("names ", r_s->names, ps, depth)) /* translated names */
+ if(!lsa_io_trans_names("names ", &r_s->names, ps, depth)) /* translated names */
return False;
if(!prs_align(ps))
if(!lsa_io_dom_r_ref ("dom_ref", r_s->dom_ref, ps, depth)) /* domain reference info */
return False;
- if(!lsa_io_trans_names2("names ", r_s->names, ps, depth)) /* translated names */
+ if(!lsa_io_trans_names2("names ", &r_s->names, ps, depth)) /* translated names */
return False;
if(!prs_align(ps))
if(!lsa_io_dom_r_ref ("dom_ref", r_s->dom_ref, ps, depth)) /* domain reference info */
return False;
- if(!lsa_io_trans_names2("names ", r_s->names, ps, depth)) /* translated names */
+ if(!lsa_io_trans_names2("names ", &r_s->names, ps, depth)) /* translated names */
return False;
if(!prs_align(ps))
********************************************************************/
void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
- POLICY_HND *hnd, int num_names, const char **names)
+ POLICY_HND *hnd, int num_names, const char **names,
+ int level)
{
unsigned int i;
q_l->pol = *hnd;
q_l->num_entries = num_names;
q_l->num_entries2 = num_names;
- q_l->lookup_level = 1;
+ q_l->lookup_level = level;
if (num_names) {
if ((q_l->uni_name = TALLOC_ZERO_ARRAY(mem_ctx, UNISTR2, num_names)) == NULL) {
return True;
}
-/*******************************************************************
- Inits an LSA_Q_CLOSE structure.
-********************************************************************/
-
-void init_lsa_q_close(LSA_Q_CLOSE *in, POLICY_HND *hnd)
-{
- DEBUG(5, ("init_lsa_q_close\n"));
-
- memcpy(&in->pol, hnd, sizeof(in->pol));
-}
-
-/*******************************************************************
- Reads or writes an LSA_Q_CLOSE structure.
-********************************************************************/
-
-BOOL lsa_io_q_close(const char *desc, LSA_Q_CLOSE *in, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "lsa_io_q_close");
- depth++;
-
- if(!smb_io_pol_hnd("", &in->pol, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_R_CLOSE structure.
-********************************************************************/
-
-BOOL lsa_io_r_close(const char *desc, LSA_R_CLOSE *out, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "lsa_io_r_close");
- depth++;
-
- if(!smb_io_pol_hnd("", &out->pol, ps, depth))
- return False;
-
- if(!prs_ntstatus("status", ps, depth, &out->status))
- return False;
-
- return True;
-}
-
/*******************************************************************
Reads or writes an LSA_Q_OPEN_SECRET structure.
********************************************************************/
NTSTATUS init_r_enum_acct_rights( LSA_R_ENUM_ACCT_RIGHTS *out, PRIVILEGE_SET *privileges )
{
uint32 i;
- char *privname;
+ const char *privname;
const char **privname_array = NULL;
int num_priv = 0;
for ( i=0; i<privileges->count; i++ ) {
privname = luid_to_privilege_name( &privileges->set[i].luid );
if ( privname ) {
- if ( !add_string_to_array( get_talloc_ctx(), privname, &privname_array, &num_priv ) )
+ if ( !add_string_to_array( talloc_tos(), privname, &privname_array, &num_priv ) )
return NT_STATUS_NO_MEMORY;
}
}
if ( num_priv ) {
- out->rights = TALLOC_P( get_talloc_ctx(), UNISTR4_ARRAY );
+ out->rights = TALLOC_P( talloc_tos(), UNISTR4_ARRAY );
if (!out->rights) {
return NT_STATUS_NO_MEMORY;
}
in->pol = *hnd;
init_dom_sid2(&in->sid, sid);
- in->rights = TALLOC_P( get_talloc_ctx(), UNISTR4_ARRAY );
+ in->rights = TALLOC_P( talloc_tos(), UNISTR4_ARRAY );
if (!in->rights) {
smb_panic("init_q_add_acct_rights: talloc fail\n");
return;
in->removeall = removeall;
in->count = count;
- in->rights = TALLOC_P( get_talloc_ctx(), UNISTR4_ARRAY );
+ in->rights = TALLOC_P( talloc_tos(), UNISTR4_ARRAY );
if (!in->rights) {
smb_panic("init_q_remove_acct_rights: talloc fail\n");
return;