1 /*
2 * Implementation of the Local Security Authority API
3 *
4 * Copyright 1999 Juergen Schmied
5 * Copyright 2002 Andriy Palamarchuk
6 * Copyright 2004 Mike McCormack
7 * Copyright 2005 Hans Leidekker
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24 #include <stdarg.h>
25
26 #include "ntstatus.h"
27 #define WIN32_NO_STATUS
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winreg.h"
31 #include "winternl.h"
32 #include "ntsecapi.h"
33 #include "advapi32_misc.h"
34
35 #include "wine/debug.h"
36
37 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
38
39 #define ADVAPI_ForceLocalComputer(ServerName, FailureCode) \
40 if (!ADVAPI_IsLocalComputer(ServerName)) \
41 { \
42 FIXME("Action Implemented for local computer only. " \
43 "Requested for server %s\n", debugstr_w(ServerName)); \
44 return FailureCode; \
45 }
46
47 static void dumpLsaAttributes(const LSA_OBJECT_ATTRIBUTES *oa)
48 {
49 if (oa)
50 {
51 TRACE("\n\tlength=%u, rootdir=%p, objectname=%s\n\tattr=0x%08x, sid=%s qos=%p\n",
52 oa->Length, oa->RootDirectory,
53 oa->ObjectName?debugstr_w(oa->ObjectName->Buffer):"null",
54 oa->Attributes, debugstr_sid(oa->SecurityDescriptor),
55 oa->SecurityQualityOfService);
56 }
57 }
58
59 static void* ADVAPI_GetDomainName(unsigned sz, unsigned ofs)
60 {
61 HKEY key;
62 LONG ret;
63 BYTE* ptr = NULL;
64 UNICODE_STRING* ustr;
65
66 static const WCHAR wVNETSUP[] = {
67 'S','y','s','t','e','m','\\',
68 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
69 'S','e','r','v','i','c','e','s','\\',
70 'V','x','D','\\','V','N','E','T','S','U','P','\0'};
71
72 ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wVNETSUP, 0, KEY_READ, &key);
73 if (ret == ERROR_SUCCESS)
74 {
75 DWORD size = 0;
76 static const WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 };
77
78 ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size);
79 if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS)
80 {
81 ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz + size);
82 if (!ptr) return NULL;
83 ustr = (UNICODE_STRING*)(ptr + ofs);
84 ustr->MaximumLength = size;
85 ustr->Buffer = (WCHAR*)(ptr + sz);
86 ret = RegQueryValueExW(key, wg, NULL, NULL, (LPBYTE)ustr->Buffer, &size);
87 if (ret != ERROR_SUCCESS)
88 {
89 HeapFree(GetProcessHeap(), 0, ptr);
90 ptr = NULL;
91 }
92 else ustr->Length = size - sizeof(WCHAR);
93 }
94 RegCloseKey(key);
95 }
96 if (!ptr)
97 {
98 static const WCHAR wDomain[] = {'D','O','M','A','I','N','\0'};
99 ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
100 sz + sizeof(wDomain));
101 if (!ptr) return NULL;
102 ustr = (UNICODE_STRING*)(ptr + ofs);
103 ustr->MaximumLength = sizeof(wDomain);
104 ustr->Buffer = (WCHAR*)(ptr + sz);
105 ustr->Length = sizeof(wDomain) - sizeof(WCHAR);
106 memcpy(ustr->Buffer, wDomain, sizeof(wDomain));
107 }
108 return ptr;
109 }
110
111 /******************************************************************************
112 * LsaAddAccountRights [ADVAPI32.@]
113 *
114 */
115 NTSTATUS WINAPI LsaAddAccountRights(
116 LSA_HANDLE policy,
117 PSID sid,
118 PLSA_UNICODE_STRING rights,
119 ULONG count)
120 {
121 FIXME("(%p,%p,%p,0x%08x) stub\n", policy, sid, rights, count);
122 return STATUS_OBJECT_NAME_NOT_FOUND;
123 }
124
125 /******************************************************************************
126 * LsaClose [ADVAPI32.@]
127 *
128 * Closes a handle to a Policy or TrustedDomain.
129 *
130 * PARAMS
131 * ObjectHandle [I] Handle to a Policy or TrustedDomain.
132 *
133 * RETURNS
134 * Success: STATUS_SUCCESS.
135 * Failure: NTSTATUS code.
136 */
137 NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
138 {
139 FIXME("(%p) stub\n", ObjectHandle);
140 return STATUS_SUCCESS;
141 }
142
143 /******************************************************************************
144 * LsaCreateTrustedDomainEx [ADVAPI32.@]
145 *
146 */
147 NTSTATUS WINAPI LsaCreateTrustedDomainEx(
148 LSA_HANDLE policy,
149 PTRUSTED_DOMAIN_INFORMATION_EX domain_info,
150 PTRUSTED_DOMAIN_AUTH_INFORMATION auth_info,
151 ACCESS_MASK access,
152 PLSA_HANDLE domain)
153 {
154 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", policy, domain_info, auth_info,
155 access, domain);
156 return STATUS_SUCCESS;
157 }
158
159 /******************************************************************************
160 * LsaDeleteTrustedDomain [ADVAPI32.@]
161 *
162 */
163 NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE policy, PSID sid)
164 {
165 FIXME("(%p,%p) stub\n", policy, sid);
166 return STATUS_SUCCESS;
167 }
168
169 /******************************************************************************
170 * LsaEnumerateAccountRights [ADVAPI32.@]
171 *
172 */
173 NTSTATUS WINAPI LsaEnumerateAccountRights(
174 LSA_HANDLE policy,
175 PSID sid,
176 PLSA_UNICODE_STRING *rights,
177 PULONG count)
178 {
179 FIXME("(%p,%p,%p,%p) stub\n", policy, sid, rights, count);
180 *rights = 0;
181 *count = 0;
182 return STATUS_OBJECT_NAME_NOT_FOUND;
183 }
184
185 /******************************************************************************
186 * LsaEnumerateAccountsWithUserRight [ADVAPI32.@]
187 *
188 */
189 NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(
190 LSA_HANDLE policy,
191 PLSA_UNICODE_STRING rights,
192 PVOID *buffer,
193 PULONG count)
194 {
195 FIXME("(%p,%p,%p,%p) stub\n", policy, rights, buffer, count);
196 return STATUS_NO_MORE_ENTRIES;
197 }
198
199 /******************************************************************************
200 * LsaEnumerateTrustedDomains [ADVAPI32.@]
201 *
202 * Returns the names and SIDs of trusted domains.
203 *
204 * PARAMS
205 * PolicyHandle [I] Handle to a Policy object.
206 * EnumerationContext [I] Pointer to an enumeration handle.
207 * Buffer [O] Contains the names and SIDs of trusted domains.
208 * PreferredMaximumLength[I] Preferred maximum size in bytes of Buffer.
209 * CountReturned [O] Number of elements in Buffer.
210 *
211 * RETURNS
212 * Success: STATUS_SUCCESS,
213 * STATUS_MORE_ENTRIES,
214 * STATUS_NO_MORE_ENTRIES
215 * Failure: NTSTATUS code.
216 *
217 * NOTES
218 * LsaEnumerateTrustedDomains can be called multiple times to enumerate
219 * all trusted domains.
220 */
221 NTSTATUS WINAPI LsaEnumerateTrustedDomains(
222 IN LSA_HANDLE PolicyHandle,
223 IN PLSA_ENUMERATION_HANDLE EnumerationContext,
224 OUT PVOID* Buffer,
225 IN ULONG PreferredMaximumLength,
226 OUT PULONG CountReturned)
227 {
228 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext,
229 Buffer, PreferredMaximumLength, CountReturned);
230
231 if (CountReturned) *CountReturned = 0;
232 return STATUS_SUCCESS;
233 }
234
235 /******************************************************************************
236 * LsaEnumerateTrustedDomainsEx [ADVAPI32.@]
237 *
238 */
239 NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(
240 LSA_HANDLE policy,
241 PLSA_ENUMERATION_HANDLE context,
242 PVOID *buffer,
243 ULONG length,
244 PULONG count)
245 {
246 FIXME("(%p,%p,%p,0x%08x,%p) stub\n", policy, context, buffer, length, count);
247
248 if (count) *count = 0;
249 return STATUS_SUCCESS;
250 }
251
252 /******************************************************************************
253 * LsaFreeMemory [ADVAPI32.@]
254 *
255 * Frees memory allocated by a LSA function.
256 *
257 * PARAMS
258 * Buffer [I] Memory buffer to free.
259 *
260 * RETURNS
261 * Success: STATUS_SUCCESS.
262 * Failure: NTSTATUS code.
263 */
264 NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
265 {
266 TRACE("(%p)\n", Buffer);
267 return HeapFree(GetProcessHeap(), 0, Buffer);
268 }
269
270 /******************************************************************************
271 * LsaLookupNames [ADVAPI32.@]
272 *
273 * Returns the SIDs of an array of user, group, or local group names.
274 *
275 * PARAMS
276 * PolicyHandle [I] Handle to a Policy object.
277 * Count [I] Number of names in Names.
278 * Names [I] Array of names to lookup.
279 * ReferencedDomains [O] Array of domains where the names were found.
280 * Sids [O] Array of SIDs corresponding to Names.
281 *
282 * RETURNS
283 * Success: STATUS_SUCCESS,
284 * STATUS_SOME_NOT_MAPPED
285 * Failure: STATUS_NONE_MAPPED or NTSTATUS code.
286 */
287 NTSTATUS WINAPI LsaLookupNames(
288 IN LSA_HANDLE PolicyHandle,
289 IN ULONG Count,
290 IN PLSA_UNICODE_STRING Names,
291 OUT PLSA_REFERENCED_DOMAIN_LIST* ReferencedDomains,
292 OUT PLSA_TRANSLATED_SID* Sids)
293 {
294 FIXME("(%p,0x%08x,%p,%p,%p) stub\n", PolicyHandle, Count, Names,
295 ReferencedDomains, Sids);
296
297 return STATUS_NONE_MAPPED;
298 }
299
300 /******************************************************************************
301 * LsaLookupNames2 [ADVAPI32.@]
302 *
303 */
304 NTSTATUS WINAPI LsaLookupNames2(
305 LSA_HANDLE policy,
306 ULONG flags,
307 ULONG count,
308 PLSA_UNICODE_STRING names,
309 PLSA_REFERENCED_DOMAIN_LIST *domains,
310 PLSA_TRANSLATED_SID2 *sids)
311 {
312 FIXME("(%p,0x%08x,0x%08x,%p,%p,%p) stub\n", policy, flags, count, names, domains, sids);
313 return STATUS_NONE_MAPPED;
314 }
315
316 /******************************************************************************
317 * LsaLookupSids [ADVAPI32.@]
318 *
319 * Looks up the names that correspond to an array of SIDs.
320 *
321 * PARAMS
322 * PolicyHandle [I] Handle to a Policy object.
323 * Count [I] Number of SIDs in the Sids array.
324 * Sids [I] Array of SIDs to lookup.
325 * ReferencedDomains [O] Array of domains where the sids were found.
326 * Names [O] Array of names corresponding to Sids.
327 *
328 * RETURNS
329 * Success: STATUS_SUCCESS,
330 * STATUS_SOME_NOT_MAPPED
331 * Failure: STATUS_NONE_MAPPED or NTSTATUS code.
332 */
333 NTSTATUS WINAPI LsaLookupSids(
334 IN LSA_HANDLE PolicyHandle,
335 IN ULONG Count,
336 IN PSID *Sids,
337 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
338 OUT PLSA_TRANSLATED_NAME *Names )
339 {
340 FIXME("(%p,%u,%p,%p,%p) stub\n", PolicyHandle, Count, Sids,
341 ReferencedDomains, Names);
342
343 return STATUS_NONE_MAPPED;
344 }
345
346 /******************************************************************************
347 * LsaNtStatusToWinError [ADVAPI32.@]
348 *
349 * Converts an LSA NTSTATUS code to a Windows error code.
350 *
351 * PARAMS
352 * Status [I] NTSTATUS code.
353 *
354 * RETURNS
355 * Success: Corresponding Windows error code.
356 * Failure: ERROR_MR_MID_NOT_FOUND.
357 */
358 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS Status)
359 {
360 return RtlNtStatusToDosError(Status);
361 }
362
363 /******************************************************************************
364 * LsaOpenPolicy [ADVAPI32.@]
365 *
366 * Opens a handle to the Policy object on a local or remote system.
367 *
368 * PARAMS
369 * SystemName [I] Name of the target system.
370 * ObjectAttributes [I] Connection attributes.
371 * DesiredAccess [I] Requested access rights.
372 * PolicyHandle [I/O] Handle to the Policy object.
373 *
374 * RETURNS
375 * Success: STATUS_SUCCESS.
376 * Failure: NTSTATUS code.
377 *
378 * NOTES
379 * Set SystemName to NULL to open the local Policy object.
380 */
381 NTSTATUS WINAPI LsaOpenPolicy(
382 IN PLSA_UNICODE_STRING SystemName,
383 IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
384 IN ACCESS_MASK DesiredAccess,
385 IN OUT PLSA_HANDLE PolicyHandle)
386 {
387 FIXME("(%s,%p,0x%08x,%p) stub\n",
388 SystemName?debugstr_w(SystemName->Buffer):"(null)",
389 ObjectAttributes, DesiredAccess, PolicyHandle);
390
391 ADVAPI_ForceLocalComputer(SystemName ? SystemName->Buffer : NULL,
392 STATUS_ACCESS_VIOLATION);
393 dumpLsaAttributes(ObjectAttributes);
394
395 if(PolicyHandle) *PolicyHandle = (LSA_HANDLE)0xcafe;
396 return STATUS_SUCCESS;
397 }
398
399 /******************************************************************************
400 * LsaOpenTrustedDomainByName [ADVAPI32.@]
401 *
402 */
403 NTSTATUS WINAPI LsaOpenTrustedDomainByName(
404 LSA_HANDLE policy,
405 PLSA_UNICODE_STRING name,
406 ACCESS_MASK access,
407 PLSA_HANDLE handle)
408 {
409 FIXME("(%p,%p,0x%08x,%p) stub\n", policy, name, access, handle);
410 return STATUS_OBJECT_NAME_NOT_FOUND;
411 }
412
413 /******************************************************************************
414 * LsaQueryInformationPolicy [ADVAPI32.@]
415 *
416 * Returns information about a Policy object.
417 *
418 * PARAMS
419 * PolicyHandle [I] Handle to a Policy object.
420 * InformationClass [I] Type of information to retrieve.
421 * Buffer [O] Pointer to the requested information.
422 *
423 * RETURNS
424 * Success: STATUS_SUCCESS.
425 * Failure: NTSTATUS code.
426 */
427 NTSTATUS WINAPI LsaQueryInformationPolicy(
428 IN LSA_HANDLE PolicyHandle,
429 IN POLICY_INFORMATION_CLASS InformationClass,
430 OUT PVOID *Buffer)
431 {
432 TRACE("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);
433
434 if(!Buffer) return STATUS_INVALID_PARAMETER;
435 switch (InformationClass)
436 {
437 case PolicyAuditEventsInformation: /* 2 */
438 {
439 PPOLICY_AUDIT_EVENTS_INFO p = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
440 sizeof(POLICY_AUDIT_EVENTS_INFO));
441 p->AuditingMode = FALSE; /* no auditing */
442 *Buffer = p;
443 }
444 break;
445 case PolicyPrimaryDomainInformation: /* 3 */
446 {
447 /* Only the domain name is valid for the local computer.
448 * All other fields are zero.
449 */
450 PPOLICY_PRIMARY_DOMAIN_INFO pinfo;
451
452 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name));
453
454 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
455
456 *Buffer = pinfo;
457 }
458 break;
459 case PolicyAccountDomainInformation: /* 5 */
460 {
461 struct di
462 {
463 POLICY_ACCOUNT_DOMAIN_INFO info;
464 SID sid;
465 DWORD padding[3];
466 WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1];
467 };
468
469 DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
470 struct di * xdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
471
472 xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR);
473 xdi->info.DomainName.Buffer = xdi->domain;
474 if (GetComputerNameW(xdi->info.DomainName.Buffer, &dwSize))
475 xdi->info.DomainName.Length = dwSize * sizeof(WCHAR);
476
477 TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer));
478
479 xdi->info.DomainSid = &xdi->sid;
480
481 /* read the computer SID from the registry */
482 if (!ADVAPI_GetComputerSid(&xdi->sid))
483 {
484 HeapFree(GetProcessHeap(), 0, xdi);
485
486 WARN("Computer SID not found\n");
487
488 return STATUS_UNSUCCESSFUL;
489 }
490
491 TRACE("setting SID to %s\n", debugstr_sid(&xdi->sid));
492
493 *Buffer = xdi;
494 }
495 break;
496 case PolicyDnsDomainInformation: /* 12 (0xc) */
497 {
498 /* Only the domain name is valid for the local computer.
499 * All other fields are zero.
500 */
501 PPOLICY_DNS_DOMAIN_INFO pinfo;
502
503 pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name));
504
505 TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
506
507 *Buffer = pinfo;
508 }
509 break;
510 case PolicyAuditLogInformation:
511 case PolicyPdAccountInformation:
512 case PolicyLsaServerRoleInformation:
513 case PolicyReplicaSourceInformation:
514 case PolicyDefaultQuotaInformation:
515 case PolicyModificationInformation:
516 case PolicyAuditFullSetInformation:
517 case PolicyAuditFullQueryInformation:
518 {
519 FIXME("category %d not implemented\n", InformationClass);
520 return STATUS_UNSUCCESSFUL;
521 }
522 }
523 return STATUS_SUCCESS;
524 }
525
526 /******************************************************************************
527 * LsaQueryTrustedDomainInfo [ADVAPI32.@]
528 *
529 */
530 NTSTATUS WINAPI LsaQueryTrustedDomainInfo(
531 LSA_HANDLE policy,
532 PSID sid,
533 TRUSTED_INFORMATION_CLASS class,
534 PVOID *buffer)
535 {
536 FIXME("(%p,%p,%d,%p) stub\n", policy, sid, class, buffer);
537 return STATUS_OBJECT_NAME_NOT_FOUND;
538 }
539
540 /******************************************************************************
541 * LsaQueryTrustedDomainInfoByName [ADVAPI32.@]
542 *
543 */
544 NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(
545 LSA_HANDLE policy,
546 PLSA_UNICODE_STRING name,
547 TRUSTED_INFORMATION_CLASS class,
548 PVOID *buffer)
549 {
550 FIXME("(%p,%p,%d,%p) stub\n", policy, name, class, buffer);
551 return STATUS_OBJECT_NAME_NOT_FOUND;
552 }
553
554 /******************************************************************************
555 * LsaRegisterPolicyChangeNotification [ADVAPI32.@]
556 *
557 */
558 NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(
559 POLICY_NOTIFICATION_INFORMATION_CLASS class,
560 HANDLE event)
561 {
562 FIXME("(%d,%p) stub\n", class, event);
563 return STATUS_UNSUCCESSFUL;
564 }
565
566 /******************************************************************************
567 * LsaRemoveAccountRights [ADVAPI32.@]
568 *
569 */
570 NTSTATUS WINAPI LsaRemoveAccountRights(
571 LSA_HANDLE policy,
572 PSID sid,
573 BOOLEAN all,
574 PLSA_UNICODE_STRING rights,
575 ULONG count)
576 {
577 FIXME("(%p,%p,%d,%p,0x%08x) stub\n", policy, sid, all, rights, count);
578 return STATUS_SUCCESS;
579 }
580
581 /******************************************************************************
582 * LsaRetrievePrivateData [ADVAPI32.@]
583 *
584 * Retrieves data stored by LsaStorePrivateData.
585 *
586 * PARAMS
587 * PolicyHandle [I] Handle to a Policy object.
588 * KeyName [I] Name of the key where the data is stored.
589 * PrivateData [O] Pointer to the private data.
590 *
591 * RETURNS
592 * Success: STATUS_SUCCESS.
593 * Failure: STATUS_OBJECT_NAME_NOT_FOUND or NTSTATUS code.
594 */
595 NTSTATUS WINAPI LsaRetrievePrivateData(
596 IN LSA_HANDLE PolicyHandle,
597 IN PLSA_UNICODE_STRING KeyName,
598 OUT PLSA_UNICODE_STRING* PrivateData)
599 {
600 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
601 return STATUS_OBJECT_NAME_NOT_FOUND;
602 }
603
604 /******************************************************************************
605 * LsaSetInformationPolicy [ADVAPI32.@]
606 *
607 * Modifies information in a Policy object.
608 *
609 * PARAMS
610 * PolicyHandle [I] Handle to a Policy object.
611 * InformationClass [I] Type of information to set.
612 * Buffer [I] Pointer to the information to set.
613 *
614 * RETURNS
615 * Success: STATUS_SUCCESS.
616 * Failure: NTSTATUS code.
617 */
618 NTSTATUS WINAPI LsaSetInformationPolicy(
619 IN LSA_HANDLE PolicyHandle,
620 IN POLICY_INFORMATION_CLASS InformationClass,
621 IN PVOID Buffer)
622 {
623 FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
624
625 return STATUS_UNSUCCESSFUL;
626 }
627
628 /******************************************************************************
629 * LsaSetSecret [ADVAPI32.@]
630 *
631 * Set old and new values on a secret handle
632 *
633 * PARAMS
634 * SecretHandle [I] Handle to a secret object.
635 * EncryptedCurrentValue [I] Pointer to encrypted new value, can be NULL
636 * EncryptedOldValue [I] Pointer to encrypted old value, can be NULL
637 *
638 * RETURNS
639 * Success: STATUS_SUCCESS
640 * Failure: NTSTATUS code.
641 */
642 NTSTATUS WINAPI LsaSetSecret(
643 IN LSA_HANDLE SecretHandle,
644 IN PLSA_UNICODE_STRING EncryptedCurrentValue,
645 IN PLSA_UNICODE_STRING EncryptedOldValue)
646 {
647 FIXME("(%p,%p,%p) stub\n", SecretHandle, EncryptedCurrentValue,
648 EncryptedOldValue);
649 return STATUS_SUCCESS;
650 }
651
652 /******************************************************************************
653 * LsaSetTrustedDomainInfoByName [ADVAPI32.@]
654 *
655 */
656 NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(
657 LSA_HANDLE policy,
658 PLSA_UNICODE_STRING name,
659 TRUSTED_INFORMATION_CLASS class,
660 PVOID buffer)
661 {
662 FIXME("(%p,%p,%d,%p) stub\n", policy, name, class, buffer);
663 return STATUS_SUCCESS;
664 }
665
666 /******************************************************************************
667 * LsaSetTrustedDomainInformation [ADVAPI32.@]
668 *
669 */
670 NTSTATUS WINAPI LsaSetTrustedDomainInformation(
671 LSA_HANDLE policy,
672 PSID sid,
673 TRUSTED_INFORMATION_CLASS class,
674 PVOID buffer)
675 {
676 FIXME("(%p,%p,%d,%p) stub\n", policy, sid, class, buffer);
677 return STATUS_SUCCESS;
678 }
679
680 /******************************************************************************
681 * LsaStorePrivateData [ADVAPI32.@]
682 *
683 * Stores or deletes a Policy object's data under the specified reg key.
684 *
685 * PARAMS
686 * PolicyHandle [I] Handle to a Policy object.
687 * KeyName [I] Name of the key where the data will be stored.
688 * PrivateData [O] Pointer to the private data.
689 *
690 * RETURNS
691 * Success: STATUS_SUCCESS.
692 * Failure: STATUS_OBJECT_NAME_NOT_FOUND or NTSTATUS code.
693 */
694 NTSTATUS WINAPI LsaStorePrivateData(
695 IN LSA_HANDLE PolicyHandle,
696 IN PLSA_UNICODE_STRING KeyName,
697 IN PLSA_UNICODE_STRING PrivateData)
698 {
699 FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
700 return STATUS_OBJECT_NAME_NOT_FOUND;
701 }
702
703 /******************************************************************************
704 * LsaUnregisterPolicyChangeNotification [ADVAPI32.@]
705 *
706 */
707 NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
708 POLICY_NOTIFICATION_INFORMATION_CLASS class,
709 HANDLE event)
710 {
711 FIXME("(%d,%p) stub\n", class, event);
712 return STATUS_SUCCESS;
713 }
714
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.