Go to the source code of this file.
|
NTSTATUS WINAPI | LsaIOpenPolicyTrusted (OUT LSAPR_HANDLE *PolicyHandle) |
|
NTSTATUS | LsarQueryAuditLog (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryAuditEvents (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryPrimaryDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryPdAccount (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryAccountDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryServerRole (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryReplicaSource (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryDefaultQuota (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryModification (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryAuditFull (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryDnsDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryDnsDomainInt (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarQueryLocalAccountDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_INFORMATION *PolicyInformation) |
|
NTSTATUS | LsarSetAuditLog (PLSA_DB_OBJECT PolicyObject, PPOLICY_AUDIT_LOG_INFO Info) |
|
NTSTATUS | LsarSetAuditEvents (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_AUDIT_EVENTS_INFO Info) |
|
NTSTATUS | LsarSetPrimaryDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_PRIMARY_DOM_INFO Info) |
|
NTSTATUS | LsarSetAccountDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_ACCOUNT_DOM_INFO Info) |
|
NTSTATUS | LsarSetServerRole (PLSA_DB_OBJECT PolicyObject, PPOLICY_LSA_SERVER_ROLE_INFO Info) |
|
NTSTATUS | LsarSetReplicaSource (PLSA_DB_OBJECT PolicyObject, PPOLICY_LSA_REPLICA_SRCE_INFO Info) |
|
NTSTATUS | LsarSetDefaultQuota (PLSA_DB_OBJECT PolicyObject, PPOLICY_DEFAULT_QUOTA_INFO Info) |
|
NTSTATUS | LsarSetModification (PLSA_DB_OBJECT PolicyObject, PPOLICY_MODIFICATION_INFO Info) |
|
NTSTATUS | LsarSetAuditFull (PLSA_DB_OBJECT PolicyObject, PPOLICY_AUDIT_FULL_QUERY_INFO Info) |
|
NTSTATUS | LsarSetDnsDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_DNS_DOMAIN_INFO Info) |
|
NTSTATUS | LsarSetDnsDomainInt (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_DNS_DOMAIN_INFO Info) |
|
NTSTATUS | LsarSetLocalAccountDomain (PLSA_DB_OBJECT PolicyObject, PLSAPR_POLICY_ACCOUNT_DOM_INFO Info) |
|
◆ LsaIOpenPolicyTrusted()
Definition at line 15 of file policy.c.
16{
19
20 TRACE(
"(%p)\n", PolicyHandle);
21
28 &PolicyObject);
29
32
34}
#define NT_SUCCESS(StatCode)
NTSTATUS LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, IN LSA_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Trusted, OUT PLSA_DB_OBJECT *DbObject)
#define POLICY_ALL_ACCESS
Referenced by GetAccountDomainSid().
◆ LsarQueryAccountDomain()
Definition at line 289 of file policy.c.
291{
294 ULONG AttributeSize = 0;
296
297 *PolicyInformation =
NULL;
298
302
303
307 &AttributeSize);
309 {
310 goto Done;
311 }
312
313 if (AttributeSize > 0)
314 {
316 if (DomainName ==
NULL)
317 {
319 goto Done;
320 }
321
324 DomainName,
325 &AttributeSize);
327 {
329
330 TRACE(
"AccountDomainName: %wZ\n", DomainName);
331
333 if (
p->DomainName.Buffer ==
NULL)
334 {
337 goto Done;
338 }
339
340 p->DomainName.Length = DomainName->
Length;
345 }
346
348 }
349
350
351 AttributeSize = 0;
355 &AttributeSize);
357 {
358 goto Done;
359 }
360
361 if (AttributeSize > 0)
362 {
365 {
367 goto Done;
368 }
369
373 &AttributeSize);
374 }
375
377
378Done:
380 {
382 {
383 if (
p->DomainName.Buffer)
385
388
390 }
391 }
392
394}
NTSTATUS LsapGetObjectAttribute(PLSA_DB_OBJECT DbObject, LPWSTR AttributeName, LPVOID AttributeData, PULONG AttributeSize)
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
void __RPC_USER MIDL_user_free(void *p)
#define memcpy(s1, s2, n)
union _LSAPR_POLICY_INFORMATION * PLSAPR_POLICY_INFORMATION
#define STATUS_INSUFFICIENT_RESOURCES
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryAuditEvents()
Definition at line 70 of file policy.c.
72{
77
78 *PolicyInformation =
NULL;
79
80 AttributeSize = 0;
84 &AttributeSize);
87
88 TRACE(
"Attribute size: %lu\n", AttributeSize);
89 if (AttributeSize > 0)
90 {
92 if (AuditData ==
NULL)
94
97 AuditData,
98 &AttributeSize);
100 goto done;
101 }
102
105 {
107 goto done;
108 }
109
110 if (AuditData ==
NULL)
111 {
113 p->MaximumAuditEventCount = 0;
114 p->EventAuditingOptions =
NULL;
115 }
116 else
117 {
120
122 if (
p->EventAuditingOptions ==
NULL)
123 {
125 goto done;
126 }
127
128 memcpy(
p->EventAuditingOptions,
131 }
132
134
135done:
137
139 {
141 {
142 if (
p->EventAuditingOptions !=
NULL)
144
146 }
147 }
148
149 if (AuditData !=
NULL)
151
153}
DWORD MaximumAuditEventCount
DWORD AuditEvents[POLICY_AUDIT_EVENT_TYPE_COUNT]
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryAuditFull()
Definition at line 510 of file policy.c.
512{
516
517 *PolicyInformation =
NULL;
518
521 if (AuditFullInfo ==
NULL)
523
526 AuditFullInfo,
527 &AttributeSize);
529 {
531 }
532 else
533 {
535 }
536
538}
struct _POLICY_AUDIT_FULL_QUERY_INFO POLICY_AUDIT_FULL_QUERY_INFO
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryAuditLog()
Definition at line 38 of file policy.c.
40{
44
45 *PolicyInformation =
NULL;
46
49 if (AuditLogInfo ==
NULL)
51
54 AuditLogInfo,
55 &AttributeSize);
57 {
59 }
60 else
61 {
63 }
64
66}
struct _POLICY_AUDIT_LOG_INFO POLICY_AUDIT_LOG_INFO
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryDefaultQuota()
Definition at line 446 of file policy.c.
448{
452
453 *PolicyInformation =
NULL;
454
457 if (QuotaInfo ==
NULL)
459
462 QuotaInfo,
463 &AttributeSize);
465 {
467 }
468 else
469 {
471 }
472
474}
struct _POLICY_DEFAULT_QUOTA_INFO POLICY_DEFAULT_QUOTA_INFO
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryDnsDomain()
Definition at line 542 of file policy.c.
544{
549
550 *PolicyInformation =
NULL;
551
555
556
557 AttributeSize = 0;
561 &AttributeSize);
563 {
564 goto done;
565 }
566
567 if (AttributeSize > 0)
568 {
570 if (DomainName ==
NULL)
571 {
573 goto done;
574 }
575
578 DomainName,
579 &AttributeSize);
581 {
583
584 TRACE(
"PrimaryDomainName: %wZ\n", DomainName);
585
587 if (
p->Name.Buffer ==
NULL)
588 {
591 goto done;
592 }
593
594 p->Name.Length = DomainName->
Length;
599 }
600
602 }
603
604
605 AttributeSize = 0;
609 &AttributeSize);
611 {
612 goto done;
613 }
614
615 if (AttributeSize > 0)
616 {
619 {
621 goto done;
622 }
623
627 &AttributeSize);
628 }
629
630
631 AttributeSize = 0;
635 &AttributeSize);
637 goto done;
638
639 if (AttributeSize > 0)
640 {
642 if (DomainName ==
NULL)
643 {
645 goto done;
646 }
647
650 DomainName,
651 &AttributeSize);
653 {
655
656 TRACE(
"DNS Domain Name: %wZ\n", DomainName);
657
659 if (
p->DnsDomainName.Buffer ==
NULL)
660 {
663 goto done;
664 }
665
666 p->DnsDomainName.Length = DomainName->
Length;
668 memcpy(
p->DnsDomainName.Buffer,
671 }
672
674 }
675
676
677 AttributeSize = 0;
681 &AttributeSize);
683 goto done;
684
685 if (AttributeSize > 0)
686 {
688 if (DomainName ==
NULL)
689 {
691 goto done;
692 }
693
696 DomainName,
697 &AttributeSize);
699 {
701
702 TRACE(
"DNS Forest Name: %wZ\n", DomainName);
703
705 if (
p->DnsForestName.Buffer ==
NULL)
706 {
709 goto done;
710 }
711
712 p->DnsForestName.Length = DomainName->
Length;
714 memcpy(
p->DnsForestName.Buffer,
717 }
718
720 }
721
722
723 AttributeSize =
sizeof(
GUID);
727 &AttributeSize);
729 goto done;
730
732
733done:
735 {
737 {
740
741 if (
p->DnsDomainName.Buffer)
743
744 if (
p->DnsForestName.Buffer)
746
749
751 }
752 }
753
755}
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryDnsDomainInt()
◆ LsarQueryLocalAccountDomain()
◆ LsarQueryModification()
Definition at line 478 of file policy.c.
480{
484
485 *PolicyInformation =
NULL;
486
491
495 &AttributeSize);
497 {
499 }
500 else
501 {
503 }
504
506}
struct _POLICY_MODIFICATION_INFO POLICY_MODIFICATION_INFO
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryPdAccount()
◆ LsarQueryPrimaryDomain()
Definition at line 157 of file policy.c.
159{
164
165 *PolicyInformation =
NULL;
166
170
171
172 AttributeSize = 0;
176 &AttributeSize);
178 {
179 goto Done;
180 }
181
182 if (AttributeSize > 0)
183 {
185 if (DomainName ==
NULL)
186 {
188 goto Done;
189 }
190
193 DomainName,
194 &AttributeSize);
196 {
198
199 TRACE(
"PrimaryDomainName: %wZ\n", DomainName);
200
202 if (
p->Name.Buffer ==
NULL)
203 {
206 goto Done;
207 }
208
209 p->Name.Length = DomainName->
Length;
214 }
215
217 }
218
219
220 AttributeSize = 0;
224 &AttributeSize);
226 {
227 goto Done;
228 }
229
230 if (AttributeSize > 0)
231 {
234 {
236 goto Done;
237 }
238
242 &AttributeSize);
243 }
244
246
247Done:
249 {
251 {
254
257
259 }
260 }
261
263}
Referenced by LsarQueryInformationPolicy().
◆ LsarQueryReplicaSource()
◆ LsarQueryServerRole()
Definition at line 398 of file policy.c.
400{
404
405 *PolicyInformation =
NULL;
406
409 if (ServerRoleInfo ==
NULL)
411
414 ServerRoleInfo,
415 &AttributeSize);
417 {
420 }
421
423 {
425 }
426 else
427 {
429 }
430
432}
struct _POLICY_LSA_SERVER_ROLE_INFO POLICY_LSA_SERVER_ROLE_INFO
@ PolicyServerRolePrimary
POLICY_LSA_SERVER_ROLE LsaServerRole
#define STATUS_OBJECT_NAME_NOT_FOUND
Referenced by LsarQueryInformationPolicy().
◆ LsarSetAccountDomain()
Definition at line 876 of file policy.c.
878{
883
885
888 0,
892
894 Buffer->MaximumLength =
Info->DomainName.MaximumLength;
898
903
905
908
912
917
919}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
NTSTATUS LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject, LPWSTR AttributeName, LPVOID AttributeData, ULONG AttributeSize)
struct _UNICODE_STRING UNICODE_STRING
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Referenced by LsarSetInformationPolicy().
◆ LsarSetAuditEvents()
Definition at line 792 of file policy.c.
794{
798
800
802 Info->MaximumAuditEventCount *
sizeof(
DWORD);
803
806 AttributeSize);
807 if (AuditData ==
NULL)
809
812
814 Info->EventAuditingOptions,
815 Info->MaximumAuditEventCount *
sizeof(
DWORD));
816
819 AuditData,
820 AttributeSize);
821
823
825}
struct _LSAP_POLICY_AUDIT_EVENTS_DATA LSAP_POLICY_AUDIT_EVENTS_DATA
Referenced by LsarSetInformationPolicy().
◆ LsarSetAuditFull()
Definition at line 971 of file policy.c.
973{
977
979
982 if (AuditFullInfo ==
NULL)
984
987 AuditFullInfo,
988 &AttributeSize);
990 goto done;
991
993
996 AuditFullInfo,
997 AttributeSize);
998
999done:
1000 if (AuditFullInfo !=
NULL)
1002
1004}
Referenced by LsarSetInformationPolicy().
◆ LsarSetAuditLog()
◆ LsarSetDefaultQuota()
◆ LsarSetDnsDomain()
◆ LsarSetDnsDomainInt()
◆ LsarSetLocalAccountDomain()
◆ LsarSetModification()
◆ LsarSetPrimaryDomain()
◆ LsarSetReplicaSource()
◆ LsarSetServerRole()