ReactOS 0.4.15-dev-7942-gd23573b
lsa.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: dll/win32/advapi32/sec/lsa.c
5 * PURPOSE: Local security authority functions
6 * PROGRAMMER: Emanuele Aliberti
7 * UPDATE HISTORY:
8 * 19990322 EA created
9 * 19990515 EA stubs
10 * 20030202 KJK compressed stubs
11 */
12
13#include <advapi32.h>
14
15#include <lsa_c.h>
16
18
19static
20BOOL
22{
25 LPWSTR buf;
26 PCWSTR pSrvName;
27
28 if (ServerName == NULL || ServerName->Length == 0 || ServerName->Buffer == NULL)
29 return TRUE;
30
31 pSrvName = ServerName->Buffer;
32 buf = HeapAlloc(GetProcessHeap(), 0, dwSize * sizeof(WCHAR));
34 if (Result && (pSrvName[0] == L'\\') && (pSrvName[1] == L'\\'))
35 pSrvName += 2;
36 Result = Result && !lstrcmpW(pSrvName, buf);
38
39 return Result;
40}
41
42
46{
48 LPWSTR pszStringBinding;
50
51 TRACE("PLSAPR_SERVER_NAME_bind() called\n");
52
54 L"ncacn_np",
55 pszSystemName,
56 L"\\pipe\\lsarpc",
57 NULL,
58 &pszStringBinding);
59 if (status)
60 {
61 TRACE("RpcStringBindingCompose returned 0x%x\n", status);
62 return NULL;
63 }
64
65 /* Set the binding handle that will be used to bind to the server. */
66 status = RpcBindingFromStringBindingW(pszStringBinding,
67 &hBinding);
68 if (status)
69 {
70 TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
71 }
72
73 status = RpcStringFreeW(&pszStringBinding);
74 if (status)
75 {
76 TRACE("RpcStringFree returned 0x%x\n", status);
77 }
78
79 return hBinding;
80}
81
82
83void
87{
89
90 TRACE("PLSAPR_SERVER_NAME_unbind() called\n");
91
93 if (status)
94 {
95 TRACE("RpcBindingFree returned 0x%x\n", status);
96 }
97}
98
99
100/*
101 * @implemented
102 */
104WINAPI
106 IN PSID AccountSid,
107 IN PLSA_UNICODE_STRING UserRights,
108 IN ULONG CountOfRights)
109{
110 LSAPR_USER_RIGHT_SET UserRightSet;
112
113 TRACE("LsaAddAccountRights(%p %p %p 0x%08x)\n",
114 PolicyHandle, AccountSid, UserRights, CountOfRights);
115
116 UserRightSet.Entries = CountOfRights;
117 UserRightSet.UserRights = (PRPC_UNICODE_STRING)UserRights;
118
120 {
122 (PRPC_SID)AccountSid,
123 &UserRightSet);
124
125 }
127 {
129 }
131
132 return Status;
133}
134
135
136/*
137 * @implemented
138 */
140WINAPI
142 IN PPRIVILEGE_SET PrivilegeSet)
143{
145
146 TRACE("LsaAddPrivilegesToAccount(%p %p)\n",
147 AccountHandle, PrivilegeSet);
148
150 {
152 (PLSAPR_PRIVILEGE_SET)PrivilegeSet);
153 }
155 {
157 }
159
160 return Status;
161}
162
163
164/*
165 * @implemented
166 */
168WINAPI
170{
172
173 TRACE("LsaClearAuditLog(%p)\n", PolicyHandle);
174
176 {
177 Status = LsarClearAuditLog((LSAPR_HANDLE)PolicyHandle);
178 }
180 {
182 }
184
185 return Status;
186}
187
188
189/*
190 * @implemented
191 */
193WINAPI
194LsaClose(IN LSA_HANDLE ObjectHandle)
195{
197
198 TRACE("LsaClose(%p) called\n", ObjectHandle);
199
201 {
202 Status = LsarClose((PLSAPR_HANDLE)&ObjectHandle);
203 }
205 {
207 }
209
210 return Status;
211}
212
213
214/*
215 * @implemented
216 */
218WINAPI
220 IN PSID AccountSid,
222 OUT PLSA_HANDLE AccountHandle)
223{
225
226 TRACE("LsaCreateAccount(%p %p 0x%08lx %p)\n",
227 PolicyHandle, AccountSid, DesiredAccess, AccountHandle);
228
230 {
231 Status = LsarCreateAccount((LSAPR_HANDLE)PolicyHandle,
232 AccountSid,
234 AccountHandle);
235 }
237 {
239 }
241
242 return Status;
243}
244
245
246/*
247 * @implemented
248 */
250WINAPI
252 IN PLSA_UNICODE_STRING SecretName,
254 OUT PLSA_HANDLE SecretHandle)
255{
257
258 TRACE("LsaCreateSecret(%p %p 0x%08lx %p)\n",
259 PolicyHandle, SecretName, DesiredAccess, SecretHandle);
260
262 {
263 Status = LsarCreateSecret((LSAPR_HANDLE)PolicyHandle,
264 (PRPC_UNICODE_STRING)SecretName,
266 SecretHandle);
267 }
269 {
271 }
273
274 return Status;
275}
276
277
278/*
279 * @implemented
280 */
282WINAPI
284 IN PLSA_TRUST_INFORMATION TrustedDomainInformation,
286 OUT PLSA_HANDLE TrustedDomainHandle)
287{
289
290 TRACE("LsaCreateTrustedDomain(%p %p 0x%08lx %p)\n",
291 PolicyHandle, TrustedDomainInformation, DesiredAccess, TrustedDomainHandle);
292
294 {
296 (PLSAPR_TRUST_INFORMATION)TrustedDomainInformation,
298 (PLSAPR_HANDLE)TrustedDomainHandle);
299 }
301 {
303 }
305
306 return Status;
307}
308
309
310/*
311 * @unimplemented
312 */
314WINAPI
316 IN PTRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
317 IN PTRUSTED_DOMAIN_AUTH_INFORMATION AuthenticationInformation,
319 OUT PLSA_HANDLE TrustedDomainHandle)
320{
323
324 TRACE("LsaCreateTrustedDomainEx(%p %p %p 0x%08lx %p) stub\n",
325 PolicyHandle, TrustedDomainInformation, AuthenticationInformation,
326 DesiredAccess, TrustedDomainHandle);
327
329 {
330 /* FIXME: Encrypt AuthenticationInformation */
331
333 (PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX)TrustedDomainInformation,
334 EncryptedAuthInfo,
336 (PLSAPR_HANDLE)TrustedDomainHandle);
337 }
339 {
341 }
343
344 return Status;
345}
346
347
348/*
349 * @implemented
350 */
352WINAPI
354{
356
357 TRACE("LsaDelete(%p)\n", ObjectHandle);
358
360 {
361 Status = LsarDelete((LSAPR_HANDLE)ObjectHandle);
362 }
364 {
366 }
368
369 return Status;
370}
371
372
373/*
374 * @implemented
375 */
377WINAPI
379 IN PSID TrustedDomainSid)
380{
382
383 TRACE("LsaDeleteTrustedDomain(%p %p)\n",
384 PolicyHandle, TrustedDomainSid);
385
387 {
389 TrustedDomainSid);
390 }
392 {
394 }
396
397 return Status;
398}
399
400
401/*
402 * @implemented
403 */
405WINAPI
407 IN PSID AccountSid,
408 OUT PLSA_UNICODE_STRING *UserRights,
409 OUT PULONG CountOfRights)
410{
411 LSAPR_USER_RIGHT_SET UserRightsSet;
413
414 TRACE("LsaEnumerateAccountRights(%p %p %p %p)\n",
415 PolicyHandle, AccountSid, UserRights, CountOfRights);
416
417 UserRightsSet.Entries = 0;
418 UserRightsSet.UserRights = NULL;
419
421 {
423 AccountSid,
424 &UserRightsSet);
425
426 *UserRights = (PUNICODE_STRING)UserRightsSet.UserRights;
427 *CountOfRights = UserRightsSet.Entries;
428 }
430 {
432
433 if (UserRightsSet.UserRights != NULL)
434 MIDL_user_free(UserRightsSet.UserRights);
435 }
437
438 return Status;
439}
440
441
442/*
443 * @implemented
444 */
446WINAPI
448 IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
450 IN ULONG PreferedMaximumLength,
451 OUT PULONG CountReturned)
452{
453 LSAPR_ACCOUNT_ENUM_BUFFER AccountEnumBuffer;
455
456 TRACE("LsaEnumerateAccounts(%p %p %p %lu %p)\n",
457 PolicyHandle, EnumerationContext, Buffer,
458 PreferedMaximumLength, CountReturned);
459
460 AccountEnumBuffer.EntriesRead = 0;
461 AccountEnumBuffer.Information = NULL;
462
464 {
466 EnumerationContext,
467 &AccountEnumBuffer,
468 PreferedMaximumLength);
469
470 *Buffer = AccountEnumBuffer.Information;
471 *CountReturned = AccountEnumBuffer.EntriesRead;
472 }
474 {
475 if (AccountEnumBuffer.Information != NULL)
476 MIDL_user_free(AccountEnumBuffer.Information);
477
479 }
481
482 return Status;
483}
484
485
486/*
487 * @implemented
488 */
490WINAPI
494 OUT PULONG CountReturned)
495{
496 LSAPR_ACCOUNT_ENUM_BUFFER AccountEnumBuffer;
498
499 TRACE("LsaEnumerateAccountsWithUserRight(%p %p %p %p) stub\n",
500 PolicyHandle, UserRight, Buffer, CountReturned);
501
502 AccountEnumBuffer.EntriesRead = 0;
503 AccountEnumBuffer.Information = NULL;
504
506 {
508 (PRPC_UNICODE_STRING)UserRight,
509 &AccountEnumBuffer);
510
511 *Buffer = AccountEnumBuffer.Information;
512 *CountReturned = AccountEnumBuffer.EntriesRead;
513 }
515 {
516 if (AccountEnumBuffer.Information != NULL)
517 MIDL_user_free(AccountEnumBuffer.Information);
518
520 }
522
523 return Status;
524}
525
526
527/*
528 * @implemented
529 */
531WINAPI
533 IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
535 IN ULONG PreferedMaximumLength,
536 OUT PULONG CountReturned)
537{
538 LSAPR_PRIVILEGE_ENUM_BUFFER PrivilegeEnumBuffer;
540
541 TRACE("LsaEnumeratePrivileges(%p %p %p %lu %p)\n",
542 PolicyHandle, EnumerationContext, Buffer,
543 PreferedMaximumLength, CountReturned);
544
545 PrivilegeEnumBuffer.Entries = 0;
546 PrivilegeEnumBuffer.Privileges = NULL;
547
549 {
551 EnumerationContext,
552 &PrivilegeEnumBuffer,
553 PreferedMaximumLength);
554
555 *Buffer = PrivilegeEnumBuffer.Privileges;
556 *CountReturned = PrivilegeEnumBuffer.Entries;
557
558 }
560 {
561 if (PrivilegeEnumBuffer.Privileges != NULL)
562 MIDL_user_free(PrivilegeEnumBuffer.Privileges);
563
565 }
567
568 return Status;
569}
570
571
572/*
573 * @implemented
574 */
576WINAPI
579{
581
582 TRACE("LsaEnumeratePrivilegesOfAccount(%p %p)\n",
583 AccountHandle, Privileges);
584
586 {
589 }
591 {
593 }
595
596 return Status;
597}
598
599
600/*
601 * @implemented
602 */
604WINAPI
606 IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
608 IN ULONG PreferedMaximumLength,
609 OUT PULONG CountReturned)
610{
611 LSAPR_TRUSTED_ENUM_BUFFER TrustedEnumBuffer;
613
614 TRACE("LsaEnumerateTrustedDomains(%p %p %p %lu %p)\n",
615 PolicyHandle, EnumerationContext, Buffer,
616 PreferedMaximumLength, CountReturned);
617
618 if (Buffer == NULL)
620
621 TrustedEnumBuffer.EntriesRead = 0;
622 TrustedEnumBuffer.Information = NULL;
623
625 {
627 EnumerationContext,
628 &TrustedEnumBuffer,
629 PreferedMaximumLength);
630
631 *Buffer = TrustedEnumBuffer.Information;
632 *CountReturned = TrustedEnumBuffer.EntriesRead;
633
634 }
636 {
637 if (TrustedEnumBuffer.Information != NULL)
638 MIDL_user_free(TrustedEnumBuffer.Information);
639
641 }
643
644 return Status;
645}
646
647
648/*
649 * @implemented
650 */
652WINAPI
654 IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext,
656 IN ULONG PreferedMaximumLength,
657 OUT PULONG CountReturned)
658{
659 LSAPR_TRUSTED_ENUM_BUFFER_EX TrustedEnumBuffer;
661
662 TRACE("LsaEnumerateTrustedDomainsEx(%p %p %p %lu %p)\n",
663 PolicyHandle, EnumerationContext, Buffer,
664 PreferedMaximumLength, CountReturned);
665
666 if (Buffer == NULL)
668
669 TrustedEnumBuffer.EntriesRead = 0;
670 TrustedEnumBuffer.EnumerationBuffer = NULL;
671
673 {
675 EnumerationContext,
676 &TrustedEnumBuffer,
677 PreferedMaximumLength);
678
679 *Buffer = TrustedEnumBuffer.EnumerationBuffer;
680 *CountReturned = TrustedEnumBuffer.EntriesRead;
681
682 }
684 {
685 if (TrustedEnumBuffer.EnumerationBuffer != NULL)
686 MIDL_user_free(TrustedEnumBuffer.EnumerationBuffer);
687
689 }
691
692 return Status;
693}
694
695
696/*
697 * @implemented
698 */
700WINAPI
702{
703 TRACE("LsaFreeMemory(%p)\n", Buffer);
704 return RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
705}
706
707
708/*
709 * @implemented
710 */
712WINAPI
714 OUT PQUOTA_LIMITS QuotaLimits)
715{
717
718 TRACE("LsaGetQuotasForAccount(%p %p)\n",
719 AccountHandle, QuotaLimits);
720
722 {
724 QuotaLimits);
725 }
727 {
729 }
731
732 return Status;
733}
734
735
736/*
737 * @implemented
738 */
740WINAPI
742 OUT PLSA_UNICODE_STRING *UserName,
743 OUT PLSA_UNICODE_STRING *DomainName OPTIONAL)
744{
745 PRPC_UNICODE_STRING UserNameString = NULL;
746 PRPC_UNICODE_STRING DomainNameString = NULL;
748
749 TRACE("LsaGetRemoteUserName(%s %p %p)\n",
750 SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
751 UserName, DomainName);
752
754 {
756 &UserNameString,
757 (DomainName != NULL) ? &DomainNameString : NULL);
758
759 *UserName = (PLSA_UNICODE_STRING)UserNameString;
760
761 if (DomainName != NULL)
762 *DomainName = (PLSA_UNICODE_STRING)DomainNameString;
763 }
765 {
766 if (UserNameString != NULL)
767 MIDL_user_free(UserNameString);
768
769 if (DomainNameString != NULL)
770 MIDL_user_free(DomainNameString);
771
773 }
775
776 return Status;
777}
778
779
780/*
781 * @implemented
782 */
784WINAPI
786 OUT PULONG SystemAccess)
787{
789
790 TRACE("LsaGetSystemAccessAccount(%p %p)\n",
791 AccountHandle, SystemAccess);
792
794 {
796 (ACCESS_MASK *)SystemAccess);
797 }
799 {
801 }
803
804 return Status;
805}
806
807
808/*
809 * @implemented
810 */
812WINAPI
814 OUT PUNICODE_STRING *DomainName OPTIONAL)
815{
816 PRPC_UNICODE_STRING UserNameString = NULL;
817 PRPC_UNICODE_STRING DomainNameString = NULL;
819
820 TRACE("LsaGetUserName(%p %p)\n",
821 UserName, DomainName);
822
824 {
826 &UserNameString,
827 (DomainName != NULL) ? &DomainNameString : NULL);
828
829 *UserName = (PUNICODE_STRING)UserNameString;
830
831 if (DomainName != NULL)
832 *DomainName = (PUNICODE_STRING)DomainNameString;
833 }
835 {
836 if (UserNameString != NULL)
837 MIDL_user_free(UserNameString);
838
839 if (DomainNameString != NULL)
840 MIDL_user_free(DomainNameString);
841
843 }
845
846 return Status;
847}
848
849
850/*
851 * @implemented
852 */
854WINAPI
856 IN ULONG Count,
858 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
860{
861 LSAPR_TRANSLATED_SIDS TranslatedSids = {0, NULL};
862 ULONG MappedCount = 0;
864
865 TRACE("LsaLookupNames(%p %lu %p %p %p)\n",
866 PolicyHandle, Count, Names, ReferencedDomains, Sids);
867
868 if (ReferencedDomains == NULL || Sids == NULL)
870
872 {
873 *ReferencedDomains = NULL;
874 *Sids = NULL;
875
876 TranslatedSids.Entries = Count;
877
878 Status = LsarLookupNames((LSAPR_HANDLE)PolicyHandle,
879 Count,
881 (PLSAPR_REFERENCED_DOMAIN_LIST *)ReferencedDomains,
882 &TranslatedSids,
884 &MappedCount);
885
886 *Sids = (PLSA_TRANSLATED_SID)TranslatedSids.Sids;
887 }
889 {
890 if (TranslatedSids.Sids != NULL)
891 MIDL_user_free(TranslatedSids.Sids);
892
894 }
896
897 return Status;
898}
899
900
901/*
902 * @implemented
903 */
905WINAPI
907 IN ULONG Flags,
908 IN ULONG Count,
910 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
912{
913 LSAPR_TRANSLATED_SIDS_EX2 TranslatedSids = {0, NULL};
914 ULONG MappedCount = 0;
916
917 TRACE("LsaLookupNames2(%p 0x%08x %lu %p %p %p)\n",
918 PolicyHandle, Flags, Count, Names, ReferencedDomains, Sids);
919
920 if (ReferencedDomains == NULL || Sids == NULL)
922
924 {
925 *ReferencedDomains = NULL;
926 *Sids = NULL;
927
928 TranslatedSids.Entries = Count;
929
930 Status = LsarLookupNames3((LSAPR_HANDLE)PolicyHandle,
931 Count,
933 (PLSAPR_REFERENCED_DOMAIN_LIST *)ReferencedDomains,
934 &TranslatedSids,
936 &MappedCount,
937 Flags,
938 2);
939
940 *Sids = (PLSA_TRANSLATED_SID2)TranslatedSids.Sids;
941 }
943 {
944 if (TranslatedSids.Sids != NULL)
945 MIDL_user_free(TranslatedSids.Sids);
946
948 }
950
951 return Status;
952}
953
954
955/*
956 * @implemented
957 */
959WINAPI
962 OUT PLSA_UNICODE_STRING *DisplayName,
963 OUT PUSHORT LanguageReturned)
964{
965 PRPC_UNICODE_STRING DisplayNameBuffer = NULL;
967
968 TRACE("LsaLookupPrivilegeDisplayName(%p %p %p %p)\n",
969 PolicyHandle, Name, DisplayName, LanguageReturned);
970
972 {
977 &DisplayNameBuffer,
978 LanguageReturned);
979
980 *DisplayName = (PUNICODE_STRING)DisplayNameBuffer;
981 }
983 {
984 if (DisplayNameBuffer != NULL)
985 MIDL_user_free(DisplayNameBuffer);
986
988 }
990
991 return Status;
992}
993
994
995/*
996 * @implemented
997 */
999WINAPI
1001 IN PLUID Value,
1003{
1004 PRPC_UNICODE_STRING NameBuffer = NULL;
1006
1007 TRACE("LsaLookupPrivilegeName(%p %p %p)\n",
1008 PolicyHandle, Value, Name);
1009
1011 {
1012 Status = LsarLookupPrivilegeName(PolicyHandle,
1013 Value,
1014 &NameBuffer);
1015
1016 *Name = (PUNICODE_STRING)NameBuffer;
1017 }
1019 {
1020 if (NameBuffer != NULL)
1021 MIDL_user_free(NameBuffer);
1022
1024 }
1026
1027 return Status;
1028}
1029
1030
1031/*
1032 * @implemented
1033 */
1035WINAPI
1038 OUT PLUID Value)
1039{
1040 LUID Luid;
1042
1043 TRACE("LsaLookupPrivilegeValue(%p %p %p)\n",
1044 PolicyHandle, Name, Value);
1045
1047 {
1048 Status = LsarLookupPrivilegeValue(PolicyHandle,
1050 &Luid);
1051 if (Status == STATUS_SUCCESS)
1052 *Value = Luid;
1053 }
1055 {
1057 }
1059
1060 return Status;
1061}
1062
1063
1064/*
1065 * @implemented
1066 */
1068WINAPI
1070 IN ULONG Count,
1071 IN PSID *Sids,
1072 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
1074{
1075 LSAPR_SID_ENUM_BUFFER SidEnumBuffer;
1076 LSAPR_TRANSLATED_NAMES TranslatedNames;
1077 ULONG MappedCount = 0;
1079
1080 TRACE("LsaLookupSids(%p %lu %p %p %p)\n",
1081 PolicyHandle, Count, Sids, ReferencedDomains, Names);
1082
1083 if (Count == 0)
1085
1086 SidEnumBuffer.Entries = Count;
1087 SidEnumBuffer.SidInfo = (PLSAPR_SID_INFORMATION)Sids;
1088
1090 {
1091 *ReferencedDomains = NULL;
1092 *Names = NULL;
1093
1094 TranslatedNames.Entries = 0;
1095 TranslatedNames.Names = NULL;
1096
1097 Status = LsarLookupSids((LSAPR_HANDLE)PolicyHandle,
1098 &SidEnumBuffer,
1099 (PLSAPR_REFERENCED_DOMAIN_LIST *)ReferencedDomains,
1100 &TranslatedNames,
1102 &MappedCount);
1103
1104 *Names = (PLSA_TRANSLATED_NAME)TranslatedNames.Names;
1105 }
1107 {
1108 if (TranslatedNames.Names != NULL)
1109 {
1110 MIDL_user_free(TranslatedNames.Names);
1111 }
1112
1114 }
1116
1117 return Status;
1118}
1119
1120
1121/******************************************************************************
1122 * LsaNtStatusToWinError
1123 *
1124 * PARAMS
1125 * Status [I]
1126 *
1127 * @implemented
1128 */
1129ULONG
1130WINAPI
1132{
1133 TRACE("LsaNtStatusToWinError(0x%lx)\n", Status);
1135}
1136
1137
1138/*
1139 * @implemented
1140 */
1142WINAPI
1144 IN PSID AccountSid,
1146 OUT PLSA_HANDLE AccountHandle)
1147{
1149
1150 TRACE("LsaOpenAccount(%p %p 0x%08lx %p)\n",
1151 PolicyHandle, AccountSid, DesiredAccess, AccountHandle);
1152
1154 {
1155 Status = LsarOpenAccount((LSAPR_HANDLE)PolicyHandle,
1156 AccountSid,
1158 AccountHandle);
1159 }
1161 {
1163 }
1165
1166 return Status;
1167}
1168
1169
1170/******************************************************************************
1171 * LsaOpenPolicy
1172 *
1173 * PARAMS
1174 * x1 []
1175 * x2 []
1176 * x3 []
1177 * x4 []
1178 *
1179 * @implemented
1180 */
1182WINAPI
1186 OUT PLSA_HANDLE PolicyHandle)
1187{
1189
1190 TRACE("LsaOpenPolicy(%s %p 0x%08lx %p)\n",
1191 SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
1192 ObjectAttributes, DesiredAccess, PolicyHandle);
1193
1194 /* FIXME: RPC should take care of this */
1195 if (!LsapIsLocalComputer(SystemName))
1197
1199 {
1200 *PolicyHandle = NULL;
1201
1202 Status = LsarOpenPolicy(SystemName ? SystemName->Buffer : NULL,
1205 PolicyHandle);
1206 }
1208 {
1210 }
1212
1213 TRACE("LsaOpenPolicy() done (Status: 0x%08lx)\n", Status);
1214
1215 return Status;
1216}
1217
1218
1219/*
1220 * @implemented
1221 */
1223WINAPI
1227 OUT PLSA_HANDLE PolicyHandle)
1228{
1230
1231 TRACE("LsaOpenPolicySce(%s %p 0x%08lx %p)\n",
1232 SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
1233 ObjectAttributes, DesiredAccess, PolicyHandle);
1234
1235 /* FIXME: RPC should take care of this */
1236 if (!LsapIsLocalComputer(SystemName))
1238
1240 {
1241 *PolicyHandle = NULL;
1242
1243 Status = LsarOpenPolicySce(SystemName ? SystemName->Buffer : NULL,
1246 PolicyHandle);
1247 }
1249 {
1251 }
1253
1254 TRACE("LsaOpenPolicySce() done (Status: 0x%08lx)\n", Status);
1255
1256 return Status;
1257}
1258
1259
1260/*
1261 * @implemented
1262 */
1264WINAPI
1266 IN PLSA_UNICODE_STRING SecretName,
1268 OUT PLSA_HANDLE SecretHandle)
1269{
1271
1272 TRACE("LsaOpenSecret(%p %p 0x%08lx %p)\n",
1273 PolicyHandle, SecretName, DesiredAccess, SecretHandle);
1274
1276 {
1277 *SecretHandle = NULL;
1278
1279 Status = LsarOpenSecret((LSAPR_HANDLE)PolicyHandle,
1280 (PRPC_UNICODE_STRING)SecretName,
1282 SecretHandle);
1283 }
1285 {
1287 }
1289
1290 TRACE("LsaOpenSecret() done (Status: 0x%08lx)\n", Status);
1291
1292 return Status;
1293}
1294
1295
1296/*
1297 * @implemented
1298 */
1300WINAPI
1302 IN PSID TrustedDomainSid,
1304 OUT PLSA_HANDLE TrustedDomainHandle)
1305{
1307
1308 TRACE("LsaOpenTrustedDomain(%p %p 0x%08lx %p)\n",
1309 PolicyHandle, TrustedDomainSid, DesiredAccess, TrustedDomainHandle);
1310
1312 {
1314 (PRPC_SID)TrustedDomainSid,
1316 (PLSAPR_HANDLE)TrustedDomainHandle);
1317 }
1319 {
1321 }
1323
1324 return Status;
1325}
1326
1327
1328/*
1329 * @implemented
1330 */
1332WINAPI
1334 IN PLSA_UNICODE_STRING TrustedDomainName,
1336 OUT PLSA_HANDLE TrustedDomainHandle)
1337{
1339
1340 TRACE("LsaOpenTrustedDomainByName(%p %p 0x%08lx %p)\n",
1341 PolicyHandle, TrustedDomainName, DesiredAccess, TrustedDomainHandle);
1342
1344 {
1346 (PRPC_UNICODE_STRING)TrustedDomainName,
1348 TrustedDomainHandle);
1349 }
1351 {
1353 }
1355
1356 return Status;
1357}
1358
1359
1360/*
1361 * @implemented
1362 */
1364WINAPI
1367 OUT PVOID *Buffer)
1368{
1369 PLSAPR_POLICY_DOMAIN_INFORMATION PolicyInformation = NULL;
1371
1372 TRACE("LsaQueryDomainInformationPolicy(%p %lu %p)\n",
1373 PolicyHandle, InformationClass, Buffer);
1374
1376 {
1379 &PolicyInformation);
1380
1381 *Buffer = PolicyInformation;
1382 }
1384 {
1385 if (PolicyInformation != NULL)
1386 MIDL_user_free(PolicyInformation);
1387
1389 }
1391
1392 return Status;
1393}
1394
1395
1396/*
1397 * @implemented
1398 */
1400WINAPI
1402 IN PLSA_UNICODE_STRING TrustedDomainName,
1403 OUT PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
1404{
1406
1407 TRACE("LsaQueryForestTrustInformation(%p %p %p)\n",
1408 PolicyHandle, TrustedDomainName, ForestTrustInfo);
1409
1411 {
1413 TrustedDomainName,
1415 ForestTrustInfo);
1416 }
1418 {
1420 }
1422
1423 return Status;
1424}
1425
1426
1427/*
1428 * @implemented
1429 */
1431WINAPI
1434 OUT PVOID *Buffer)
1435{
1436 PLSAPR_TRUSTED_DOMAIN_INFO TrustedDomainInformation = NULL;
1438
1439 TRACE("LsaQueryInfoTrustedDomain(%p %d %p) stub\n",
1440 TrustedDomainHandle, InformationClass, Buffer);
1441
1445
1447 {
1448 Status = LsarQueryInfoTrustedDomain((LSAPR_HANDLE)TrustedDomainHandle,
1450 &TrustedDomainInformation);
1451 *Buffer = TrustedDomainInformation;
1452 }
1454 {
1455 if (TrustedDomainInformation != NULL)
1456 MIDL_user_free(TrustedDomainInformation);
1457
1459 }
1461
1462 TRACE("Done (Status: 0x%08x)\n", Status);
1463
1464 return Status;
1465}
1466
1467
1468/*
1469 * @implemented
1470 */
1472WINAPI
1475 OUT PVOID *Buffer)
1476{
1477 PLSAPR_POLICY_INFORMATION PolicyInformation = NULL;
1479
1480 TRACE("LsaQueryInformationPolicy(%p %d %p)\n",
1481 PolicyHandle, InformationClass, Buffer);
1482
1484 {
1487 &PolicyInformation);
1488 *Buffer = PolicyInformation;
1489 }
1491 {
1492 if (PolicyInformation != NULL)
1493 MIDL_user_free(PolicyInformation);
1494
1496 }
1498
1499 TRACE("Done (Status: 0x%08x)\n", Status);
1500
1501 return Status;
1502}
1503
1504
1505/*
1506 * @implemented
1507 */
1509WINAPI
1511 OUT PLSA_UNICODE_STRING *CurrentValue OPTIONAL,
1512 OUT PLARGE_INTEGER CurrentValueSetTime OPTIONAL,
1514 OUT PLARGE_INTEGER OldValueSetTime OPTIONAL)
1515{
1516 PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue = NULL;
1517 PLSAPR_CR_CIPHER_VALUE EncryptedOldValue = NULL;
1518 PLSA_UNICODE_STRING DecryptedCurrentValue = NULL;
1519 PLSA_UNICODE_STRING DecryptedOldValue = NULL;
1522
1523 TRACE("LsaQuerySecret(%p %p %p %p %p)\n",
1524 SecretHandle, CurrentValue, CurrentValueSetTime,
1525 OldValue, OldValueSetTime);
1526
1528 {
1529 Status = LsarQuerySecret((PLSAPR_HANDLE)SecretHandle,
1530 &EncryptedCurrentValue,
1531 CurrentValueSetTime,
1532 &EncryptedOldValue,
1533 OldValueSetTime);
1534 }
1536 {
1538 }
1540
1541 if (!NT_SUCCESS(Status))
1542 goto done;
1543
1544 /* Decrypt the current value */
1545 if (CurrentValue != NULL)
1546 {
1547 if (EncryptedCurrentValue == NULL)
1548 {
1549 *CurrentValue = NULL;
1550 }
1551 else
1552 {
1553 /* FIXME: Decrypt the current value */
1554 BufferSize = sizeof(LSA_UNICODE_STRING) + EncryptedCurrentValue->MaximumLength;
1555 DecryptedCurrentValue = midl_user_allocate(BufferSize);
1556 if (DecryptedCurrentValue == NULL)
1557 {
1559 goto done;
1560 }
1561
1562 DecryptedCurrentValue->Length = (USHORT)EncryptedCurrentValue->Length;
1563 DecryptedCurrentValue->MaximumLength = (USHORT)EncryptedCurrentValue->MaximumLength;
1564 DecryptedCurrentValue->Buffer = (PWSTR)(DecryptedCurrentValue + 1);
1565 RtlCopyMemory(DecryptedCurrentValue->Buffer,
1566 EncryptedCurrentValue->Buffer,
1567 EncryptedCurrentValue->Length);
1568
1569 *CurrentValue = DecryptedCurrentValue;
1570 }
1571 }
1572
1573 /* Decrypt the old value */
1574 if (OldValue != NULL)
1575 {
1576 if (EncryptedOldValue == NULL)
1577 {
1578 *OldValue = NULL;
1579 }
1580 else
1581 {
1582 /* FIXME: Decrypt the old value */
1583 BufferSize = sizeof(LSA_UNICODE_STRING) + EncryptedOldValue->MaximumLength;
1584 DecryptedOldValue = midl_user_allocate(BufferSize);
1585 if (DecryptedOldValue == NULL)
1586 {
1588 goto done;
1589 }
1590
1591 DecryptedOldValue->Length = (USHORT)EncryptedOldValue->Length;
1592 DecryptedOldValue->MaximumLength = (USHORT)EncryptedOldValue->MaximumLength;
1593 DecryptedOldValue->Buffer = (PWSTR)(DecryptedOldValue + 1);
1594 RtlCopyMemory(DecryptedOldValue->Buffer,
1595 EncryptedOldValue->Buffer,
1596 EncryptedOldValue->Length);
1597
1598 *OldValue = DecryptedOldValue;
1599 }
1600 }
1601
1602done:
1603 if (!NT_SUCCESS(Status))
1604 {
1605 if (DecryptedCurrentValue != NULL)
1606 midl_user_free(DecryptedCurrentValue);
1607
1608 if (DecryptedOldValue != NULL)
1609 midl_user_free(DecryptedOldValue);
1610
1611 if (CurrentValue != NULL)
1612 *CurrentValue = NULL;
1613
1614 if (OldValue != NULL)
1615 *OldValue = NULL;
1616 }
1617
1618 if (EncryptedCurrentValue != NULL)
1619 midl_user_free(EncryptedCurrentValue);
1620
1621 if (EncryptedOldValue != NULL)
1622 midl_user_free(EncryptedOldValue);
1623
1624 return Status;
1625}
1626
1627
1628/*
1629 * @implemented
1630 */
1632WINAPI
1636{
1640
1641 TRACE("LsaQuerySecurityObject(%p %lx %p)\n",
1643
1644 SdBuffer.Length = 0;
1645 SdBuffer.SecurityDescriptor = NULL;
1646
1647 SdPointer = &SdBuffer;
1648
1650 {
1653 &SdPointer);
1654 if (NT_SUCCESS(Status))
1655 {
1657 }
1658 else
1659 {
1661 }
1662 }
1664 {
1666 }
1668
1669 return Status;
1670}
1671
1672
1673/*
1674 * @implemented
1675 */
1677WINAPI
1679 IN PSID TrustedDomainSid,
1681 OUT PVOID *Buffer)
1682{
1684
1685 TRACE("LsaQueryTrustedDomainInfo(%p %p %d %p) stub\n",
1686 PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
1687
1691
1693 {
1695 (PRPC_SID)TrustedDomainSid,
1698 }
1700 {
1702 }
1704
1705 return Status;
1706}
1707
1708
1709/*
1710 * @implemented
1711 */
1713WINAPI
1715 IN PLSA_UNICODE_STRING TrustedDomainName,
1717 OUT PVOID *Buffer)
1718{
1720
1721 TRACE("LsaQueryTrustedDomainInfoByName(%p %p %d %p)\n",
1722 PolicyHandle, TrustedDomainName, InformationClass, Buffer);
1723
1727
1729 {
1731 (PRPC_UNICODE_STRING)TrustedDomainName,
1734 }
1736 {
1738 }
1740
1741 return Status;
1742}
1743
1744
1745/*
1746 * @implemented
1747 */
1749WINAPI
1751 IN PSID AccountSid,
1752 IN BOOLEAN AllRights,
1753 IN PLSA_UNICODE_STRING UserRights,
1754 IN ULONG CountOfRights)
1755{
1757 LSAPR_USER_RIGHT_SET UserRightSet;
1758
1759 TRACE("LsaRemoveAccountRights(%p %p %d %p %lu)\n",
1760 PolicyHandle, AccountSid, AllRights, UserRights, CountOfRights);
1761
1762 UserRightSet.Entries = CountOfRights;
1763 UserRightSet.UserRights = (PRPC_UNICODE_STRING)UserRights;
1764
1766 {
1768 (PRPC_SID)AccountSid,
1769 AllRights,
1770 &UserRightSet);
1771 }
1773 {
1775 }
1777
1778 return Status;
1779}
1780
1781
1782/*
1783 * @implemented
1784 */
1786WINAPI
1788 IN BOOLEAN AllPrivileges,
1790{
1792
1794 {
1796 AllPrivileges,
1798 }
1800 {
1802 }
1804
1805 return Status;
1806}
1807
1808
1809/*
1810 * @implemented
1811 */
1813WINAPI
1816 OUT PLSA_UNICODE_STRING *PrivateData)
1817{
1818 PLSAPR_CR_CIPHER_VALUE EncryptedData = NULL;
1819 PLSA_UNICODE_STRING DecryptedData = NULL;
1822
1823 TRACE("LsaRetrievePrivateData(%p %p %p)\n",
1824 PolicyHandle, KeyName, PrivateData);
1825
1827 {
1830 &EncryptedData);
1831 }
1833 {
1835 }
1837
1838 if (EncryptedData == NULL)
1839 {
1840 *PrivateData = NULL;
1841 }
1842 else
1843 {
1844 BufferSize = sizeof(LSA_UNICODE_STRING) + EncryptedData->MaximumLength;
1845 DecryptedData = midl_user_allocate(BufferSize);
1846 if (DecryptedData == NULL)
1847 {
1849 goto done;
1850 }
1851
1852 DecryptedData->Length = (USHORT)EncryptedData->Length;
1853 DecryptedData->MaximumLength = (USHORT)EncryptedData->MaximumLength;
1854 DecryptedData->Buffer = (PWSTR)(DecryptedData + 1);
1855 RtlCopyMemory(DecryptedData->Buffer,
1856 EncryptedData->Buffer,
1857 EncryptedData->Length);
1858
1859 *PrivateData = DecryptedData;
1860 }
1861
1862done:
1863 if (!NT_SUCCESS(Status))
1864 {
1865 if (DecryptedData != NULL)
1866 midl_user_free(DecryptedData);
1867
1868 *PrivateData = NULL;
1869 }
1870
1871 if (EncryptedData != NULL)
1872 midl_user_free(EncryptedData);
1873
1874 return Status;
1875}
1876
1877
1878/*
1879 * @implemented
1880 */
1882WINAPI
1886{
1888
1889 TRACE("LsaSetDomainInformationPolicy(%p %d %p)\n",
1890 PolicyHandle, InformationClass, Buffer);
1891
1893 {
1897 }
1899 {
1901 }
1903
1904 return Status;
1905}
1906
1907
1908/*
1909 * @implemented
1910 */
1912WINAPI
1914 IN PLSA_UNICODE_STRING TrustedDomainName,
1915 IN PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo,
1916 IN BOOLEAN CheckOnly,
1918{
1920
1921 TRACE("LsaSetForestTrustInformation(%p %p %p %d %p)\n",
1922 PolicyHandle, TrustedDomainName, ForestTrustInfo, CheckOnly, CollisionInfo);
1923
1925 {
1927 TrustedDomainName,
1929 ForestTrustInfo,
1930 CheckOnly,
1931 CollisionInfo);
1932 }
1934 {
1936 }
1938
1939 return Status;
1940}
1941
1942
1943/*
1944 * @implemented
1945 */
1947WINAPI
1950 IN PVOID Buffer)
1951{
1953
1954 TRACE("LsaSetInformationPolicy(%p %d %p)\n",
1955 PolicyHandle, InformationClass, Buffer);
1956
1958 {
1962 }
1964 {
1966 }
1968
1969 return Status;
1970}
1971
1972
1973/*
1974 * @unimplemented
1975 */
1977WINAPI
1980 IN PVOID Buffer)
1981{
1982 FIXME("LsaSetInformationTrustedDomain(%p %d %p)\n",
1983 TrustedDomainHandle, InformationClass, Buffer);
1985}
1986
1987
1988/*
1989 * @implemented
1990 */
1992WINAPI
1994 IN PQUOTA_LIMITS QuotaLimits)
1995{
1997
1998 TRACE("LsaSetQuotasForAccount(%p %p)\n",
1999 AccountHandle, QuotaLimits);
2000
2002 {
2004 QuotaLimits);
2005 }
2007 {
2009 }
2011
2012 return Status;
2013}
2014
2015
2016/*
2017 * @implemented
2018 */
2020WINAPI
2022 IN PLSA_UNICODE_STRING CurrentValue OPTIONAL,
2024{
2025 PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue = NULL;
2026 PLSAPR_CR_CIPHER_VALUE EncryptedOldValue = NULL;
2029
2030 TRACE("LsaSetSecret(%p %p %p)\n",
2031 SecretHandle, EncryptedCurrentValue, EncryptedOldValue);
2032
2033 if (CurrentValue != NULL)
2034 {
2035 BufferSize = sizeof(LSAPR_CR_CIPHER_VALUE) + CurrentValue->MaximumLength;
2036 EncryptedCurrentValue = midl_user_allocate(BufferSize);
2037 if (EncryptedCurrentValue == NULL)
2038 {
2040 goto done;
2041 }
2042
2043 EncryptedCurrentValue->Length = CurrentValue->Length;
2044 EncryptedCurrentValue->MaximumLength = CurrentValue->MaximumLength;
2045 EncryptedCurrentValue->Buffer = (BYTE *)(EncryptedCurrentValue + 1);
2046 if (EncryptedCurrentValue->Buffer != NULL)
2047 memcpy(EncryptedCurrentValue->Buffer, CurrentValue->Buffer, CurrentValue->Length);
2048 }
2049
2050 if (OldValue != NULL)
2051 {
2052 BufferSize = sizeof(LSAPR_CR_CIPHER_VALUE) + OldValue->MaximumLength;
2053 EncryptedOldValue = midl_user_allocate(BufferSize);
2054 if (EncryptedOldValue == NULL)
2055 {
2057 goto done;
2058 }
2059
2060 EncryptedOldValue->Length = OldValue->Length;
2061 EncryptedOldValue->MaximumLength = OldValue->MaximumLength;
2062 EncryptedOldValue->Buffer = (BYTE*)(EncryptedOldValue + 1);
2063 if (EncryptedOldValue->Buffer != NULL)
2064 memcpy(EncryptedOldValue->Buffer, OldValue->Buffer, OldValue->Length);
2065 }
2066
2068 {
2069 Status = LsarSetSecret((LSAPR_HANDLE)SecretHandle,
2070 EncryptedCurrentValue,
2071 EncryptedOldValue);
2072 }
2074 {
2076 }
2078
2079done:
2080 if (EncryptedCurrentValue != NULL)
2081 midl_user_free(EncryptedCurrentValue);
2082
2083 if (EncryptedOldValue != NULL)
2084 midl_user_free(EncryptedOldValue);
2085
2086 return Status;
2087}
2088
2089
2090/*
2091 * @implemented
2092 */
2094WINAPI
2098{
2099 LSAPR_SR_SECURITY_DESCRIPTOR SdBuffer = {0, NULL};
2100 ULONG SdLength = 0;
2102
2103 TRACE("LsaSetSecurityObject(%p %lx %p)\n",
2105
2107 NULL,
2108 &SdLength);
2111
2112 SdBuffer.SecurityDescriptor = MIDL_user_allocate(SdLength);
2113 if (SdBuffer.SecurityDescriptor == NULL)
2115
2118 &SdLength);
2119 if (!NT_SUCCESS(Status))
2120 goto done;
2121
2122 SdBuffer.Length = SdLength;
2123
2125 {
2128 &SdBuffer);
2129 }
2131 {
2133 }
2135
2136done:
2137 if (SdBuffer.SecurityDescriptor != NULL)
2139
2140 return Status;
2141}
2142
2143
2144/*
2145 * @implemented
2146 */
2148WINAPI
2150 IN ULONG SystemAccess)
2151{
2153
2154 TRACE("LsaSetSystemAccessAccount(%p 0x%lx)\n",
2155 AccountHandle, SystemAccess);
2156
2158 {
2160 SystemAccess);
2161 }
2163 {
2165 }
2167
2168 return Status;
2169}
2170
2171
2172/*
2173 * @unimplemented
2174 */
2176WINAPI
2178 IN PLSA_UNICODE_STRING TrustedDomainName,
2180 IN PVOID Buffer)
2181{
2182 FIXME("LsaSetTrustedDomainInfoByName(%p %p %d %p) stub\n",
2183 PolicyHandle, TrustedDomainName, InformationClass, Buffer);
2184 return STATUS_SUCCESS;
2185}
2186
2187
2188/*
2189 * @unimplemented
2190 */
2192WINAPI
2194 IN PSID TrustedDomainSid,
2196 IN PVOID Buffer)
2197{
2198 FIXME("LsaSetTrustedDomainInformation(%p %p %d %p) stub\n",
2199 PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
2200 return STATUS_SUCCESS;
2201}
2202
2203
2204/*
2205 * @implemented
2206 */
2208WINAPI
2211 IN PLSA_UNICODE_STRING PrivateData OPTIONAL)
2212{
2213 PLSAPR_CR_CIPHER_VALUE EncryptedData = NULL;
2216
2217 TRACE("LsaStorePrivateData(%p %p %p)\n",
2218 PolicyHandle, KeyName, PrivateData);
2219
2220 if (PrivateData != NULL)
2221 {
2222 BufferSize = sizeof(LSAPR_CR_CIPHER_VALUE) + PrivateData->MaximumLength;
2223 EncryptedData = midl_user_allocate(BufferSize);
2224 if (EncryptedData == NULL)
2225 {
2227 goto done;
2228 }
2229
2230 EncryptedData->Length = PrivateData->Length;
2231 EncryptedData->MaximumLength = PrivateData->MaximumLength;
2232 EncryptedData->Buffer = (BYTE *)(EncryptedData + 1);
2233 if (EncryptedData->Buffer != NULL)
2234 RtlCopyMemory(EncryptedData->Buffer,
2235 PrivateData->Buffer,
2236 PrivateData->Length);
2237 }
2238
2240 {
2243 EncryptedData);
2244 }
2246 {
2248 }
2250
2251done:
2252 if (EncryptedData != NULL)
2253 midl_user_free(EncryptedData);
2254
2255 return Status;
2256}
2257
2258/* EOF */
unsigned char BOOLEAN
PWSTR Names[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define FIXME(fmt,...)
Definition: debug.h:111
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
Definition: bufpool.h:45
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
Definition: compname.c:446
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
handle_t hBinding
Definition: ctx_c.c:54
#define BufferSize
Definition: mmc.h:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS WINAPI LsaAddPrivilegesToAccount(IN LSA_HANDLE AccountHandle, IN PPRIVILEGE_SET PrivilegeSet)
Definition: lsa.c:141
NTSTATUS WINAPI LsaSetInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, IN PVOID Buffer)
Definition: lsa.c:1948
NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING TrustedDomainName, IN TRUSTED_INFORMATION_CLASS InformationClass, IN PVOID Buffer)
Definition: lsa.c:2177
NTSTATUS WINAPI LsaSetSecurityObject(IN LSA_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: lsa.c:2095
NTSTATUS WINAPI LsaCreateSecret(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING SecretName, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE SecretHandle)
Definition: lsa.c:251
NTSTATUS WINAPI LsaEnumerateTrustedDomains(IN LSA_HANDLE PolicyHandle, IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: lsa.c:605
NTSTATUS WINAPI LsaQuerySecurityObject(IN LSA_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
Definition: lsa.c:1633
NTSTATUS WINAPI LsaCreateTrustedDomain(IN LSA_HANDLE PolicyHandle, IN PLSA_TRUST_INFORMATION TrustedDomainInformation, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE TrustedDomainHandle)
Definition: lsa.c:283
NTSTATUS WINAPI LsaEnumerateAccounts(IN LSA_HANDLE PolicyHandle, IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: lsa.c:447
NTSTATUS WINAPI LsaQueryDomainInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_DOMAIN_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1365
NTSTATUS WINAPI LsaQueryForestTrustInformation(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING TrustedDomainName, OUT PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
Definition: lsa.c:1401
NTSTATUS WINAPI LsaLookupPrivilegeDisplayName(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING Name, OUT PLSA_UNICODE_STRING *DisplayName, OUT PUSHORT LanguageReturned)
Definition: lsa.c:960
NTSTATUS WINAPI LsaEnumeratePrivileges(IN LSA_HANDLE PolicyHandle, IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: lsa.c:532
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
Definition: lsa.c:1183
NTSTATUS WINAPI LsaClearAuditLog(IN LSA_HANDLE PolicyHandle)
Definition: lsa.c:169
NTSTATUS WINAPI LsaLookupPrivilegeName(IN LSA_HANDLE PolicyHandle, IN PLUID Value, OUT PUNICODE_STRING *Name)
Definition: lsa.c:1000
NTSTATUS WINAPI LsaLookupSids(IN LSA_HANDLE PolicyHandle, IN ULONG Count, IN PSID *Sids, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_NAME *Names)
Definition: lsa.c:1069
handle_t __RPC_USER PLSAPR_SERVER_NAME_bind(PLSAPR_SERVER_NAME pszSystemName)
Definition: lsa.c:45
NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING UserRight OPTIONAL, OUT PVOID *Buffer, OUT PULONG CountReturned)
Definition: lsa.c:491
ULONG WINAPI LsaNtStatusToWinError(IN NTSTATUS Status)
Definition: lsa.c:1131
NTSTATUS WINAPI LsaSetSystemAccessAccount(IN LSA_HANDLE AccountHandle, IN ULONG SystemAccess)
Definition: lsa.c:2149
NTSTATUS WINAPI LsaLookupPrivilegeValue(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING Name, OUT PLUID Value)
Definition: lsa.c:1036
NTSTATUS WINAPI LsaCreateAccount(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE AccountHandle)
Definition: lsa.c:219
NTSTATUS WINAPI LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1473
NTSTATUS WINAPI LsaDelete(IN LSA_HANDLE ObjectHandle)
Definition: lsa.c:353
NTSTATUS WINAPI LsaEnumeratePrivilegesOfAccount(IN LSA_HANDLE AccountHandle, OUT PPRIVILEGE_SET *Privileges)
Definition: lsa.c:577
NTSTATUS WINAPI LsaLookupNames2(IN LSA_HANDLE PolicyHandle, IN ULONG Flags, IN ULONG Count, IN PLSA_UNICODE_STRING Names, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_SID2 *Sids)
Definition: lsa.c:906
void __RPC_USER PLSAPR_SERVER_NAME_unbind(PLSAPR_SERVER_NAME pszSystemName, handle_t hBinding)
Definition: lsa.c:85
NTSTATUS WINAPI LsaQuerySecret(IN LSA_HANDLE SecretHandle, OUT PLSA_UNICODE_STRING *CurrentValue OPTIONAL, OUT PLARGE_INTEGER CurrentValueSetTime OPTIONAL, OUT PLSA_UNICODE_STRING *OldValue OPTIONAL, OUT PLARGE_INTEGER OldValueSetTime OPTIONAL)
Definition: lsa.c:1510
NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING TrustedDomainName, IN TRUSTED_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1714
NTSTATUS WINAPI LsaDeleteTrustedDomain(IN LSA_HANDLE PolicyHandle, IN PSID TrustedDomainSid)
Definition: lsa.c:378
NTSTATUS WINAPI LsaGetSystemAccessAccount(IN LSA_HANDLE AccountHandle, OUT PULONG SystemAccess)
Definition: lsa.c:785
NTSTATUS WINAPI LsaOpenAccount(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE AccountHandle)
Definition: lsa.c:1143
NTSTATUS WINAPI LsaOpenSecret(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING SecretName, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE SecretHandle)
Definition: lsa.c:1265
NTSTATUS WINAPI LsaGetUserName(OUT PUNICODE_STRING *UserName, OUT PUNICODE_STRING *DomainName OPTIONAL)
Definition: lsa.c:813
NTSTATUS WINAPI LsaStorePrivateData(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING KeyName, IN PLSA_UNICODE_STRING PrivateData OPTIONAL)
Definition: lsa.c:2209
NTSTATUS WINAPI LsaRemovePrivilegesFromAccount(IN LSA_HANDLE AccountHandle, IN BOOLEAN AllPrivileges, IN PPRIVILEGE_SET Privileges OPTIONAL)
Definition: lsa.c:1787
NTSTATUS WINAPI LsaCreateTrustedDomainEx(IN LSA_HANDLE PolicyHandle, IN PTRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation, IN PTRUSTED_DOMAIN_AUTH_INFORMATION AuthenticationInformation, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE TrustedDomainHandle)
Definition: lsa.c:315
NTSTATUS WINAPI LsaOpenPolicySce(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
Definition: lsa.c:1224
NTSTATUS WINAPI LsaQueryTrustedDomainInfo(IN LSA_HANDLE PolicyHandle, IN PSID TrustedDomainSid, IN TRUSTED_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1678
NTSTATUS WINAPI LsaSetDomainInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_DOMAIN_INFORMATION_CLASS InformationClass, IN PVOID Buffer OPTIONAL)
Definition: lsa.c:1883
NTSTATUS WINAPI LsaSetInformationTrustedDomain(IN LSA_HANDLE TrustedDomainHandle, IN TRUSTED_INFORMATION_CLASS InformationClass, IN PVOID Buffer)
Definition: lsa.c:1978
NTSTATUS WINAPI LsaSetSecret(IN LSA_HANDLE SecretHandle, IN PLSA_UNICODE_STRING CurrentValue OPTIONAL, IN PLSA_UNICODE_STRING OldValue OPTIONAL)
Definition: lsa.c:2021
NTSTATUS WINAPI LsaAddAccountRights(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN PLSA_UNICODE_STRING UserRights, IN ULONG CountOfRights)
Definition: lsa.c:105
static BOOL LsapIsLocalComputer(PLSA_UNICODE_STRING ServerName)
Definition: lsa.c:21
NTSTATUS WINAPI LsaSetQuotasForAccount(IN LSA_HANDLE AccountHandle, IN PQUOTA_LIMITS QuotaLimits)
Definition: lsa.c:1993
NTSTATUS WINAPI LsaQueryInfoTrustedDomain(IN LSA_HANDLE TrustedDomainHandle, IN TRUSTED_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1432
NTSTATUS WINAPI LsaSetForestTrustInformation(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING TrustedDomainName, IN PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo, IN BOOLEAN CheckOnly, OUT PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo)
Definition: lsa.c:1913
NTSTATUS WINAPI LsaGetQuotasForAccount(IN LSA_HANDLE AccountHandle, OUT PQUOTA_LIMITS QuotaLimits)
Definition: lsa.c:713
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
Definition: lsa.c:701
NTSTATUS WINAPI LsaEnumerateAccountRights(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, OUT PLSA_UNICODE_STRING *UserRights, OUT PULONG CountOfRights)
Definition: lsa.c:406
NTSTATUS WINAPI LsaSetTrustedDomainInformation(IN LSA_HANDLE PolicyHandle, IN PSID TrustedDomainSid, IN TRUSTED_INFORMATION_CLASS InformationClass, IN PVOID Buffer)
Definition: lsa.c:2193
NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(IN LSA_HANDLE PolicyHandle, IN OUT PLSA_ENUMERATION_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: lsa.c:653
NTSTATUS WINAPI LsaRemoveAccountRights(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN BOOLEAN AllRights, IN PLSA_UNICODE_STRING UserRights, IN ULONG CountOfRights)
Definition: lsa.c:1750
NTSTATUS WINAPI LsaGetRemoteUserName(IN PLSA_UNICODE_STRING SystemName OPTIONAL, OUT PLSA_UNICODE_STRING *UserName, OUT PLSA_UNICODE_STRING *DomainName OPTIONAL)
Definition: lsa.c:741
NTSTATUS WINAPI LsaLookupNames(IN LSA_HANDLE PolicyHandle, IN ULONG Count, IN PLSA_UNICODE_STRING Names, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_SID *Sids)
Definition: lsa.c:855
NTSTATUS WINAPI LsaRetrievePrivateData(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING KeyName, OUT PLSA_UNICODE_STRING *PrivateData)
Definition: lsa.c:1814
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
Definition: lsa.c:194
NTSTATUS WINAPI LsaOpenTrustedDomain(IN LSA_HANDLE PolicyHandle, IN PSID TrustedDomainSid, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE TrustedDomainHandle)
Definition: lsa.c:1301
NTSTATUS WINAPI LsaOpenTrustedDomainByName(IN LSA_HANDLE PolicyHandle, IN PLSA_UNICODE_STRING TrustedDomainName, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE TrustedDomainHandle)
Definition: lsa.c:1333
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1340
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1713
Status
Definition: gdiplustypes.h:25
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376
#define debugstr_w
Definition: kernel32.h:32
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:816
LANGID WINAPI GetSystemDefaultUILanguage(void)
Definition: lang.c:836
struct _LSAPR_CR_CIPHER_VALUE LSAPR_CR_CIPHER_VALUE
LPWSTR PLSAPR_SERVER_NAME
Definition: lsa.idl:7
@ LsapLookupWksta
Definition: lsa.idl:148
struct _LSAPR_SID_INFORMATION * PLSAPR_SID_INFORMATION
NTSTATUS WINAPI LsarSetSystemAccessAccount(LSAPR_HANDLE AccountHandle, ACCESS_MASK SystemAccess)
Definition: lsarpc.c:2012
NTSTATUS WINAPI LsarEnumerateAccountsWithUserRight(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING UserRight, PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer)
Definition: lsarpc.c:2574
NTSTATUS WINAPI LsarEnumerateTrustedDomains(LSAPR_HANDLE PolicyHandle, DWORD *EnumerationContext, PLSAPR_TRUSTED_ENUM_BUFFER EnumerationBuffer, DWORD PreferedMaximumLength)
Definition: lsarpc.c:1176
NTSTATUS WINAPI LsarQueryDomainInformationPolicy(LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, PLSAPR_POLICY_DOMAIN_INFORMATION *PolicyInformation)
Definition: lsarpc.c:3866
NTSTATUS WINAPI LsarCreateTrustedDomainEx2(LSAPR_HANDLE PolicyHandle, PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation, PLSAPR_TRUSTED_DOMAIN_AUTH_INFORMATION_INTERNAL AuthentificationInformation, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *TrustedDomainHandle)
Definition: lsarpc.c:4025
NTSTATUS WINAPI LsarQuerySecret(LSAPR_HANDLE SecretHandle, PLSAPR_CR_CIPHER_VALUE *EncryptedCurrentValue, PLARGE_INTEGER CurrentValueSetTime, PLSAPR_CR_CIPHER_VALUE *EncryptedOldValue, PLARGE_INTEGER OldValueSetTime)
Definition: lsarpc.c:2246
NTSTATUS WINAPI LsarOpenAccount(LSAPR_HANDLE PolicyHandle, PRPC_SID AccountSid, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *AccountHandle)
Definition: lsarpc.c:1465
NTSTATUS WINAPI LsarSetInformationPolicy(LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, PLSAPR_POLICY_INFORMATION PolicyInformation)
Definition: lsarpc.c:663
NTSTATUS WINAPI LsarEnumeratePrivileges(LSAPR_HANDLE PolicyHandle, DWORD *EnumerationContext, PLSAPR_PRIVILEGE_ENUM_BUFFER EnumerationBuffer, DWORD PreferedMaximumLength)
Definition: lsarpc.c:166
NTSTATUS WINAPI LsarGetQuotasForAccount(LSAPR_HANDLE AccountHandle, PQUOTA_LIMITS QuotaLimits)
Definition: lsarpc.c:1878
NTSTATUS WINAPI LsarOpenTrustedDomain(LSAPR_HANDLE PolicyHandle, PRPC_SID TrustedDomainSid, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *TrustedDomainHandle)
Definition: lsarpc.c:2046
NTSTATUS WINAPI LsarRemovePrivilegesFromAccount(LSAPR_HANDLE AccountHandle, BOOLEAN AllPrivileges, PLSAPR_PRIVILEGE_SET Privileges)
Definition: lsarpc.c:1719
NTSTATUS WINAPI LsarRetrievePrivateData(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING KeyName, PLSAPR_CR_CIPHER_VALUE *EncryptedData)
Definition: lsarpc.c:3618
NTSTATUS WINAPI LsarEnumerateAccounts(LSAPR_HANDLE PolicyHandle, DWORD *EnumerationContext, PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer, DWORD PreferedMaximumLength)
Definition: lsarpc.c:928
NTSTATUS WINAPI LsarDeleteTrustedDomain(LSAPR_HANDLE PolicyHandle, PRPC_SID TrustedDomainSid)
Definition: lsarpc.c:3446
NTSTATUS WINAPI LsarLookupPrivilegeName(LSAPR_HANDLE PolicyHandle, PLUID Value, PRPC_UNICODE_STRING *Name)
Definition: lsarpc.c:2464
NTSTATUS WINAPI LsarLookupNames(LSAPR_HANDLE PolicyHandle, DWORD Count, PRPC_UNICODE_STRING Names, PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains, PLSAPR_TRANSLATED_SIDS TranslatedSids, LSAP_LOOKUP_LEVEL LookupLevel, DWORD *MappedCount)
Definition: lsarpc.c:1192
NTSTATUS WINAPI LsarQueryTrustedDomainInfo(LSAPR_HANDLE PolicyHandle, PRPC_SID TrustedDomainSid, TRUSTED_INFORMATION_CLASS InformationClass, PLSAPR_TRUSTED_DOMAIN_INFO *TrustedDomainInformation)
Definition: lsarpc.c:3410
NTSTATUS WINAPI LsarLookupPrivilegeValue(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING Name, PLUID Value)
Definition: lsarpc.c:2428
NTSTATUS WINAPI LsarGetUserName(LPWSTR SystemName, PRPC_UNICODE_STRING *UserName, PRPC_UNICODE_STRING *DomainName)
Definition: lsarpc.c:3739
NTSTATUS WINAPI LsarSetSecret(LSAPR_HANDLE SecretHandle, PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue, PLSAPR_CR_CIPHER_VALUE EncryptedOldValue)
Definition: lsarpc.c:2146
NTSTATUS WINAPI LsarOpenPolicy(LPWSTR SystemName, PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *PolicyHandle)
Definition: lsarpc.c:495
NTSTATUS WINAPI LsarLookupNames3(LSAPR_HANDLE PolicyHandle, DWORD Count, PRPC_UNICODE_STRING Names, PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains, PLSAPR_TRANSLATED_SIDS_EX2 TranslatedSids, LSAP_LOOKUP_LEVEL LookupLevel, DWORD *MappedCount, DWORD LookupOptions, DWORD ClientRevision)
Definition: lsarpc.c:4138
NTSTATUS WINAPI LsarQueryInfoTrustedDomain(LSAPR_HANDLE TrustedDomainHandle, TRUSTED_INFORMATION_CLASS InformationClass, PLSAPR_TRUSTED_DOMAIN_INFO *TrustedDomainInformation)
Definition: lsarpc.c:2064
NTSTATUS WINAPI LsarOpenSecret(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING SecretName, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *SecretHandle)
Definition: lsarpc.c:2090
NTSTATUS WINAPI LsarEnumeratePrivilegesAccount(LSAPR_HANDLE AccountHandle, PLSAPR_PRIVILEGE_SET *Privileges)
Definition: lsarpc.c:1504
NTSTATUS WINAPI LsarClearAuditLog(LSAPR_HANDLE ObjectHandle)
Definition: lsarpc.c:804
NTSTATUS WINAPI LsarClose(LSAPR_HANDLE *ObjectHandle)
Definition: lsarpc.c:125
NTSTATUS WINAPI LsarCreateTrustedDomain(LSAPR_HANDLE PolicyHandle, PLSAPR_TRUST_INFORMATION TrustedDomainInformation, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *TrustedDomainHandle)
Definition: lsarpc.c:1158
NTSTATUS WINAPI LsarSetQuotasForAccount(LSAPR_HANDLE AccountHandle, PQUOTA_LIMITS QuotaLimits)
Definition: lsarpc.c:1913
NTSTATUS WINAPI LsarGetSystemAccessAccount(LSAPR_HANDLE AccountHandle, ACCESS_MASK *SystemAccess)
Definition: lsarpc.c:1977
NTSTATUS WINAPI LsarAddPrivilegesToAccount(LSAPR_HANDLE AccountHandle, PLSAPR_PRIVILEGE_SET Privileges)
Definition: lsarpc.c:1563
NTSTATUS WINAPI LsarStorePrivateData(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING KeyName, PLSAPR_CR_CIPHER_VALUE EncryptedData)
Definition: lsarpc.c:3462
NTSTATUS WINAPI LsarLookupPrivilegeDisplayName(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING Name, USHORT ClientLanguage, USHORT ClientSystemDefaultLanguage, PRPC_UNICODE_STRING *DisplayName, USHORT *LanguageReturned)
Definition: lsarpc.c:2494
NTSTATUS WINAPI LsarSetForestTrustInformation(LSAPR_HANDLE PolicyHandle, PLSA_UNICODE_STRING TrustedDomainName, LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType, PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo, BOOLEAN CheckOnly, PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo)
Definition: lsarpc.c:4238
NTSTATUS WINAPI LsarQuerySecurityObject(LSAPR_HANDLE ObjectHandle, SECURITY_INFORMATION SecurityInformation, PLSAPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor)
Definition: lsarpc.c:198
NTSTATUS WINAPI LsarQueryForestTrustInformation(LSAPR_HANDLE PolicyHandle, PLSA_UNICODE_STRING TrustedDomainName, LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType, PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
Definition: lsarpc.c:4224
NTSTATUS WINAPI LsarAddAccountRights(LSAPR_HANDLE PolicyHandle, PRPC_SID AccountSid, PLSAPR_USER_RIGHT_SET UserRights)
Definition: lsarpc.c:3003
NTSTATUS WINAPI LsarEnumerateAccountRights(LSAPR_HANDLE PolicyHandle, PRPC_SID AccountSid, PLSAPR_USER_RIGHT_SET UserRights)
Definition: lsarpc.c:2853
NTSTATUS WINAPI LsarLookupSids(LSAPR_HANDLE PolicyHandle, PLSAPR_SID_ENUM_BUFFER SidEnumBuffer, PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains, PLSAPR_TRANSLATED_NAMES TranslatedNames, LSAP_LOOKUP_LEVEL LookupLevel, DWORD *MappedCount)
Definition: lsarpc.c:1256
NTSTATUS WINAPI LsarCreateSecret(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING SecretName, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *SecretHandle)
Definition: lsarpc.c:1319
NTSTATUS WINAPI LsarQueryInformationPolicy(LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, PLSAPR_POLICY_INFORMATION *PolicyInformation)
Definition: lsarpc.c:531
NTSTATUS WINAPI LsarOpenPolicySce(LPWSTR SystemName, PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *PolicyHandle)
Definition: lsarpc.c:4346
NTSTATUS WINAPI LsarCreateAccount(LSAPR_HANDLE PolicyHandle, PRPC_SID AccountSid, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *AccountHandle)
Definition: lsarpc.c:883
NTSTATUS WINAPI LsarEnumerateTrustedDomainsEx(LSAPR_HANDLE PolicyHandle, DWORD *EnumerationContext, PLSAPR_TRUSTED_ENUM_BUFFER_EX EnumerationBuffer, DWORD PreferedMaximumLength)
Definition: lsarpc.c:3816
NTSTATUS WINAPI LsarSetSecurityObject(LSAPR_HANDLE ObjectHandle, SECURITY_INFORMATION SecurityInformation, PLSAPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor)
Definition: lsarpc.c:323
NTSTATUS WINAPI LsarSetDomainInformationPolicy(LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, PLSAPR_POLICY_DOMAIN_INFORMATION PolicyInformation)
Definition: lsarpc.c:3879
NTSTATUS WINAPI LsarOpenTrustedDomainByName(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING TrustedDomainName, ACCESS_MASK DesiredAccess, LSAPR_HANDLE *TrustedDomainHandle)
Definition: lsarpc.c:3892
NTSTATUS WINAPI LsarQueryTrustedDomainInfoByName(LSAPR_HANDLE PolicyHandle, PRPC_UNICODE_STRING TrustedDomainName, POLICY_INFORMATION_CLASS InformationClass, PLSAPR_TRUSTED_DOMAIN_INFO *PolicyInformation)
Definition: lsarpc.c:3780
NTSTATUS WINAPI LsarDelete(LSAPR_HANDLE ObjectHandle)
Definition: lsarpc.c:154
NTSTATUS WINAPI LsarRemoveAccountRights(LSAPR_HANDLE PolicyHandle, PRPC_SID AccountSid, BOOLEAN AllRights, PLSAPR_USER_RIGHT_SET UserRights)
Definition: lsarpc.c:3214
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
struct _RPC_UNICODE_STRING * PRPC_UNICODE_STRING
NTSYSAPI NTSTATUS NTAPI RtlMakeSelfRelativeSD(_In_ PSECURITY_DESCRIPTOR AbsoluteSD, _Out_ PSECURITY_DESCRIPTOR SelfRelativeSD, _Inout_ PULONG BufferLength)
int Count
Definition: noreturn.cpp:7
ULONG ACCESS_MASK
Definition: nt_native.h:40
struct _LSA_TRANSLATED_SID2 * PLSA_TRANSLATED_SID2
enum _POLICY_DOMAIN_INFORMATION_CLASS POLICY_DOMAIN_INFORMATION_CLASS
struct _LSA_UNICODE_STRING * PLSA_UNICODE_STRING
@ TrustedDomainFullInformationInternal
Definition: ntsecapi.h:340
@ TrustedDomainAuthInformationInternal
Definition: ntsecapi.h:339
struct _LSA_UNICODE_STRING LSA_UNICODE_STRING
enum _POLICY_INFORMATION_CLASS POLICY_INFORMATION_CLASS
enum _TRUSTED_INFORMATION_CLASS TRUSTED_INFORMATION_CLASS
@ ForestTrustDomainInfo
Definition: ntsecapi.h:345
ULONG * PLSA_ENUMERATION_HANDLE
Definition: ntsecapi.h:363
struct _LSA_TRANSLATED_SID * PLSA_TRANSLATED_SID
struct _LSA_TRANSLATED_NAME * PLSA_TRANSLATED_NAME
#define RPC_NT_SERVER_UNAVAILABLE
Definition: ntstatus.h:1201
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_INVALID_INFO_CLASS
Definition: ntstatus.h:240
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:880
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:787
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:740
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:175
#define RpcEndExcept
Definition: rpc.h:128
#define midl_user_free
Definition: rpc.h:45
#define RpcTryExcept
Definition: rpc.h:126
#define RpcExcept(expr)
Definition: rpc.h:127
long RPC_STATUS
Definition: rpc.h:52
#define __RPC_USER
Definition: rpc.h:65
#define RpcExceptionCode()
Definition: rpc.h:132
#define midl_user_allocate
Definition: rpc.h:44
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define TRACE(s)
Definition: solgame.cpp:4
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PLSAPR_ACCOUNT_INFORMATION Information
Definition: lsa.idl:97
PLSAPR_POLICY_PRIVILEGE_DEF Privileges
Definition: lsa.idl:88
PLSAPR_SID_INFORMATION SidInfo
Definition: lsa.idl:163
PLSAPR_TRANSLATED_NAME Names
Definition: lsa.idl:174
PLSAPR_TRANSLATED_SID_EX2 Sids
Definition: lsa.idl:210
PLSA_TRANSLATED_SID Sids
Definition: lsa.idl:144
PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX EnumerationBuffer
Definition: lsa.idl:442
PLSAPR_TRUST_INFORMATION Information
Definition: lsa.idl:344
PRPC_UNICODE_STRING UserRights
Definition: lsa.idl:393
USHORT MaximumLength
Definition: ntsecapi.h:164
Definition: ps.c:97
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint16_t * PUSHORT
Definition: typedefs.h:56
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
#define MAX_COMPUTERNAME_LENGTH
Definition: winbase.h:243
#define WINAPI
Definition: msvc.h:6
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
Definition: sefuncs.h:17
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193