- Merge from trunk up to r45543
[reactos.git] / dll / win32 / advapi32 / sec / lsa.c
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 #include "wine/debug.h"
15
16 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
17
18 /* imported from wine 1.1.14 */
19 static void* ADVAPI_GetDomainName(unsigned sz, unsigned ofs)
20 {
21 HKEY key;
22 LONG ret;
23 BYTE* ptr = NULL;
24 UNICODE_STRING* ustr;
25
26 static const WCHAR wVNETSUP[] = {
27 'S','y','s','t','e','m','\\',
28 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
29 'S','e','r','v','i','c','e','s','\\',
30 'V','x','D','\\','V','N','E','T','S','U','P','\0'};
31
32 ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wVNETSUP, 0, KEY_READ, &key);
33 if (ret == ERROR_SUCCESS)
34 {
35 DWORD size = 0;
36 static const WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 };
37
38 ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size);
39 if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS)
40 {
41 ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz + size);
42 if (!ptr) return NULL;
43 ustr = (UNICODE_STRING*)(ptr + ofs);
44 ustr->MaximumLength = size;
45 ustr->Buffer = (WCHAR*)(ptr + sz);
46 ret = RegQueryValueExW(key, wg, NULL, NULL, (LPBYTE)ustr->Buffer, &size);
47 if (ret != ERROR_SUCCESS)
48 {
49 HeapFree(GetProcessHeap(), 0, ptr);
50 ptr = NULL;
51 }
52 else ustr->Length = size - sizeof(WCHAR);
53 }
54 RegCloseKey(key);
55 }
56 if (!ptr)
57 {
58 static const WCHAR wDomain[] = {'D','O','M','A','I','N','\0'};
59 ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
60 sz + sizeof(wDomain));
61 if (!ptr) return NULL;
62 ustr = (UNICODE_STRING*)(ptr + ofs);
63 ustr->MaximumLength = sizeof(wDomain);
64 ustr->Buffer = (WCHAR*)(ptr + sz);
65 ustr->Length = sizeof(wDomain) - sizeof(WCHAR);
66 memcpy(ustr->Buffer, wDomain, sizeof(wDomain));
67 }
68 return ptr;
69 }
70
71 handle_t __RPC_USER
72 PLSAPR_SERVER_NAME_bind(PLSAPR_SERVER_NAME pszSystemName)
73 {
74 handle_t hBinding = NULL;
75 LPWSTR pszStringBinding;
76 RPC_STATUS status;
77
78 TRACE("PLSAPR_SERVER_NAME_bind() called\n");
79
80 status = RpcStringBindingComposeW(NULL,
81 L"ncacn_np",
82 pszSystemName,
83 L"\\pipe\\lsarpc",
84 NULL,
85 &pszStringBinding);
86 if (status)
87 {
88 TRACE("RpcStringBindingCompose returned 0x%x\n", status);
89 return NULL;
90 }
91
92 /* Set the binding handle that will be used to bind to the server. */
93 status = RpcBindingFromStringBindingW(pszStringBinding,
94 &hBinding);
95 if (status)
96 {
97 TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
98 }
99
100 status = RpcStringFreeW(&pszStringBinding);
101 if (status)
102 {
103 TRACE("RpcStringFree returned 0x%x\n", status);
104 }
105
106 return hBinding;
107 }
108
109
110 void __RPC_USER
111 PLSAPR_SERVER_NAME_unbind(PLSAPR_SERVER_NAME pszSystemName,
112 handle_t hBinding)
113 {
114 RPC_STATUS status;
115
116 TRACE("PLSAPR_SERVER_NAME_unbind() called\n");
117
118 status = RpcBindingFree(&hBinding);
119 if (status)
120 {
121 TRACE("RpcBindingFree returned 0x%x\n", status);
122 }
123 }
124
125
126 /*
127 * @implemented
128 */
129 NTSTATUS WINAPI
130 LsaClose(LSA_HANDLE ObjectHandle)
131 {
132 NTSTATUS Status;
133
134 TRACE("LsaClose(0x%p) called\n", ObjectHandle);
135
136 RpcTryExcept
137 {
138 Status = LsarClose((PLSAPR_HANDLE)&ObjectHandle);
139 }
140 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
141 {
142 Status = I_RpcMapWin32Status(RpcExceptionCode());
143 }
144 RpcEndExcept;
145
146 return Status;
147 }
148
149
150 /*
151 * @implemented
152 */
153 NTSTATUS WINAPI
154 LsaDelete(LSA_HANDLE ObjectHandle)
155 {
156 NTSTATUS Status;
157
158 TRACE("LsaDelete(0x%p) called\n", ObjectHandle);
159
160 RpcTryExcept
161 {
162 Status = LsarDelete((LSAPR_HANDLE)ObjectHandle);
163 }
164 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
165 {
166 Status = I_RpcMapWin32Status(RpcExceptionCode());
167 }
168 RpcEndExcept;
169
170 return Status;
171 }
172
173
174 /*
175 * @unimplemented
176 */
177 NTSTATUS
178 WINAPI
179 LsaAddAccountRights(
180 LSA_HANDLE PolicyHandle,
181 PSID AccountSid,
182 PLSA_UNICODE_STRING UserRights,
183 ULONG CountOfRights)
184 {
185 FIXME("(%p,%p,%p,0x%08x) stub\n", PolicyHandle, AccountSid, UserRights, CountOfRights);
186 return STATUS_OBJECT_NAME_NOT_FOUND;
187 }
188
189 /*
190 * @unimplemented
191 */
192 NTSTATUS
193 WINAPI
194 LsaCreateTrustedDomainEx(
195 LSA_HANDLE PolicyHandle,
196 PTRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
197 PTRUSTED_DOMAIN_AUTH_INFORMATION AuthenticationInformation,
198 ACCESS_MASK DesiredAccess,
199 PLSA_HANDLE TrustedDomainHandle)
200 {
201 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, TrustedDomainInformation, AuthenticationInformation,
202 DesiredAccess, TrustedDomainHandle);
203 return STATUS_NOT_IMPLEMENTED;
204 }
205
206 /*
207 * @unimplemented
208 */
209 NTSTATUS
210 WINAPI
211 LsaDeleteTrustedDomain(
212 LSA_HANDLE PolicyHandle,
213 PSID TrustedDomainSid)
214 {
215 FIXME("(%p,%p) stub\n", PolicyHandle, TrustedDomainSid);
216 return STATUS_SUCCESS;
217 }
218
219 /*
220 * @implemented
221 */
222 NTSTATUS
223 WINAPI
224 LsaEnumerateAccountRights(
225 LSA_HANDLE PolicyHandle,
226 PSID AccountSid,
227 PLSA_UNICODE_STRING *UserRights,
228 PULONG CountOfRights)
229 {
230 LSAPR_USER_RIGHT_SET UserRightsSet;
231 NTSTATUS Status;
232
233 TRACE("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights, CountOfRights);
234
235 UserRightsSet.Entries = 0;
236 UserRightsSet.UserRights = NULL;
237
238 RpcTryExcept
239 {
240 Status = LsarEnmuerateAccountRights((LSAPR_HANDLE)PolicyHandle,
241 AccountSid,
242 &UserRightsSet);
243
244 *CountOfRights = UserRightsSet.Entries;
245 *UserRights = (PUNICODE_STRING)UserRightsSet.UserRights;
246 }
247 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
248 {
249 Status = I_RpcMapWin32Status(RpcExceptionCode());
250
251 if (UserRightsSet.UserRights != NULL)
252 {
253 MIDL_user_free(UserRightsSet.UserRights);
254 }
255 }
256 RpcEndExcept;
257
258 return Status;
259 }
260
261 /*
262 * @unimplemented
263 */
264 NTSTATUS
265 WINAPI
266 LsaEnumerateAccountsWithUserRight(
267 LSA_HANDLE PolicyHandle,
268 OPTIONAL PLSA_UNICODE_STRING UserRights,
269 PVOID *EnumerationBuffer,
270 PULONG CountReturned)
271 {
272 FIXME("(%p,%p,%p,%p) stub\n", PolicyHandle, UserRights, EnumerationBuffer, CountReturned);
273 return STATUS_NO_MORE_ENTRIES;
274 }
275
276 /*
277 * @unimplemented
278 */
279 NTSTATUS
280 WINAPI
281 LsaEnumerateTrustedDomains(
282 LSA_HANDLE PolicyHandle,
283 PLSA_ENUMERATION_HANDLE EnumerationContext,
284 PVOID *Buffer,
285 ULONG PreferedMaximumLength,
286 PULONG CountReturned)
287 {
288 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext,
289 Buffer, PreferedMaximumLength, CountReturned);
290
291 if (CountReturned) *CountReturned = 0;
292 return STATUS_SUCCESS;
293 }
294
295 /*
296 * @unimplemented
297 */
298 NTSTATUS
299 WINAPI
300 LsaEnumerateTrustedDomainsEx(
301 LSA_HANDLE PolicyHandle,
302 PLSA_ENUMERATION_HANDLE EnumerationContext,
303 PVOID *Buffer,
304 ULONG PreferedMaximumLength,
305 PULONG CountReturned)
306 {
307 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext, Buffer,
308 PreferedMaximumLength, CountReturned);
309 if (CountReturned) *CountReturned = 0;
310 return STATUS_SUCCESS;
311 }
312
313 /*
314 * @implemented
315 */
316 NTSTATUS
317 WINAPI
318 LsaFreeMemory(PVOID Buffer)
319 {
320 TRACE("(%p)\n", Buffer);
321 return RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
322 }
323
324 /*
325 * @implemented
326 */
327 NTSTATUS
328 WINAPI
329 LsaLookupNames(
330 LSA_HANDLE PolicyHandle,
331 ULONG Count,
332 PLSA_UNICODE_STRING Names,
333 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
334 PLSA_TRANSLATED_SID *Sids)
335 {
336 PLSA_TRANSLATED_SID2 Sids2;
337 LSA_TRANSLATED_SID *TranslatedSids;
338 ULONG i;
339 NTSTATUS Status;
340
341 TRACE("(%p,0x%08x,%p,%p,%p)\n", PolicyHandle, Count, Names,
342 ReferencedDomains, Sids);
343
344 /* Call LsaLookupNames2, which supersedes this function */
345 Status = LsaLookupNames2(PolicyHandle, Count, 0, Names, ReferencedDomains, &Sids2);
346 if (!NT_SUCCESS(Status))
347 return Status;
348
349 /* Translate the returned structure */
350 TranslatedSids = RtlAllocateHeap(RtlGetProcessHeap(), 0, Count * sizeof(LSA_TRANSLATED_SID));
351 if (!TranslatedSids)
352 {
353 LsaFreeMemory(Sids2);
354 return SCESTATUS_NOT_ENOUGH_RESOURCE;
355 }
356 RtlZeroMemory(Sids, Count * sizeof(PLSA_TRANSLATED_SID));
357 for (i = 0; i < Count; i++)
358 {
359 TranslatedSids[i].Use = Sids2[i].Use;
360 if (Sids2[i].Use != SidTypeInvalid && Sids2[i].Use != SidTypeUnknown)
361 {
362 TranslatedSids[i].DomainIndex = Sids2[i].DomainIndex;
363 if (Sids2[i].Use != SidTypeDomain)
364 TranslatedSids[i].RelativeId = *GetSidSubAuthority(Sids2[i].Sid, 0);
365 }
366 }
367 LsaFreeMemory(Sids2);
368
369 *Sids = TranslatedSids;
370
371 return Status;
372 }
373
374 /*
375 * @unimplemented
376 */
377 NTSTATUS
378 WINAPI
379 LsaLookupNames2(
380 LSA_HANDLE PolicyHandle,
381 ULONG Flags,
382 ULONG Count,
383 PLSA_UNICODE_STRING Names,
384 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
385 PLSA_TRANSLATED_SID2 *Sids)
386 {
387 FIXME("(%p,0x%08x,0x%08x,%p,%p,%p) stub\n", PolicyHandle, Flags,
388 Count, Names, ReferencedDomains, Sids);
389 if (Names != NULL && Count > 0)
390 {
391 *ReferencedDomains = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_REFERENCED_DOMAIN_LIST));
392 *Sids = RtlAllocateHeap(RtlGetProcessHeap(), 0, Count * sizeof(LSA_TRANSLATED_SID2));
393 return STATUS_SOME_NOT_MAPPED;
394 }
395 return STATUS_NONE_MAPPED;
396 }
397
398 /*
399 * @unimplemented
400 */
401 NTSTATUS
402 WINAPI
403 LsaLookupSids(
404 LSA_HANDLE PolicyHandle,
405 ULONG Count,
406 PSID *Sids,
407 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
408 PLSA_TRANSLATED_NAME *Names)
409 {
410 static const UNICODE_STRING UserName = RTL_CONSTANT_STRING(L"Administrator");
411 PLSA_REFERENCED_DOMAIN_LIST LocalDomains;
412 PLSA_TRANSLATED_NAME LocalNames;
413
414 TRACE("(%p,%u,%p,%p,%p) stub\n", PolicyHandle, Count, Sids,
415 ReferencedDomains, Names);
416
417 WARN("LsaLookupSids(): stub. Always returning 'Administrator'\n");
418 if (Count != 1)
419 return STATUS_NONE_MAPPED;
420 LocalDomains = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_TRANSLATED_SID));
421 if (!LocalDomains)
422 return SCESTATUS_NOT_ENOUGH_RESOURCE;
423 LocalNames = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_TRANSLATED_NAME) + UserName.MaximumLength);
424 if (!LocalNames)
425 {
426 LsaFreeMemory(LocalDomains);
427 return SCESTATUS_NOT_ENOUGH_RESOURCE;
428 }
429 LocalDomains[0].Entries = 0;
430 LocalDomains[0].Domains = NULL;
431 LocalNames[0].Use = SidTypeWellKnownGroup;
432 LocalNames[0].Name.Buffer = (LPWSTR)((ULONG_PTR)(LocalNames) + sizeof(LSA_TRANSLATED_NAME));
433 LocalNames[0].Name.Length = UserName.Length;
434 LocalNames[0].Name.MaximumLength = UserName.MaximumLength;
435 RtlCopyMemory(LocalNames[0].Name.Buffer, UserName.Buffer, UserName.MaximumLength);
436
437 *ReferencedDomains = LocalDomains;
438 *Names = LocalNames;
439 return STATUS_SUCCESS;
440 }
441
442 /******************************************************************************
443 * LsaNtStatusToWinError
444 *
445 * PARAMS
446 * Status [I]
447 *
448 * @implemented
449 */
450 ULONG WINAPI
451 LsaNtStatusToWinError(NTSTATUS Status)
452 {
453 TRACE("(%lx)\n", Status);
454 return RtlNtStatusToDosError(Status);
455 }
456
457 /******************************************************************************
458 * LsaOpenPolicy
459 *
460 * PARAMS
461 * x1 []
462 * x2 []
463 * x3 []
464 * x4 []
465 *
466 * @unimplemented
467 */
468 NTSTATUS
469 WINAPI
470 LsaOpenPolicy(
471 IN PLSA_UNICODE_STRING SystemName,
472 IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
473 IN ACCESS_MASK DesiredAccess,
474 IN OUT PLSA_HANDLE PolicyHandle)
475 {
476 NTSTATUS Status;
477
478 TRACE("LsaOpenPolicy (%s,%p,0x%08x,%p)\n",
479 SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
480 ObjectAttributes, DesiredAccess, PolicyHandle);
481
482 RpcTryExcept
483 {
484 *PolicyHandle = NULL;
485
486 Status = LsarOpenPolicy(SystemName ? SystemName->Buffer : NULL,
487 (PLSAPR_OBJECT_ATTRIBUTES)ObjectAttributes,
488 DesiredAccess,
489 PolicyHandle);
490 }
491 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
492 {
493 Status = I_RpcMapWin32Status(RpcExceptionCode());
494 }
495 RpcEndExcept;
496
497 TRACE("LsaOpenPolicy() done (Status: 0x%08lx)\n", Status);
498
499 return Status;
500 }
501
502
503 /*
504 * @unimplemented
505 */
506 NTSTATUS
507 WINAPI
508 LsaOpenTrustedDomainByName(
509 LSA_HANDLE PolicyHandle,
510 PLSA_UNICODE_STRING TrustedDomainName,
511 ACCESS_MASK DesiredAccess,
512 PLSA_HANDLE TrustedDomainHandle)
513 {
514 FIXME("(%p,%p,0x%08x,%p) stub\n", PolicyHandle, TrustedDomainName, DesiredAccess, TrustedDomainHandle);
515 return STATUS_OBJECT_NAME_NOT_FOUND;
516 }
517
518 /*
519 * @unimplemented
520 */
521 NTSTATUS
522 WINAPI
523 LsaQueryDomainInformationPolicy(
524 LSA_HANDLE PolicyHandle,
525 POLICY_DOMAIN_INFORMATION_CLASS InformationClass,
526 PVOID *Buffer)
527 {
528 FIXME("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);
529 return STATUS_NOT_IMPLEMENTED;
530 }
531
532 /*
533 * @unimplemented
534 */
535 NTSTATUS
536 WINAPI
537 LsaQueryForestTrustInformation(
538 LSA_HANDLE PolicyHandle,
539 PLSA_UNICODE_STRING TrustedDomainName,
540 PLSA_FOREST_TRUST_INFORMATION * ForestTrustInfo)
541 {
542 FIXME("(%p,%p,%p) stub\n", PolicyHandle, TrustedDomainName, ForestTrustInfo);
543 return STATUS_NOT_IMPLEMENTED;
544 }
545
546 /*
547 * @unimplemented
548 */
549 NTSTATUS WINAPI
550 LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
551 POLICY_INFORMATION_CLASS InformationClass,
552 PVOID *Buffer)
553 {
554 TRACE("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);
555
556 if(!Buffer) return STATUS_INVALID_PARAMETER;
557 switch (InformationClass)
558 {
559 case PolicyAuditEventsInformation: /* 2 */
560 {
561 PPOLICY_AUDIT_EVENTS_INFO p = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
562 sizeof(POLICY_AUDIT_EVENTS_INFO));
563 p->AuditingMode = FALSE; /* no auditing */
564 *Buffer = p;
565 }
566 break;
567 case PolicyPrimaryDomainInformation: /* 3 */
568 {
569 /* Only the domain name is valid for the local computer.
570 * All other fields are zero.
571 */
572 PPOLICY_PRIMARY_DOMAIN_INFO pinfo;
573
574 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name));
575
576 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
577
578 *Buffer = pinfo;
579 }
580 case PolicyAccountDomainInformation: /* 5 */
581 {
582 struct di
583 {
584 POLICY_ACCOUNT_DOMAIN_INFO info;
585 SID sid;
586 DWORD padding[3];
587 WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1];
588 };
589 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
590
591 DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
592 struct di * xdi = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
593
594 xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR);
595 xdi->info.DomainName.Buffer = xdi->domain;
596 if (GetComputerNameW(xdi->info.DomainName.Buffer, &dwSize))
597 xdi->info.DomainName.Length = dwSize * sizeof(WCHAR);
598
599 TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer));
600
601 xdi->info.DomainSid = &xdi->sid;
602 xdi->sid.Revision = SID_REVISION;
603 xdi->sid.SubAuthorityCount = 1;
604 xdi->sid.IdentifierAuthority = localSidAuthority;
605 xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
606
607 *Buffer = xdi;
608 }
609 break;
610 case PolicyDnsDomainInformation: /* 12 (0xc) */
611 {
612 /* Only the domain name is valid for the local computer.
613 * All other fields are zero.
614 */
615 PPOLICY_DNS_DOMAIN_INFO pinfo;
616
617 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name));
618
619 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
620
621 *Buffer = pinfo;
622 }
623 break;
624 case PolicyAuditLogInformation:
625 case PolicyPdAccountInformation:
626 case PolicyLsaServerRoleInformation:
627 case PolicyReplicaSourceInformation:
628 case PolicyDefaultQuotaInformation:
629 case PolicyModificationInformation:
630 case PolicyAuditFullSetInformation:
631 case PolicyAuditFullQueryInformation:
632 case PolicyEfsInformation:
633 {
634 FIXME("category not implemented\n");
635 return STATUS_UNSUCCESSFUL;
636 }
637 }
638 return STATUS_SUCCESS;
639 }
640
641 /*
642 * @unimplemented
643 */
644 NTSTATUS
645 WINAPI
646 LsaQueryTrustedDomainInfoByName(
647 LSA_HANDLE PolicyHandle,
648 PLSA_UNICODE_STRING TrustedDomainName,
649 TRUSTED_INFORMATION_CLASS InformationClass,
650 PVOID *Buffer)
651 {
652 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, InformationClass, Buffer);
653 return STATUS_OBJECT_NAME_NOT_FOUND;
654 }
655
656 /*
657 * @unimplemented
658 */
659 NTSTATUS
660 WINAPI
661 LsaQueryTrustedDomainInfo(
662 LSA_HANDLE PolicyHandle,
663 PSID TrustedDomainSid,
664 TRUSTED_INFORMATION_CLASS InformationClass,
665 PVOID *Buffer)
666 {
667 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
668 return STATUS_OBJECT_NAME_NOT_FOUND;
669 }
670
671 /*
672 * @unimplemented
673 */
674 NTSTATUS
675 WINAPI
676 LsaRemoveAccountRights(
677 LSA_HANDLE PolicyHandle,
678 PSID AccountSid,
679 BOOLEAN AllRights,
680 PLSA_UNICODE_STRING UserRights,
681 ULONG CountOfRights)
682 {
683 FIXME("(%p,%p,%d,%p,0x%08x) stub\n", PolicyHandle, AccountSid, AllRights, UserRights, CountOfRights);
684 return STATUS_SUCCESS;
685 }
686
687 /*
688 * @unimplemented
689 */
690 NTSTATUS
691 WINAPI
692 LsaRetrievePrivateData(
693 LSA_HANDLE PolicyHandle,
694 PLSA_UNICODE_STRING KeyName,
695 PLSA_UNICODE_STRING *PrivateData)
696 {
697 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
698 return STATUS_NOT_IMPLEMENTED;
699 }
700
701 /*
702 * @unimplemented
703 */
704 NTSTATUS
705 WINAPI
706 LsaSetDomainInformationPolicy(
707 LSA_HANDLE PolicyHandle,
708 POLICY_DOMAIN_INFORMATION_CLASS InformationClass,
709 PVOID Buffer)
710 {
711 FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
712 return STATUS_NOT_IMPLEMENTED;
713 }
714
715 /*
716 * @unimplemented
717 */
718 NTSTATUS
719 WINAPI
720 LsaSetInformationPolicy(
721 LSA_HANDLE PolicyHandle,
722 POLICY_INFORMATION_CLASS InformationClass,
723 PVOID Buffer)
724 {
725 FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
726 return STATUS_UNSUCCESSFUL;
727 }
728
729 /*
730 * @unimplemented
731 */
732 NTSTATUS
733 WINAPI
734 LsaSetForestTrustInformation(
735 LSA_HANDLE PolicyHandle,
736 PLSA_UNICODE_STRING TrustedDomainName,
737 PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo,
738 BOOL CheckOnly,
739 PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo)
740 {
741 FIXME("(%p,%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, ForestTrustInfo, CheckOnly, CollisionInfo);
742 return STATUS_NOT_IMPLEMENTED;
743 }
744
745 /*
746 * @unimplemented
747 */
748 NTSTATUS
749 WINAPI
750 LsaSetTrustedDomainInfoByName(
751 LSA_HANDLE PolicyHandle,
752 PLSA_UNICODE_STRING TrustedDomainName,
753 TRUSTED_INFORMATION_CLASS InformationClass,
754 PVOID Buffer)
755 {
756 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, InformationClass, Buffer);
757 return STATUS_SUCCESS;
758 }
759
760 /*
761 * @unimplemented
762 */
763 NTSTATUS
764 WINAPI
765 LsaSetTrustedDomainInformation(
766 LSA_HANDLE PolicyHandle,
767 PSID TrustedDomainSid,
768 TRUSTED_INFORMATION_CLASS InformationClass,
769 PVOID Buffer)
770 {
771 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
772 return STATUS_SUCCESS;
773 }
774
775 /*
776 * @unimplemented
777 */
778 NTSTATUS
779 WINAPI
780 LsaStorePrivateData(
781 LSA_HANDLE PolicyHandle,
782 PLSA_UNICODE_STRING KeyName,
783 PLSA_UNICODE_STRING PrivateData)
784 {
785 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
786 return STATUS_OBJECT_NAME_NOT_FOUND;
787 }
788
789 /*
790 * @unimplemented
791 */
792 NTSTATUS
793 WINAPI
794 LsaGetUserName(
795 PUNICODE_STRING *UserName,
796 PUNICODE_STRING *DomainName)
797 {
798 FIXME("(%p,%p) stub\n", UserName, DomainName);
799 return STATUS_NOT_IMPLEMENTED;
800 }
801
802 /*
803 * @unimplemented
804 */
805 NTSTATUS
806 WINAPI
807 LsaQueryInfoTrustedDomain (DWORD Unknonw0,
808 DWORD Unknonw1,
809 DWORD Unknonw2)
810 {
811 FIXME("(%d,%d,%d) stub\n", Unknonw0, Unknonw1, Unknonw2);
812 return STATUS_NOT_IMPLEMENTED;
813 }
814
815
816 /* EOF */