Skip to content

Latest commit

 

History

History
158 lines (111 loc) · 5.93 KB

nf-ntsecapi-lsasettrusteddomaininformation.md

File metadata and controls

158 lines (111 loc) · 5.93 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ntsecapi.LsaSetTrustedDomainInformation
LsaSetTrustedDomainInformation function (ntsecapi.h)
The LsaSetTrustedDomainInformation function modifies a Policy object's information about a trusted domain.
LsaSetTrustedDomainInformation
LsaSetTrustedDomainInformation function [Security]
TrustedDomainNameInformation
TrustedPasswordInformation
TrustedPosixOffsetInformation
_lsa_lsasettrusteddomaininformation
ntsecapi/LsaSetTrustedDomainInformation
security.lsasettrusteddomaininformation
security\lsasettrusteddomaininformation.htm
security
a7b89ea7-af92-46ba-ac73-2fba1cc27680
12/05/2018
LsaSetTrustedDomainInformation, LsaSetTrustedDomainInformation function [Security], TrustedDomainNameInformation, TrustedPasswordInformation, TrustedPosixOffsetInformation, _lsa_lsasettrusteddomaininformation, ntsecapi/LsaSetTrustedDomainInformation, security.lsasettrusteddomaininformation
ntsecapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Advapi32.lib
Advapi32.dll
Windows
19H1
LsaSetTrustedDomainInformation
ntsecapi/LsaSetTrustedDomainInformation
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
LsaSetTrustedDomainInformation

LsaSetTrustedDomainInformation function

-description

The LsaSetTrustedDomainInformation function modifies a Policy object's information about a trusted domain.

-parameters

-param PolicyHandle [in]

A handle to the Policy object of a domain controller. The required user rights for this handle depend on the value of the InformationClass parameter. For more information, see Opening a Policy Object Handle.

-param TrustedDomainSid [in]

Pointer to the SID of the trusted domain whose information is modified. If the InformationClass parameter is set to TrustedDomainNameInformation, this parameter must point to the SID of the domain to add to the list of trusted domains.

-param InformationClass [in]

Specifies one of the following values from the TRUSTED_INFORMATION_CLASS enumeration type. The value indicates the type of information being set.

Value Meaning
TrustedDomainNameInformation
If the specified domain is not in the list of trusted domains, the LsaSetTrustedDomainInformation function adds it. The TrustedDomainSid parameter must be the SID of the domain to add. The Buffer parameter must be a pointer to a TRUSTED_DOMAIN_NAME_INFO structure containing the name of the domain to add.

If the specified domain is already in the list of trusted domains, the function fails.

TrustedPosixOffsetInformation
Sets the value used to generate Posix user and group identifiers. The Buffer parameter must be a pointer to a TRUSTED_POSIX_OFFSET_INFO structure.
TrustedPasswordInformation
Sets the password for the trusted domain. The Buffer parameter must be a pointer to a TRUSTED_PASSWORD_INFO structure containing the old and new passwords for the specified domain. The handle passed in the PolicyHandle parameter must have the POLICY_CREATE_SECRET access right. The old password string can be NULL.

-param Buffer [in]

Pointer to a structure containing the information to set. The type of structure depends on the value of the InformationClass parameter.

-returns

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. For more information, see LSA Policy Function Return Values.

You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

-see-also

LsaDeleteTrustedDomain

LsaQueryTrustedDomainInfo

TRUSTED_DOMAIN_NAME_INFO

TRUSTED_INFORMATION_CLASS

TRUSTED_PASSWORD_INFO

TRUSTED_POSIX_OFFSET_INFO