*
* 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"
/************************************************************************
************************************************************************/
-static BOOL ds_io_dominfobasic( const char *desc, prs_struct *ps, int depth, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic)
+static bool ds_io_dominfobasic(const char *desc, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic, prs_struct *ps, int depth)
{
DSROLE_PRIMARY_DOMAIN_INFO_BASIC *p = *basic;
- if ( UNMARSHALLING(ps) )
+ if ( UNMARSHALLING(ps) ) {
p = *basic = PRS_ALLOC_MEM(ps, DSROLE_PRIMARY_DOMAIN_INFO_BASIC, 1);
+ }
if ( !p )
return False;
if ( !prs_uint16("machine_role", ps, depth, &p->machine_role) )
return False;
- if ( !prs_uint16("unknown", ps, depth, &p->unknown) )
+ if ( !prs_align(ps) )
return False;
if ( !prs_uint32("flags", ps, depth, &p->flags) )
/************************************************************************
************************************************************************/
-BOOL ds_io_q_getprimdominfo( const char *desc, prs_struct *ps, int depth, DS_Q_GETPRIMDOMINFO *q_u)
+bool ds_io_q_getprimdominfo( const char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_q_getprimdominfo");
depth++;
/************************************************************************
************************************************************************/
-BOOL ds_io_r_getprimdominfo( const char *desc, prs_struct *ps, int depth, DS_R_GETPRIMDOMINFO *r_u)
+bool ds_io_r_getprimdominfo( const char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_r_getprimdominfo");
depth++;
switch ( r_u->level )
{
case DsRolePrimaryDomainInfoBasic:
- if ( !ds_io_dominfobasic( "dominfobasic", ps, depth, &r_u->info.basic ) )
+ if ( !ds_io_dominfobasic( "dominfobasic", &r_u->info.basic, ps, depth) )
return False;
break;
default:
initialize a DS_ENUM_DOM_TRUSTS structure
************************************************************************/
-BOOL init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server,
- uint32 flags )
+bool init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server, uint32 flags )
{
q->flags = flags;
/************************************************************************
************************************************************************/
-static BOOL ds_io_domain_trusts( const char *desc, prs_struct *ps, int depth, DS_DOMAIN_TRUSTS *trust)
+static bool ds_io_domain_trusts( const char *desc, DS_DOMAIN_TRUSTS *trust, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_dom_trusts_ctr");
depth++;
/************************************************************************
************************************************************************/
-static BOOL ds_io_dom_trusts_ctr( const char *desc, prs_struct *ps, int depth, DS_DOMAIN_TRUSTS_CTR *ctr)
+static bool ds_io_dom_trusts_ctr( const char *desc, DS_DOMAIN_TRUSTS_CTR *ctr, prs_struct *ps, int depth)
{
int i;
we need another loop to read the UNISTR2's and SID's */
for ( i=0; i<ctr->max_count;i++ ) {
- if ( !ds_io_domain_trusts("domain_trusts", ps, depth, &ctr->trusts[i] ) )
+ if ( !ds_io_domain_trusts("domain_trusts", &ctr->trusts[i], ps, depth) )
return False;
}
initialize a DS_ENUM_DOM_TRUSTS request
************************************************************************/
-BOOL ds_io_q_enum_domain_trusts( const char *desc, prs_struct *ps, int depth, DS_Q_ENUM_DOM_TRUSTS *q_u)
+bool ds_io_q_enum_domain_trusts( const char *desc, DS_Q_ENUM_DOM_TRUSTS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_q_enum_domain_trusts");
depth++;
/************************************************************************
************************************************************************/
-BOOL ds_io_r_enum_domain_trusts( const char *desc, prs_struct *ps, int depth, DS_R_ENUM_DOM_TRUSTS *r_u)
+bool ds_io_r_enum_domain_trusts( const char *desc, DS_R_ENUM_DOM_TRUSTS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_r_enum_domain_trusts");
depth++;
return False;
if ( r_u->num_domains ) {
- if ( !ds_io_dom_trusts_ctr("domains", ps, depth, &r_u->domains ) )
+ if ( !ds_io_dom_trusts_ctr("domains", &r_u->domains, ps, depth) )
return False;
}
return True;
}
-
-