f792f8c7d292f3401e461144f825ed845f919d4a
[reactos.git] / reactos / 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 * @unimplemented
221 */
222 NTSTATUS
223 WINAPI
224 LsaEnumerateAccountRights(
225 LSA_HANDLE PolicyHandle,
226 PSID AccountSid,
227 PLSA_UNICODE_STRING *UserRights,
228 PULONG CountOfRights)
229 {
230 FIXME("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights, CountOfRights);
231 *UserRights = 0;
232 *CountOfRights = 0;
233 return STATUS_OBJECT_NAME_NOT_FOUND;
234 }
235
236 /*
237 * @unimplemented
238 */
239 NTSTATUS
240 WINAPI
241 LsaEnumerateAccountsWithUserRight(
242 LSA_HANDLE PolicyHandle,
243 OPTIONAL PLSA_UNICODE_STRING UserRights,
244 PVOID *EnumerationBuffer,
245 PULONG CountReturned)
246 {
247 FIXME("(%p,%p,%p,%p) stub\n", PolicyHandle, UserRights, EnumerationBuffer, CountReturned);
248 return STATUS_NO_MORE_ENTRIES;
249 }
250
251 /*
252 * @unimplemented
253 */
254 NTSTATUS
255 WINAPI
256 LsaEnumerateTrustedDomains(
257 LSA_HANDLE PolicyHandle,
258 PLSA_ENUMERATION_HANDLE EnumerationContext,
259 PVOID *Buffer,
260 ULONG PreferedMaximumLength,
261 PULONG CountReturned)
262 {
263 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext,
264 Buffer, PreferedMaximumLength, CountReturned);
265
266 if (CountReturned) *CountReturned = 0;
267 return STATUS_SUCCESS;
268 }
269
270 /*
271 * @unimplemented
272 */
273 NTSTATUS
274 WINAPI
275 LsaEnumerateTrustedDomainsEx(
276 LSA_HANDLE PolicyHandle,
277 PLSA_ENUMERATION_HANDLE EnumerationContext,
278 PVOID *Buffer,
279 ULONG PreferedMaximumLength,
280 PULONG CountReturned)
281 {
282 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext, Buffer,
283 PreferedMaximumLength, CountReturned);
284 if (CountReturned) *CountReturned = 0;
285 return STATUS_SUCCESS;
286 }
287
288 /*
289 * @implemented
290 */
291 NTSTATUS WINAPI
292 LsaFreeMemory(PVOID Buffer)
293 {
294 TRACE("(%p)\n", Buffer);
295 return RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
296 }
297
298 /*
299 * @implemented
300 */
301 NTSTATUS
302 WINAPI
303 LsaLookupNames(
304 LSA_HANDLE PolicyHandle,
305 ULONG Count,
306 PLSA_UNICODE_STRING Names,
307 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
308 PLSA_TRANSLATED_SID *Sids)
309 {
310 PLSA_TRANSLATED_SID2 Sids2;
311 LSA_TRANSLATED_SID *TranslatedSids;
312 ULONG i;
313 NTSTATUS Status;
314
315 TRACE("(%p,0x%08x,%p,%p,%p)\n", PolicyHandle, Count, Names,
316 ReferencedDomains, Sids);
317
318 /* Call LsaLookupNames2, which supersedes this function */
319 Status = LsaLookupNames2(PolicyHandle, Count, 0, Names, ReferencedDomains, &Sids2);
320 if (!NT_SUCCESS(Status))
321 return Status;
322
323 /* Translate the returned structure */
324 TranslatedSids = RtlAllocateHeap(RtlGetProcessHeap(), 0, Count * sizeof(LSA_TRANSLATED_SID));
325 if (!TranslatedSids)
326 {
327 LsaFreeMemory(Sids2);
328 return SCESTATUS_NOT_ENOUGH_RESOURCE;
329 }
330 RtlZeroMemory(Sids, Count * sizeof(PLSA_TRANSLATED_SID));
331 for (i = 0; i < Count; i++)
332 {
333 TranslatedSids[i].Use = Sids2[i].Use;
334 if (Sids2[i].Use != SidTypeInvalid && Sids2[i].Use != SidTypeUnknown)
335 {
336 TranslatedSids[i].DomainIndex = Sids2[i].DomainIndex;
337 if (Sids2[i].Use != SidTypeDomain)
338 TranslatedSids[i].RelativeId = *GetSidSubAuthority(Sids2[i].Sid, 0);
339 }
340 }
341 LsaFreeMemory(Sids2);
342
343 *Sids = TranslatedSids;
344
345 return Status;
346 }
347
348 /*
349 * @unimplemented
350 */
351 NTSTATUS
352 WINAPI
353 LsaLookupNames2(
354 LSA_HANDLE PolicyHandle,
355 ULONG Flags,
356 ULONG Count,
357 PLSA_UNICODE_STRING Names,
358 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
359 PLSA_TRANSLATED_SID2 *Sids)
360 {
361 FIXME("(%p,0x%08x,0x%08x,%p,%p,%p) stub\n", PolicyHandle, Flags,
362 Count, Names, ReferencedDomains, Sids);
363 if (Names != NULL && Count > 0)
364 {
365 *ReferencedDomains = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_REFERENCED_DOMAIN_LIST));
366 *Sids = RtlAllocateHeap(RtlGetProcessHeap(), 0, Count * sizeof(LSA_TRANSLATED_SID2));
367 return STATUS_SOME_NOT_MAPPED;
368 }
369 return STATUS_NONE_MAPPED;
370 }
371
372 /*
373 * @unimplemented
374 */
375 NTSTATUS
376 WINAPI
377 LsaLookupSids(
378 LSA_HANDLE PolicyHandle,
379 ULONG Count,
380 PSID *Sids,
381 PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
382 PLSA_TRANSLATED_NAME *Names)
383 {
384 static const UNICODE_STRING UserName = RTL_CONSTANT_STRING(L"Administrator");
385 PLSA_REFERENCED_DOMAIN_LIST LocalDomains;
386 PLSA_TRANSLATED_NAME LocalNames;
387
388 TRACE("(%p,%u,%p,%p,%p) stub\n", PolicyHandle, Count, Sids,
389 ReferencedDomains, Names);
390
391 WARN("LsaLookupSids(): stub. Always returning 'Administrator'\n");
392 if (Count != 1)
393 return STATUS_NONE_MAPPED;
394 LocalDomains = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_TRANSLATED_SID));
395 if (!LocalDomains)
396 return SCESTATUS_NOT_ENOUGH_RESOURCE;
397 LocalNames = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(LSA_TRANSLATED_NAME) + UserName.MaximumLength);
398 if (!LocalNames)
399 {
400 LsaFreeMemory(LocalDomains);
401 return SCESTATUS_NOT_ENOUGH_RESOURCE;
402 }
403 LocalDomains[0].Entries = 0;
404 LocalDomains[0].Domains = NULL;
405 LocalNames[0].Use = SidTypeWellKnownGroup;
406 LocalNames[0].Name.Buffer = (LPWSTR)((ULONG_PTR)(LocalNames) + sizeof(LSA_TRANSLATED_NAME));
407 LocalNames[0].Name.Length = UserName.Length;
408 LocalNames[0].Name.MaximumLength = UserName.MaximumLength;
409 RtlCopyMemory(LocalNames[0].Name.Buffer, UserName.Buffer, UserName.MaximumLength);
410
411 *ReferencedDomains = LocalDomains;
412 *Names = LocalNames;
413 return STATUS_SUCCESS;
414 }
415
416 /******************************************************************************
417 * LsaNtStatusToWinError
418 *
419 * PARAMS
420 * Status [I]
421 *
422 * @implemented
423 */
424 ULONG WINAPI
425 LsaNtStatusToWinError(NTSTATUS Status)
426 {
427 TRACE("(%lx)\n", Status);
428 return RtlNtStatusToDosError(Status);
429 }
430
431 /******************************************************************************
432 * LsaOpenPolicy
433 *
434 * PARAMS
435 * x1 []
436 * x2 []
437 * x3 []
438 * x4 []
439 *
440 * @unimplemented
441 */
442 NTSTATUS
443 WINAPI
444 LsaOpenPolicy(
445 IN PLSA_UNICODE_STRING SystemName,
446 IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
447 IN ACCESS_MASK DesiredAccess,
448 IN OUT PLSA_HANDLE PolicyHandle)
449 {
450 NTSTATUS Status;
451
452 TRACE("LsaOpenPolicy (%s,%p,0x%08x,%p)\n",
453 SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
454 ObjectAttributes, DesiredAccess, PolicyHandle);
455
456 RpcTryExcept
457 {
458 *PolicyHandle = NULL;
459
460 Status = LsarOpenPolicy(SystemName ? SystemName->Buffer : NULL,
461 (PLSAPR_OBJECT_ATTRIBUTES)ObjectAttributes,
462 DesiredAccess,
463 PolicyHandle);
464 }
465 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
466 {
467 Status = I_RpcMapWin32Status(RpcExceptionCode());
468 }
469 RpcEndExcept;
470
471 TRACE("LsaOpenPolicy() done (Status: 0x%08lx)\n", Status);
472
473 return Status;
474 }
475
476
477 /*
478 * @unimplemented
479 */
480 NTSTATUS
481 WINAPI
482 LsaOpenTrustedDomainByName(
483 LSA_HANDLE PolicyHandle,
484 PLSA_UNICODE_STRING TrustedDomainName,
485 ACCESS_MASK DesiredAccess,
486 PLSA_HANDLE TrustedDomainHandle)
487 {
488 FIXME("(%p,%p,0x%08x,%p) stub\n", PolicyHandle, TrustedDomainName, DesiredAccess, TrustedDomainHandle);
489 return STATUS_OBJECT_NAME_NOT_FOUND;
490 }
491
492 /*
493 * @unimplemented
494 */
495 NTSTATUS
496 WINAPI
497 LsaQueryDomainInformationPolicy(
498 LSA_HANDLE PolicyHandle,
499 POLICY_DOMAIN_INFORMATION_CLASS InformationClass,
500 PVOID *Buffer)
501 {
502 FIXME("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);
503 return STATUS_NOT_IMPLEMENTED;
504 }
505
506 /*
507 * @unimplemented
508 */
509 NTSTATUS
510 WINAPI
511 LsaQueryForestTrustInformation(
512 LSA_HANDLE PolicyHandle,
513 PLSA_UNICODE_STRING TrustedDomainName,
514 PLSA_FOREST_TRUST_INFORMATION * ForestTrustInfo)
515 {
516 FIXME("(%p,%p,%p) stub\n", PolicyHandle, TrustedDomainName, ForestTrustInfo);
517 return STATUS_NOT_IMPLEMENTED;
518 }
519
520 /*
521 * @unimplemented
522 */
523 NTSTATUS WINAPI
524 LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
525 POLICY_INFORMATION_CLASS InformationClass,
526 PVOID *Buffer)
527 {
528 TRACE("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);
529
530 if(!Buffer) return STATUS_INVALID_PARAMETER;
531 switch (InformationClass)
532 {
533 case PolicyAuditEventsInformation: /* 2 */
534 {
535 PPOLICY_AUDIT_EVENTS_INFO p = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
536 sizeof(POLICY_AUDIT_EVENTS_INFO));
537 p->AuditingMode = FALSE; /* no auditing */
538 *Buffer = p;
539 }
540 break;
541 case PolicyPrimaryDomainInformation: /* 3 */
542 {
543 /* Only the domain name is valid for the local computer.
544 * All other fields are zero.
545 */
546 PPOLICY_PRIMARY_DOMAIN_INFO pinfo;
547
548 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name));
549
550 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
551
552 *Buffer = pinfo;
553 }
554 case PolicyAccountDomainInformation: /* 5 */
555 {
556 struct di
557 {
558 POLICY_ACCOUNT_DOMAIN_INFO info;
559 SID sid;
560 DWORD padding[3];
561 WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1];
562 };
563 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
564
565 DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
566 struct di * xdi = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
567
568 xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR);
569 xdi->info.DomainName.Buffer = xdi->domain;
570 if (GetComputerNameW(xdi->info.DomainName.Buffer, &dwSize))
571 xdi->info.DomainName.Length = dwSize * sizeof(WCHAR);
572
573 TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer));
574
575 xdi->info.DomainSid = &xdi->sid;
576 xdi->sid.Revision = SID_REVISION;
577 xdi->sid.SubAuthorityCount = 1;
578 xdi->sid.IdentifierAuthority = localSidAuthority;
579 xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
580
581 *Buffer = xdi;
582 }
583 break;
584 case PolicyDnsDomainInformation: /* 12 (0xc) */
585 {
586 /* Only the domain name is valid for the local computer.
587 * All other fields are zero.
588 */
589 PPOLICY_DNS_DOMAIN_INFO pinfo;
590
591 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name));
592
593 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
594
595 *Buffer = pinfo;
596 }
597 break;
598 case PolicyAuditLogInformation:
599 case PolicyPdAccountInformation:
600 case PolicyLsaServerRoleInformation:
601 case PolicyReplicaSourceInformation:
602 case PolicyDefaultQuotaInformation:
603 case PolicyModificationInformation:
604 case PolicyAuditFullSetInformation:
605 case PolicyAuditFullQueryInformation:
606 case PolicyEfsInformation:
607 {
608 FIXME("category not implemented\n");
609 return STATUS_UNSUCCESSFUL;
610 }
611 }
612 return STATUS_SUCCESS;
613 }
614
615 /*
616 * @unimplemented
617 */
618 NTSTATUS
619 WINAPI
620 LsaQueryTrustedDomainInfoByName(
621 LSA_HANDLE PolicyHandle,
622 PLSA_UNICODE_STRING TrustedDomainName,
623 TRUSTED_INFORMATION_CLASS InformationClass,
624 PVOID *Buffer)
625 {
626 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, InformationClass, Buffer);
627 return STATUS_OBJECT_NAME_NOT_FOUND;
628 }
629
630 /*
631 * @unimplemented
632 */
633 NTSTATUS
634 WINAPI
635 LsaQueryTrustedDomainInfo(
636 LSA_HANDLE PolicyHandle,
637 PSID TrustedDomainSid,
638 TRUSTED_INFORMATION_CLASS InformationClass,
639 PVOID *Buffer)
640 {
641 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
642 return STATUS_OBJECT_NAME_NOT_FOUND;
643 }
644
645 /*
646 * @unimplemented
647 */
648 NTSTATUS
649 WINAPI
650 LsaRemoveAccountRights(
651 LSA_HANDLE PolicyHandle,
652 PSID AccountSid,
653 BOOLEAN AllRights,
654 PLSA_UNICODE_STRING UserRights,
655 ULONG CountOfRights)
656 {
657 FIXME("(%p,%p,%d,%p,0x%08x) stub\n", PolicyHandle, AccountSid, AllRights, UserRights, CountOfRights);
658 return STATUS_SUCCESS;
659 }
660
661 /*
662 * @unimplemented
663 */
664 NTSTATUS
665 WINAPI
666 LsaRetrievePrivateData(
667 LSA_HANDLE PolicyHandle,
668 PLSA_UNICODE_STRING KeyName,
669 PLSA_UNICODE_STRING *PrivateData)
670 {
671 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
672 return STATUS_NOT_IMPLEMENTED;
673 }
674
675 /*
676 * @unimplemented
677 */
678 NTSTATUS
679 WINAPI
680 LsaSetDomainInformationPolicy(
681 LSA_HANDLE PolicyHandle,
682 POLICY_DOMAIN_INFORMATION_CLASS InformationClass,
683 PVOID Buffer)
684 {
685 FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
686 return STATUS_NOT_IMPLEMENTED;
687 }
688
689 /*
690 * @unimplemented
691 */
692 NTSTATUS
693 WINAPI
694 LsaSetInformationPolicy(
695 LSA_HANDLE PolicyHandle,
696 POLICY_INFORMATION_CLASS InformationClass,
697 PVOID Buffer)
698 {
699 FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
700 return STATUS_UNSUCCESSFUL;
701 }
702
703 /*
704 * @unimplemented
705 */
706 NTSTATUS
707 WINAPI
708 LsaSetForestTrustInformation(
709 LSA_HANDLE PolicyHandle,
710 PLSA_UNICODE_STRING TrustedDomainName,
711 PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo,
712 BOOL CheckOnly,
713 PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo)
714 {
715 FIXME("(%p,%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, ForestTrustInfo, CheckOnly, CollisionInfo);
716 return STATUS_NOT_IMPLEMENTED;
717 }
718
719 /*
720 * @unimplemented
721 */
722 NTSTATUS
723 WINAPI
724 LsaSetTrustedDomainInfoByName(
725 LSA_HANDLE PolicyHandle,
726 PLSA_UNICODE_STRING TrustedDomainName,
727 TRUSTED_INFORMATION_CLASS InformationClass,
728 PVOID Buffer)
729 {
730 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainName, InformationClass, Buffer);
731 return STATUS_SUCCESS;
732 }
733
734 /*
735 * @unimplemented
736 */
737 NTSTATUS
738 WINAPI
739 LsaSetTrustedDomainInformation(
740 LSA_HANDLE PolicyHandle,
741 PSID TrustedDomainSid,
742 TRUSTED_INFORMATION_CLASS InformationClass,
743 PVOID Buffer)
744 {
745 FIXME("(%p,%p,%d,%p) stub\n", PolicyHandle, TrustedDomainSid, InformationClass, Buffer);
746 return STATUS_SUCCESS;
747 }
748
749 /*
750 * @unimplemented
751 */
752 NTSTATUS
753 WINAPI
754 LsaStorePrivateData(
755 LSA_HANDLE PolicyHandle,
756 PLSA_UNICODE_STRING KeyName,
757 PLSA_UNICODE_STRING PrivateData)
758 {
759 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
760 return STATUS_OBJECT_NAME_NOT_FOUND;
761 }
762
763 /*
764 * @unimplemented
765 */
766 NTSTATUS
767 WINAPI
768 LsaGetUserName(
769 PUNICODE_STRING *UserName,
770 PUNICODE_STRING *DomainName)
771 {
772 FIXME("(%p,%p) stub\n", UserName, DomainName);
773 return STATUS_NOT_IMPLEMENTED;
774 }
775
776 /*
777 * @unimplemented
778 */
779 NTSTATUS
780 WINAPI
781 LsaQueryInfoTrustedDomain (DWORD Unknonw0,
782 DWORD Unknonw1,
783 DWORD Unknonw2)
784 {
785 FIXME("(%d,%d,%d) stub\n", Unknonw0, Unknonw1, Unknonw2);
786 return STATUS_NOT_IMPLEMENTED;
787 }
788
789
790 /* EOF */