464 lines
15 KiB
C
464 lines
15 KiB
C
/*++
|
|
|
|
Copyright (c) 1994-1996 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
oldstub.c
|
|
|
|
Abstract:
|
|
|
|
This file contains functions generated by midl v1.0. These
|
|
functions were designed to only be called by the stubs, but
|
|
these paticular functions are called by user code. This
|
|
file is needed in order to compile with midl v2.0 which
|
|
doesn't generated these paticular functions anymore.
|
|
|
|
Author:
|
|
|
|
Mario Goertzel (MarioGo) Jan 10, 1994
|
|
|
|
Environment:
|
|
|
|
User Mode - Win32
|
|
|
|
Revision History:
|
|
|
|
|
|
--*/
|
|
|
|
|
|
//
|
|
// Common include files.
|
|
//
|
|
|
|
#include "logonsrv.h" // Include files common to entire service
|
|
#pragma hdrstop
|
|
|
|
/* routine that frees graph for struct _UNICODE_STRING */
|
|
void _fgs__UNICODE_STRING (UNICODE_STRING * _source)
|
|
{
|
|
if (_source->Buffer !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Buffer));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NLPR_SID_ARRAY */
|
|
void _fgs__NLPR_SID_ARRAY (NLPR_SID_ARRAY * _source)
|
|
{
|
|
if (_source->Sids !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Sids));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NLPR_CR_CIPHER_VALUE */
|
|
void _fgs__NLPR_CR_CIPHER_VALUE (NLPR_CR_CIPHER_VALUE * _source)
|
|
{
|
|
if (_source->Buffer !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Buffer));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NLPR_LOGON_HOURS */
|
|
void _fgs__NLPR_LOGON_HOURS (NLPR_LOGON_HOURS * _source)
|
|
{
|
|
if (_source->LogonHours !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->LogonHours));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NLPR_USER_PRIVATE_INFO */
|
|
void _fgs__NLPR_USER_PRIVATE_INFO (NLPR_USER_PRIVATE_INFO * _source)
|
|
{
|
|
if (_source->Data !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Data));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_USER */
|
|
void _fgs__NETLOGON_DELTA_USER (NETLOGON_DELTA_USER * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->UserName);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->FullName);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->HomeDirectory);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->HomeDirectoryDrive);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->ScriptPath);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->AdminComment);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->WorkStations);
|
|
_fgs__NLPR_LOGON_HOURS ((NLPR_LOGON_HOURS *)&_source->LogonHours);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->UserComment);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->Parameters);
|
|
_fgs__NLPR_USER_PRIVATE_INFO ((NLPR_USER_PRIVATE_INFO *)&_source->PrivateData);
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_GROUP */
|
|
void _fgs__NETLOGON_DELTA_GROUP (NETLOGON_DELTA_GROUP * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->Name);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->AdminComment);
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_GROUP_MEMBER */
|
|
void _fgs__NETLOGON_DELTA_GROUP_MEMBER (NETLOGON_DELTA_GROUP_MEMBER * _source)
|
|
{
|
|
if (_source->MemberIds !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->MemberIds));
|
|
}
|
|
if (_source->Attributes !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Attributes));
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_ALIAS */
|
|
void _fgs__NETLOGON_DELTA_ALIAS (NETLOGON_DELTA_ALIAS * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->Name);
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_ALIAS_MEMBER */
|
|
void _fgs__NETLOGON_DELTA_ALIAS_MEMBER (NETLOGON_DELTA_ALIAS_MEMBER * _source)
|
|
{
|
|
_fgs__NLPR_SID_ARRAY ((NLPR_SID_ARRAY *)&_source->Members);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_DOMAIN */
|
|
void _fgs__NETLOGON_DELTA_DOMAIN (NETLOGON_DELTA_DOMAIN * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DomainName);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->OemInformation);
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_RENAME */
|
|
void _fgs__NETLOGON_DELTA_RENAME (NETLOGON_RENAME_GROUP * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->OldName);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->NewName);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_POLICY */
|
|
void _fgs__NETLOGON_DELTA_POLICY (NETLOGON_DELTA_POLICY * _source)
|
|
{
|
|
if (_source->EventAuditingOptions !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->EventAuditingOptions));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->PrimaryDomainName);
|
|
if (_source->PrimaryDomainSid !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->PrimaryDomainSid));
|
|
}
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_TRUSTED_DOMAINS */
|
|
void _fgs__NETLOGON_DELTA_TRUSTED_DOMAINS (NETLOGON_DELTA_TRUSTED_DOMAINS * _source)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DomainName);
|
|
if (_source->ControllerNames !=0)
|
|
{
|
|
{
|
|
unsigned long _sym15;
|
|
for (_sym15 = 0; _sym15 < (unsigned long )(0 + _source->NumControllerEntries); _sym15++)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->ControllerNames[_sym15]);
|
|
}
|
|
}
|
|
SamLsaFreeMemory((void *)(_source->ControllerNames));
|
|
}
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_ACCOUNTS */
|
|
void _fgs__NETLOGON_DELTA_ACCOUNTS (NETLOGON_DELTA_ACCOUNTS * _source)
|
|
{
|
|
if (_source->PrivilegeAttributes !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->PrivilegeAttributes));
|
|
}
|
|
if (_source->PrivilegeNames !=0)
|
|
{
|
|
{
|
|
unsigned long _sym21;
|
|
for (_sym21 = 0; _sym21 < (unsigned long )(0 + _source->PrivilegeEntries); _sym21++)
|
|
{
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->PrivilegeNames[_sym21]);
|
|
}
|
|
}
|
|
SamLsaFreeMemory((void *)(_source->PrivilegeNames));
|
|
}
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_SECRET */
|
|
void _fgs__NETLOGON_DELTA_SECRET (NETLOGON_DELTA_SECRET * _source)
|
|
{
|
|
_fgs__NLPR_CR_CIPHER_VALUE ((NLPR_CR_CIPHER_VALUE *)&_source->CurrentValue);
|
|
_fgs__NLPR_CR_CIPHER_VALUE ((NLPR_CR_CIPHER_VALUE *)&_source->OldValue);
|
|
if (_source->SecurityDescriptor !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->SecurityDescriptor));
|
|
}
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
// Written by CliffV since MIDL no longer generates these.
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_DELETE */
|
|
void _fgs__NETLOGON_DELTA_DELETE (NETLOGON_DELTA_DELETE_USER * _source)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->AccountName));
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString1);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString2);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString3);
|
|
_fgs__UNICODE_STRING ((UNICODE_STRING *)&_source->DummyString4);
|
|
}
|
|
|
|
|
|
/* routine that frees graph for union _NETLOGON_DELTA_UNION */
|
|
void _fgu__NETLOGON_DELTA_UNION (NETLOGON_DELTA_UNION * _source, NETLOGON_DELTA_TYPE _branch)
|
|
{
|
|
switch (_branch)
|
|
{
|
|
case AddOrChangeDomain :
|
|
{
|
|
if (_source->DeltaDomain !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_DOMAIN ((NETLOGON_DELTA_DOMAIN *)_source->DeltaDomain);
|
|
SamLsaFreeMemory((void *)(_source->DeltaDomain));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeGroup :
|
|
{
|
|
if (_source->DeltaGroup !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_GROUP ((NETLOGON_DELTA_GROUP *)_source->DeltaGroup);
|
|
SamLsaFreeMemory((void *)(_source->DeltaGroup));
|
|
}
|
|
break;
|
|
}
|
|
case RenameGroup :
|
|
{
|
|
if (_source->DeltaRenameGroup !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_RENAME ((NETLOGON_RENAME_GROUP *)_source->DeltaRenameGroup);
|
|
SamLsaFreeMemory((void *)(_source->DeltaRenameGroup));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeUser :
|
|
{
|
|
if (_source->DeltaUser !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_USER ((NETLOGON_DELTA_USER *)_source->DeltaUser);
|
|
SamLsaFreeMemory((void *)(_source->DeltaUser));
|
|
}
|
|
break;
|
|
}
|
|
case RenameUser :
|
|
{
|
|
if (_source->DeltaRenameUser !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_RENAME ((NETLOGON_RENAME_GROUP *)_source->DeltaRenameUser);
|
|
SamLsaFreeMemory((void *)(_source->DeltaRenameUser));
|
|
}
|
|
break;
|
|
}
|
|
case ChangeGroupMembership :
|
|
{
|
|
if (_source->DeltaGroupMember !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_GROUP_MEMBER ((NETLOGON_DELTA_GROUP_MEMBER *)_source->DeltaGroupMember);
|
|
SamLsaFreeMemory((void *)(_source->DeltaGroupMember));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeAlias :
|
|
{
|
|
if (_source->DeltaAlias !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_ALIAS ((NETLOGON_DELTA_ALIAS *)_source->DeltaAlias);
|
|
SamLsaFreeMemory((void *)(_source->DeltaAlias));
|
|
}
|
|
break;
|
|
}
|
|
case RenameAlias :
|
|
{
|
|
if (_source->DeltaRenameAlias !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_RENAME ((NETLOGON_RENAME_GROUP *)_source->DeltaRenameAlias);
|
|
SamLsaFreeMemory((void *)(_source->DeltaRenameAlias));
|
|
}
|
|
break;
|
|
}
|
|
case ChangeAliasMembership :
|
|
{
|
|
if (_source->DeltaAliasMember !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_ALIAS_MEMBER ((NETLOGON_DELTA_ALIAS_MEMBER *)_source->DeltaAliasMember);
|
|
SamLsaFreeMemory((void *)(_source->DeltaAliasMember));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeLsaPolicy :
|
|
{
|
|
if (_source->DeltaPolicy !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_POLICY ((NETLOGON_DELTA_POLICY *)_source->DeltaPolicy);
|
|
SamLsaFreeMemory((void *)(_source->DeltaPolicy));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeLsaTDomain :
|
|
{
|
|
if (_source->DeltaTDomains !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_TRUSTED_DOMAINS ((NETLOGON_DELTA_TRUSTED_DOMAINS *)_source->DeltaTDomains);
|
|
SamLsaFreeMemory((void *)(_source->DeltaTDomains));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeLsaAccount :
|
|
{
|
|
if (_source->DeltaAccounts !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_ACCOUNTS ((NETLOGON_DELTA_ACCOUNTS *)_source->DeltaAccounts);
|
|
SamLsaFreeMemory((void *)(_source->DeltaAccounts));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeLsaSecret :
|
|
{
|
|
if (_source->DeltaSecret !=0)
|
|
{
|
|
_fgs__NETLOGON_DELTA_SECRET ((NETLOGON_DELTA_SECRET *)_source->DeltaSecret);
|
|
SamLsaFreeMemory((void *)(_source->DeltaSecret));
|
|
}
|
|
break;
|
|
}
|
|
case DeleteUserByName:
|
|
case DeleteGroupByName:
|
|
if (_source->DeltaDeleteUser !=0) {
|
|
_fgs__NETLOGON_DELTA_DELETE ((NETLOGON_DELTA_DELETE_USER *)_source->DeltaDeleteUser);
|
|
SamLsaFreeMemory((void *)(_source->DeltaDeleteUser));
|
|
}
|
|
break;
|
|
case SerialNumberSkip:
|
|
if (_source->DeltaSerialNumberSkip !=0) {
|
|
SamLsaFreeMemory((void *)(_source->DeltaSerialNumberSkip));
|
|
}
|
|
break;
|
|
default :
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for union _NETLOGON_DELTA_ID_UNION */
|
|
void _fgu__NETLOGON_DELTA_ID_UNION (NETLOGON_DELTA_ID_UNION * _source, NETLOGON_DELTA_TYPE _branch)
|
|
{
|
|
switch (_branch)
|
|
{
|
|
case AddOrChangeLsaPolicy :
|
|
case AddOrChangeLsaTDomain :
|
|
case DeleteLsaTDomain :
|
|
case AddOrChangeLsaAccount :
|
|
case DeleteLsaAccount :
|
|
{
|
|
if (_source->Sid !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Sid));
|
|
}
|
|
break;
|
|
}
|
|
case AddOrChangeLsaSecret :
|
|
case DeleteLsaSecret :
|
|
{
|
|
if (_source->Name !=0)
|
|
{
|
|
SamLsaFreeMemory((void *)(_source->Name));
|
|
}
|
|
break;
|
|
}
|
|
default :
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* routine that frees graph for struct _NETLOGON_DELTA_ENUM */
|
|
void _fgs__NETLOGON_DELTA_ENUM (NETLOGON_DELTA_ENUM * _source)
|
|
{
|
|
_fgu__NETLOGON_DELTA_ID_UNION ((NETLOGON_DELTA_ID_UNION *)&_source->DeltaID, _source->DeltaType);
|
|
_fgu__NETLOGON_DELTA_UNION ((NETLOGON_DELTA_UNION *)&_source->DeltaUnion, _source->DeltaType);
|
|
}
|
|
|