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