xref: /reactos/base/services/srvsvc/rpcserver.c (revision 0a5ccac5)
1 /*
2  *  ReactOS Services
3  *  Copyright (C) 2015 ReactOS Team
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License along
16  *  with this program; if not, write to the Free Software Foundation, Inc.,
17  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 /*
20  * COPYRIGHT:        See COPYING in the top level directory
21  * PROJECT:          ReactOS Services
22  * FILE:             base/services/srvsvc/rpcserver.c
23  * PURPOSE:          Server service
24  * PROGRAMMER:       Eric Kohl
25  */
26 
27 /* INCLUDES *****************************************************************/
28 
29 #include "precomp.h"
30 
31 #include "ndk/kefuncs.h"
32 #include "ndk/rtlfuncs.h"
33 #include "winerror.h"
34 #include "lmerr.h"
35 
36 WINE_DEFAULT_DEBUG_CHANNEL(srvsvc);
37 
38 /* FUNCTIONS *****************************************************************/
39 
40 DWORD
41 WINAPI
RpcThreadRoutine(LPVOID lpParameter)42 RpcThreadRoutine(
43     LPVOID lpParameter)
44 {
45     RPC_STATUS Status;
46 
47     Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\srvsvc", NULL);
48     if (Status != RPC_S_OK)
49     {
50         ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
51         return 0;
52     }
53 
54     Status = RpcServerRegisterIf(srvsvc_v3_0_s_ifspec, NULL, NULL);
55     if (Status != RPC_S_OK)
56     {
57         ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
58         return 0;
59     }
60 
61     Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
62     if (Status != RPC_S_OK)
63     {
64         ERR("RpcServerListen() failed (Status %lx)\n", Status);
65     }
66 
67     return 0;
68 }
69 
70 
midl_user_allocate(SIZE_T len)71 void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
72 {
73     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
74 }
75 
76 
midl_user_free(void __RPC_FAR * ptr)77 void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
78 {
79     HeapFree(GetProcessHeap(), 0, ptr);
80 }
81 
82 
SHARE_DEL_HANDLE_rundown(SHARE_DEL_HANDLE hClientHandle)83 void __RPC_USER SHARE_DEL_HANDLE_rundown(SHARE_DEL_HANDLE hClientHandle)
84 {
85 }
86 
87 
88 /* Function 0 */
89 void
90 __stdcall
Opnum0NotUsedOnWire(void)91 Opnum0NotUsedOnWire(void)
92 {
93     UNIMPLEMENTED;
94 }
95 
96 
97 /* Function 1 */
98 void
99 __stdcall
Opnum1NotUsedOnWire(void)100 Opnum1NotUsedOnWire(void)
101 {
102     UNIMPLEMENTED;
103 }
104 
105 
106 /* Function 2 */
107 void
108 __stdcall
Opnum2NotUsedOnWire(void)109 Opnum2NotUsedOnWire(void)
110 {
111     UNIMPLEMENTED;
112 }
113 
114 
115 /* Function 3 */
116 void
117 __stdcall
Opnum3NotUsedOnWire(void)118 Opnum3NotUsedOnWire(void)
119 {
120     UNIMPLEMENTED;
121 }
122 
123 
124 /* Function 4 */
125 void
126 __stdcall
Opnum4NotUsedOnWire(void)127 Opnum4NotUsedOnWire(void)
128 {
129     UNIMPLEMENTED;
130 }
131 
132 /* Function 5 */
133 void
134 __stdcall
Opnum5NotUsedOnWire(void)135 Opnum5NotUsedOnWire(void)
136 {
137     UNIMPLEMENTED;
138 }
139 
140 
141 /* Function 6 */
142 void
143 __stdcall
Opnum6NotUsedOnWire(void)144 Opnum6NotUsedOnWire(void)
145 {
146     UNIMPLEMENTED;
147 }
148 
149 
150 /* Function 7 */
151 void
152 __stdcall
Opnum7NotUsedOnWire(void)153 Opnum7NotUsedOnWire(void)
154 {
155     UNIMPLEMENTED;
156 }
157 
158 
159 /* Function 8 */
160 NET_API_STATUS
161 __stdcall
NetrConnectionEnum(SRVSVC_HANDLE ServerName,WCHAR * Qualifier,LPCONNECT_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)162 NetrConnectionEnum(
163     SRVSVC_HANDLE ServerName,
164     WCHAR *Qualifier,
165     LPCONNECT_ENUM_STRUCT InfoStruct,
166     DWORD PreferedMaximumLength,
167     DWORD *TotalEntries,
168     DWORD *ResumeHandle)
169 {
170     UNIMPLEMENTED;
171     return 0;
172 }
173 
174 
175 /* Function 9 */
176 NET_API_STATUS
177 __stdcall
NetrFileEnum(SRVSVC_HANDLE ServerName,WCHAR * BasePath,WCHAR * UserName,PFILE_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)178 NetrFileEnum(
179     SRVSVC_HANDLE ServerName,
180     WCHAR *BasePath,
181     WCHAR *UserName,
182     PFILE_ENUM_STRUCT InfoStruct,
183     DWORD PreferedMaximumLength,
184     DWORD *TotalEntries,
185     DWORD *ResumeHandle)
186 {
187     UNIMPLEMENTED;
188     return 0;
189 }
190 
191 
192 /* Function 10 */
193 NET_API_STATUS
194 __stdcall
NetrFileGetInfo(SRVSVC_HANDLE ServerName,DWORD FileId,DWORD Level,LPFILE_INFO InfoStruct)195 NetrFileGetInfo(
196     SRVSVC_HANDLE ServerName,
197     DWORD FileId,
198     DWORD Level,
199     LPFILE_INFO InfoStruct)
200 {
201     UNIMPLEMENTED;
202     return 0;
203 }
204 
205 
206 /* Function 11 */
207 NET_API_STATUS
208 __stdcall
NetrFileClose(SRVSVC_HANDLE ServerName,DWORD FileId)209 NetrFileClose(
210     SRVSVC_HANDLE ServerName,
211     DWORD FileId)
212 {
213     UNIMPLEMENTED;
214     return 0;
215 }
216 
217 
218 /* Function 12 */
219 NET_API_STATUS
220 __stdcall
NetrSessionEnum(SRVSVC_HANDLE ServerName,WCHAR * ClientName,WCHAR * UserName,PSESSION_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)221 NetrSessionEnum(
222     SRVSVC_HANDLE ServerName,
223     WCHAR *ClientName,
224     WCHAR *UserName,
225     PSESSION_ENUM_STRUCT InfoStruct,
226     DWORD PreferedMaximumLength,
227     DWORD *TotalEntries,
228     DWORD *ResumeHandle)
229 {
230     UNIMPLEMENTED;
231     return 0;
232 }
233 
234 
235 /* Function 13 */
236 NET_API_STATUS
237 __stdcall
NetrSessionDel(SRVSVC_HANDLE ServerName,WCHAR * ClientName,WCHAR * UserName)238 NetrSessionDel(
239     SRVSVC_HANDLE ServerName,
240     WCHAR *ClientName,
241     WCHAR *UserName)
242 {
243     UNIMPLEMENTED;
244     return ERROR_CALL_NOT_IMPLEMENTED;
245 }
246 
247 
248 /* Function 14 */
249 NET_API_STATUS
250 __stdcall
NetrShareAdd(SRVSVC_HANDLE ServerName,DWORD Level,LPSHARE_INFO InfoStruct,DWORD * ParmErr)251 NetrShareAdd(
252     SRVSVC_HANDLE ServerName,
253     DWORD Level,
254     LPSHARE_INFO InfoStruct,
255     DWORD *ParmErr)
256 {
257     UNIMPLEMENTED;
258     return ERROR_CALL_NOT_IMPLEMENTED;
259 }
260 
261 
262 /* Function 15 */
263 NET_API_STATUS
264 __stdcall
NetrShareEnum(SRVSVC_HANDLE ServerName,LPSHARE_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)265 NetrShareEnum(
266     SRVSVC_HANDLE ServerName,
267     LPSHARE_ENUM_STRUCT InfoStruct,
268     DWORD PreferedMaximumLength,
269     DWORD *TotalEntries,
270     DWORD *ResumeHandle)
271 {
272     UNIMPLEMENTED;
273     return ERROR_CALL_NOT_IMPLEMENTED;
274 }
275 
276 
277 /* Function 16 */
278 NET_API_STATUS
279 __stdcall
NetrShareGetInfo(SRVSVC_HANDLE ServerName,WCHAR * NetName,DWORD Level,LPSHARE_INFO InfoStruct)280 NetrShareGetInfo(
281     SRVSVC_HANDLE ServerName,
282     WCHAR *NetName,
283     DWORD Level,
284     LPSHARE_INFO InfoStruct)
285 {
286     UNIMPLEMENTED;
287     return ERROR_CALL_NOT_IMPLEMENTED;
288 }
289 
290 
291 /* Function 17 */
292 NET_API_STATUS
293 __stdcall
NetrShareSetInfo(SRVSVC_HANDLE ServerName,WCHAR * NetName,DWORD Level,LPSHARE_INFO ShareInfo,DWORD * ParmErr)294 NetrShareSetInfo(
295     SRVSVC_HANDLE ServerName,
296     WCHAR *NetName,
297     DWORD Level,
298     LPSHARE_INFO ShareInfo,
299     DWORD *ParmErr)
300 {
301     UNIMPLEMENTED;
302     return ERROR_CALL_NOT_IMPLEMENTED;
303 }
304 
305 
306 /* Function 18 */
307 NET_API_STATUS
308 __stdcall
NetrShareDel(SRVSVC_HANDLE ServerName,WCHAR * NetName,DWORD Reserved)309 NetrShareDel(
310     SRVSVC_HANDLE ServerName,
311     WCHAR *NetName,
312     DWORD Reserved)
313 {
314     UNIMPLEMENTED;
315     return ERROR_CALL_NOT_IMPLEMENTED;
316 }
317 
318 
319 /* Function 19 */
320 NET_API_STATUS
321 __stdcall
NetrShareDelSticky(SRVSVC_HANDLE ServerName,WCHAR * NetName,DWORD Reserved)322 NetrShareDelSticky(
323     SRVSVC_HANDLE ServerName,
324     WCHAR *NetName,
325     DWORD Reserved)
326 {
327     UNIMPLEMENTED;
328     return ERROR_CALL_NOT_IMPLEMENTED;
329 }
330 
331 
332 /* Function 20 */
333 NET_API_STATUS
334 __stdcall
NetrShareCheck(SRVSVC_HANDLE ServerName,WCHAR * Device,DWORD * Type)335 NetrShareCheck(
336     SRVSVC_HANDLE ServerName,
337     WCHAR *Device,
338     DWORD *Type)
339 {
340     UNIMPLEMENTED;
341     return ERROR_CALL_NOT_IMPLEMENTED;
342 }
343 
344 
345 /* Function 21 */
346 NET_API_STATUS
347 __stdcall
NetrServerGetInfo(SRVSVC_HANDLE ServerName,DWORD Level,LPSERVER_INFO * InfoStruct)348 NetrServerGetInfo(
349     SRVSVC_HANDLE ServerName,
350     DWORD Level,
351     LPSERVER_INFO *InfoStruct)
352 {
353     WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
354     DWORD dwComputerNameLength, dwSize;
355     PSERVER_INFO pServerInfo = NULL;
356     OSVERSIONINFOW VersionInfo;
357 
358     TRACE("NetrServerGetInfo(%p %lu %p)\n",
359           ServerName, Level, InfoStruct);
360 
361     dwComputerNameLength = MAX_COMPUTERNAME_LENGTH + 1;
362     GetComputerNameW(szComputerName, &dwComputerNameLength);
363     dwComputerNameLength++; /* include NULL terminator */
364 
365     VersionInfo.dwOSVersionInfoSize = sizeof(VersionInfo);
366     GetVersionExW(&VersionInfo);
367 
368     switch (Level)
369     {
370         case 100:
371             dwSize = sizeof(SERVER_INFO_100) +
372                      dwComputerNameLength * sizeof(WCHAR);
373             pServerInfo = midl_user_allocate(dwSize);
374             if (pServerInfo == NULL)
375                 return ERROR_NOT_ENOUGH_MEMORY;
376 
377             pServerInfo->ServerInfo100.sv100_platform_id = PLATFORM_ID_NT;
378             pServerInfo->ServerInfo100.sv100_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_100));
379             wcscpy(pServerInfo->ServerInfo100.sv100_name, szComputerName);
380 
381             *InfoStruct = pServerInfo;
382             break;
383 
384         case 101:
385             dwSize = sizeof(SERVER_INFO_101) +
386                      dwComputerNameLength * sizeof(WCHAR);
387             pServerInfo = midl_user_allocate(dwSize);
388             if (pServerInfo == NULL)
389                 return ERROR_NOT_ENOUGH_MEMORY;
390 
391             pServerInfo->ServerInfo101.sv101_platform_id = PLATFORM_ID_NT;
392             pServerInfo->ServerInfo101.sv101_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_101));
393             wcscpy(pServerInfo->ServerInfo101.sv101_name, szComputerName);
394 
395             pServerInfo->ServerInfo101.sv101_version_major = VersionInfo.dwMajorVersion;
396             pServerInfo->ServerInfo101.sv101_version_minor = VersionInfo.dwMinorVersion;
397             pServerInfo->ServerInfo101.sv101_type = dwServiceBits | SV_TYPE_NT;
398             pServerInfo->ServerInfo101.sv101_comment = NULL; /* FIXME */
399 
400             *InfoStruct = pServerInfo;
401             break;
402 
403         case 102:
404             dwSize = sizeof(SERVER_INFO_102) +
405                      dwComputerNameLength * sizeof(WCHAR);
406             pServerInfo = midl_user_allocate(dwSize);
407             if (pServerInfo == NULL)
408                 return ERROR_NOT_ENOUGH_MEMORY;
409 
410             pServerInfo->ServerInfo102.sv102_platform_id = PLATFORM_ID_NT;
411             pServerInfo->ServerInfo102.sv102_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_102));
412             wcscpy(pServerInfo->ServerInfo102.sv102_name, szComputerName);
413 
414             pServerInfo->ServerInfo102.sv102_version_major = VersionInfo.dwMajorVersion;
415             pServerInfo->ServerInfo102.sv102_version_minor = VersionInfo.dwMinorVersion;
416             pServerInfo->ServerInfo102.sv102_type = dwServiceBits | SV_TYPE_NT;
417             pServerInfo->ServerInfo102.sv102_comment = NULL; /* FIXME */
418 
419             pServerInfo->ServerInfo102.sv102_users = 0; /* FIXME */
420             pServerInfo->ServerInfo102.sv102_disc = 0; /* FIXME */
421             pServerInfo->ServerInfo102.sv102_hidden = SV_VISIBLE; /* FIXME */
422             pServerInfo->ServerInfo102.sv102_announce = 0; /* FIXME */
423             pServerInfo->ServerInfo102.sv102_anndelta = 0; /* FIXME */
424             pServerInfo->ServerInfo102.sv102_licenses = 0; /* FIXME */
425             pServerInfo->ServerInfo102.sv102_userpath = NULL; /* FIXME */
426 
427             *InfoStruct = pServerInfo;
428             break;
429 
430         default:
431             FIXME("level %d unimplemented\n", Level);
432             return ERROR_INVALID_LEVEL;
433     }
434 
435     return NERR_Success;
436 }
437 
438 
439 /* Function 22 */
440 NET_API_STATUS
441 __stdcall
NetrServerSetInfo(SRVSVC_HANDLE ServerName,DWORD Level,LPSERVER_INFO ServerInfo,DWORD * ParmErr)442 NetrServerSetInfo(
443     SRVSVC_HANDLE ServerName,
444     DWORD Level,
445     LPSERVER_INFO ServerInfo,
446     DWORD *ParmErr)
447 {
448     UNIMPLEMENTED;
449     return ERROR_CALL_NOT_IMPLEMENTED;
450 }
451 
452 
453 /* Function 23 */
454 NET_API_STATUS
455 __stdcall
NetrServerDiskEnum(SRVSVC_HANDLE ServerName,DWORD Level,DISK_ENUM_CONTAINER * DiskInfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)456 NetrServerDiskEnum(
457     SRVSVC_HANDLE ServerName,
458     DWORD Level,
459     DISK_ENUM_CONTAINER *DiskInfoStruct,
460     DWORD PreferedMaximumLength,
461     DWORD *TotalEntries,
462     DWORD *ResumeHandle)
463 {
464     UNIMPLEMENTED;
465     return ERROR_CALL_NOT_IMPLEMENTED;
466 }
467 
468 
469 /* Function 24 */
470 NET_API_STATUS
471 __stdcall
NetrServerStatisticsGet(SRVSVC_HANDLE ServerName,WCHAR * Service,DWORD Level,DWORD Options,LPSTAT_SERVER_0 * InfoStruct)472 NetrServerStatisticsGet(
473     SRVSVC_HANDLE ServerName,
474     WCHAR *Service,
475     DWORD Level,
476     DWORD Options,
477     LPSTAT_SERVER_0 *InfoStruct)
478 {
479     PSTAT_SERVER_0 pStatBuffer;
480 
481     TRACE("NetrServerStatisticsGet(%p %p %lu 0x%lx %p)\n",
482           ServerName, Service, Level, Options, InfoStruct);
483 
484     if (Level != 0)
485         return ERROR_INVALID_LEVEL;
486 
487     if (Options != 0)
488         return ERROR_INVALID_PARAMETER;
489 
490     pStatBuffer = midl_user_allocate(sizeof(STAT_SERVER_0));
491     if (pStatBuffer == NULL)
492         return ERROR_NOT_ENOUGH_MEMORY;
493 
494     ZeroMemory(pStatBuffer, sizeof(STAT_SERVER_0));
495 
496     // FIXME: Return the actual statistcs data!
497 
498     *InfoStruct = pStatBuffer;
499 
500     return NERR_Success;
501 }
502 
503 
504 /* Function 25 */
505 NET_API_STATUS
506 __stdcall
NetrServerTransportAdd(SRVSVC_HANDLE ServerName,DWORD Level,LPSERVER_TRANSPORT_INFO_0 Buffer)507 NetrServerTransportAdd(
508     SRVSVC_HANDLE ServerName,
509     DWORD Level,
510     LPSERVER_TRANSPORT_INFO_0 Buffer)
511 {
512     UNIMPLEMENTED;
513     return ERROR_CALL_NOT_IMPLEMENTED;
514 }
515 
516 
517 /* Function 26 */
518 NET_API_STATUS
519 __stdcall
NetrServerTransportEnum(SRVSVC_HANDLE ServerName,LPSERVER_XPORT_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)520 NetrServerTransportEnum(
521     SRVSVC_HANDLE ServerName,
522     LPSERVER_XPORT_ENUM_STRUCT InfoStruct,
523     DWORD PreferedMaximumLength,
524     DWORD *TotalEntries,
525     DWORD *ResumeHandle)
526 {
527     UNIMPLEMENTED;
528     return ERROR_CALL_NOT_IMPLEMENTED;
529 }
530 
531 
532 /* Function 27 */
533 NET_API_STATUS
534 __stdcall
NetrServerTransportDel(SRVSVC_HANDLE ServerName,DWORD Level,LPSERVER_TRANSPORT_INFO_0 Buffer)535 NetrServerTransportDel(
536     SRVSVC_HANDLE ServerName,
537     DWORD Level,
538     LPSERVER_TRANSPORT_INFO_0 Buffer)
539 {
540     UNIMPLEMENTED;
541     return ERROR_CALL_NOT_IMPLEMENTED;
542 }
543 
544 
545 /* Function 28 */
546 NET_API_STATUS
547 __stdcall
NetrRemoteTOD(SRVSVC_HANDLE ServerName,LPTIME_OF_DAY_INFO * BufferPtr)548 NetrRemoteTOD(
549     SRVSVC_HANDLE ServerName,
550     LPTIME_OF_DAY_INFO *BufferPtr)
551 {
552     SYSTEMTIME SystemTime;
553     LARGE_INTEGER Time;
554     TIME_ZONE_INFORMATION TimeZoneInfo;
555     DWORD TimeZoneId;
556     LPTIME_OF_DAY_INFO lpTod;
557 
558     TRACE("NetrRemoteTOD(%p %p)\n", ServerName, BufferPtr);
559 
560     *BufferPtr = midl_user_allocate(sizeof(TIME_OF_DAY_INFO));
561     if (*BufferPtr == NULL)
562         return ERROR_NOT_ENOUGH_MEMORY;
563 
564     lpTod = *BufferPtr;
565 
566     /* Set the seconds since 1970 */
567     NtQuerySystemTime(&Time);
568     RtlTimeToSecondsSince1970(&Time,
569                               &lpTod->tod_elapsedt);
570 
571     /* Set the tick count */
572     lpTod->tod_msecs = GetTickCount();
573 
574     /* Set the timezone */
575     TimeZoneId = GetTimeZoneInformation(&TimeZoneInfo);
576 
577     switch (TimeZoneId)
578     {
579         case TIME_ZONE_ID_UNKNOWN:
580             lpTod->tod_timezone = TimeZoneInfo.Bias;
581             break;
582 
583         case TIME_ZONE_ID_STANDARD:
584             lpTod->tod_timezone = TimeZoneInfo.Bias + TimeZoneInfo.StandardBias;
585             break;
586 
587         case TIME_ZONE_ID_DAYLIGHT:
588             lpTod->tod_timezone = TimeZoneInfo.Bias + TimeZoneInfo.DaylightBias;
589             break;
590 
591         default:
592             lpTod->tod_timezone = 0;
593     }
594 
595     /* Set the ??? */
596     lpTod->tod_tinterval = 310;
597 
598     /* Set the date and time */
599     GetSystemTime(&SystemTime);
600     lpTod->tod_hours = SystemTime.wHour;
601     lpTod->tod_mins = SystemTime.wMinute;
602     lpTod->tod_secs = SystemTime.wSecond;
603     lpTod->tod_hunds = SystemTime.wMilliseconds / 10;
604     lpTod->tod_day = SystemTime.wDay;
605     lpTod->tod_month = SystemTime.wMonth;
606     lpTod->tod_year = SystemTime.wYear;
607     lpTod->tod_weekday = SystemTime.wDayOfWeek;
608 
609     return NERR_Success;
610 }
611 
612 
613 /* Function 29 - Not used on wire */
614 NET_API_STATUS
615 __stdcall
NetrServerSetServiceBits(SRVSVC_HANDLE ServerName,WCHAR * Transport,DWORD ServiceBits,DWORD UpdateImmediately)616 NetrServerSetServiceBits(
617     SRVSVC_HANDLE ServerName,
618     WCHAR *Transport,
619     DWORD ServiceBits,
620     DWORD UpdateImmediately)
621 {
622     FIXME("NetrServerSetServiceBits(%p %s %lx %lu)\n",
623           ServerName, debugstr_w(Transport), ServiceBits, UpdateImmediately);
624 
625     /* FIXME: Support Transport */
626     /* FIXME: Support UpdateImmdiately */
627 
628     dwServiceBits = ServiceBits;
629 
630     return NERR_Success;
631 }
632 
633 
634 /* Function 30 */
635 NET_API_STATUS
636 __stdcall
NetprPathType(SRVSVC_HANDLE ServerName,WCHAR * PathName,DWORD * PathType,DWORD Flags)637 NetprPathType(
638     SRVSVC_HANDLE ServerName,
639     WCHAR *PathName,
640     DWORD *PathType,
641     DWORD Flags)
642 {
643     UNIMPLEMENTED;
644     return ERROR_CALL_NOT_IMPLEMENTED;
645 }
646 
647 
648 /* Function 31 */
649 NET_API_STATUS
650 __stdcall
NetprPathCanonicalize(SRVSVC_HANDLE ServerName,WCHAR * PathName,unsigned char * Outbuf,DWORD OutbufLen,WCHAR * Prefix,DWORD * PathType,DWORD Flags)651 NetprPathCanonicalize(
652     SRVSVC_HANDLE ServerName,
653     WCHAR *PathName,
654     unsigned char *Outbuf,
655     DWORD OutbufLen,
656     WCHAR *Prefix,
657     DWORD *PathType,
658     DWORD Flags)
659 {
660     UNIMPLEMENTED;
661     return ERROR_CALL_NOT_IMPLEMENTED;
662 }
663 
664 
665 /* Function 32 */
666 long
667 __stdcall
NetprPathCompare(SRVSVC_HANDLE ServerName,WCHAR * PathName1,WCHAR * PathName2,DWORD PathType,DWORD Flags)668 NetprPathCompare(
669     SRVSVC_HANDLE ServerName,
670     WCHAR *PathName1,
671     WCHAR *PathName2,
672     DWORD PathType,
673     DWORD Flags)
674 {
675     UNIMPLEMENTED;
676     return ERROR_CALL_NOT_IMPLEMENTED;
677 }
678 
679 
680 /* Function 33 */
681 NET_API_STATUS
682 __stdcall
NetprNameValidate(SRVSVC_HANDLE ServerName,WCHAR * Name,DWORD NameType,DWORD Flags)683 NetprNameValidate(
684     SRVSVC_HANDLE ServerName,
685     WCHAR * Name,
686     DWORD NameType,
687     DWORD Flags)
688 {
689     UNIMPLEMENTED;
690     return ERROR_CALL_NOT_IMPLEMENTED;
691 }
692 
693 
694 /* Function 34 */
695 NET_API_STATUS
696 __stdcall
NetprNameCanonicalize(SRVSVC_HANDLE ServerName,WCHAR * Name,WCHAR * Outbuf,DWORD OutbufLen,DWORD NameType,DWORD Flags)697 NetprNameCanonicalize(
698     SRVSVC_HANDLE ServerName,
699     WCHAR *Name,
700     WCHAR *Outbuf,
701     DWORD OutbufLen,
702     DWORD NameType,
703     DWORD Flags)
704 {
705     UNIMPLEMENTED;
706     return ERROR_CALL_NOT_IMPLEMENTED;
707 }
708 
709 
710 /* Function 35 */
711 long
712 __stdcall
NetprNameCompare(SRVSVC_HANDLE ServerName,WCHAR * Name1,WCHAR * Name2,DWORD NameType,DWORD Flags)713 NetprNameCompare(
714     SRVSVC_HANDLE ServerName,
715     WCHAR *Name1,
716     WCHAR *Name2,
717     DWORD NameType,
718     DWORD Flags)
719 {
720     UNIMPLEMENTED;
721     return ERROR_CALL_NOT_IMPLEMENTED;
722 }
723 
724 
725 /* Function 36 */
726 NET_API_STATUS
727 __stdcall
NetrShareEnumSticky(SRVSVC_HANDLE ServerName,LPSHARE_ENUM_STRUCT InfoStruct,DWORD PreferedMaximumLength,DWORD * TotalEntries,DWORD * ResumeHandle)728 NetrShareEnumSticky(
729     SRVSVC_HANDLE ServerName,
730     LPSHARE_ENUM_STRUCT InfoStruct,
731     DWORD PreferedMaximumLength,
732     DWORD *TotalEntries,
733     DWORD *ResumeHandle)
734 {
735     UNIMPLEMENTED;
736     return ERROR_CALL_NOT_IMPLEMENTED;
737 }
738 
739 
740 /* Function 37 */
741 NET_API_STATUS
742 __stdcall
NetrShareDelStart(SRVSVC_HANDLE ServerName,WCHAR * NetName,DWORD Reserved,PSHARE_DEL_HANDLE ContextHandle)743 NetrShareDelStart(
744     SRVSVC_HANDLE ServerName,
745     WCHAR *NetName,
746     DWORD Reserved,
747     PSHARE_DEL_HANDLE ContextHandle)
748 {
749     UNIMPLEMENTED;
750     return ERROR_CALL_NOT_IMPLEMENTED;
751 }
752 
753 
754 /* Function 38 */
755 NET_API_STATUS
756 __stdcall
NetrShareDelCommit(PSHARE_DEL_HANDLE ContextHandle)757 NetrShareDelCommit(
758     PSHARE_DEL_HANDLE ContextHandle)
759 {
760     UNIMPLEMENTED;
761     return ERROR_CALL_NOT_IMPLEMENTED;
762 }
763 
764 
765 /* Function 39 */
766 DWORD
767 __stdcall
NetrpGetFileSecurity(SRVSVC_HANDLE ServerName,WCHAR * ShareName,WCHAR * lpFileName,SECURITY_INFORMATION RequestedInformation,PADT_SECURITY_DESCRIPTOR * SecurityDescriptor)768 NetrpGetFileSecurity(
769     SRVSVC_HANDLE ServerName,
770     WCHAR *ShareName,
771     WCHAR *lpFileName,
772     SECURITY_INFORMATION RequestedInformation,
773     PADT_SECURITY_DESCRIPTOR *SecurityDescriptor)
774 {
775     UNIMPLEMENTED;
776     return ERROR_CALL_NOT_IMPLEMENTED;
777 }
778 
779 
780 /* Function 40 */
781 DWORD
782 __stdcall
NetrpSetFileSecurity(SRVSVC_HANDLE ServerName,WCHAR * ShareName,WCHAR * lpFileName,SECURITY_INFORMATION SecurityInformation,PADT_SECURITY_DESCRIPTOR SecurityDescriptor)783 NetrpSetFileSecurity(
784     SRVSVC_HANDLE ServerName,
785     WCHAR *ShareName,
786     WCHAR *lpFileName,
787     SECURITY_INFORMATION SecurityInformation,
788     PADT_SECURITY_DESCRIPTOR SecurityDescriptor)
789 {
790     UNIMPLEMENTED;
791     return ERROR_CALL_NOT_IMPLEMENTED;
792 }
793 
794 
795 /* Function 41 */
796 NET_API_STATUS
797 __stdcall
NetrServerTransportAddEx(SRVSVC_HANDLE ServerName,DWORD Level,LPTRANSPORT_INFO Buffer)798 NetrServerTransportAddEx(
799     SRVSVC_HANDLE ServerName,
800     DWORD Level,
801     LPTRANSPORT_INFO Buffer)
802 {
803     UNIMPLEMENTED;
804     return ERROR_CALL_NOT_IMPLEMENTED;
805 }
806 
807 
808 /* Function 42 - Not used on wire */
809 NET_API_STATUS
810 __stdcall
NetrServerSetServiceBitsEx(SRVSVC_HANDLE ServerName,WCHAR * EmulatedServer,WCHAR * Transport,DWORD ServiceBitsOfInterest,DWORD ServiceBits,DWORD UpdateImmediately)811 NetrServerSetServiceBitsEx(
812     SRVSVC_HANDLE ServerName,
813     WCHAR *EmulatedServer,
814     WCHAR *Transport,
815     DWORD ServiceBitsOfInterest,
816     DWORD ServiceBits,
817     DWORD UpdateImmediately)
818 {
819     UNIMPLEMENTED;
820     return ERROR_CALL_NOT_IMPLEMENTED;
821 }
822 
823 
824 /* Function 43 */
825 NET_API_STATUS
826 __stdcall
NetrDfsGetVersion(SRVSVC_HANDLE ServerName,DWORD * Version)827 NetrDfsGetVersion(
828     SRVSVC_HANDLE ServerName,
829     DWORD *Version)
830 {
831     UNIMPLEMENTED;
832     return ERROR_CALL_NOT_IMPLEMENTED;
833 }
834 
835 
836 /* Function 44 */
837 NET_API_STATUS
838 __stdcall
NetrDfsCreateLocalPartition(SRVSVC_HANDLE ServerName,WCHAR * ShareName,GUID * EntryUid,WCHAR * EntryPrefix,WCHAR * ShortName,LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,int Force)839 NetrDfsCreateLocalPartition(
840     SRVSVC_HANDLE ServerName,
841     WCHAR *ShareName,
842     GUID *EntryUid,
843     WCHAR *EntryPrefix,
844     WCHAR *ShortName,
845     LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
846     int Force)
847 {
848     UNIMPLEMENTED;
849     return ERROR_CALL_NOT_IMPLEMENTED;
850 }
851 
852 
853 /* Function 45 */
854 NET_API_STATUS
855 __stdcall
NetrDfsDeleteLocalPartition(SRVSVC_HANDLE ServerName,GUID * Uid,WCHAR * Prefix)856 NetrDfsDeleteLocalPartition(
857     SRVSVC_HANDLE ServerName,
858     GUID *Uid,
859     WCHAR *Prefix)
860 {
861     UNIMPLEMENTED;
862     return ERROR_CALL_NOT_IMPLEMENTED;
863 }
864 
865 
866 /* Function 46 */
867 NET_API_STATUS
868 __stdcall
NetrDfsSetLocalVolumeState(SRVSVC_HANDLE ServerName,GUID * Uid,WCHAR * Prefix,unsigned long State)869 NetrDfsSetLocalVolumeState(
870     SRVSVC_HANDLE ServerName,
871     GUID *Uid,
872     WCHAR *Prefix,
873     unsigned long State)
874 {
875     UNIMPLEMENTED;
876     return ERROR_CALL_NOT_IMPLEMENTED;
877 }
878 
879 
880 /* Function 47 - Not used on wire */
881 NET_API_STATUS
882 __stdcall
NetrDfsSetServerInfo(void)883 NetrDfsSetServerInfo(void)
884 {
885     UNIMPLEMENTED;
886     return ERROR_CALL_NOT_IMPLEMENTED;
887 }
888 
889 
890 /* Function 48 */
891 NET_API_STATUS
892 __stdcall
NetrDfsCreateExitPoint(SRVSVC_HANDLE ServerName,GUID * Uid,WCHAR * Prefix,unsigned long Type,DWORD ShortPrefixLen,WCHAR * ShortPrefix)893 NetrDfsCreateExitPoint(
894     SRVSVC_HANDLE ServerName,
895     GUID *Uid,
896     WCHAR *Prefix,
897     unsigned long Type,
898     DWORD ShortPrefixLen,
899     WCHAR *ShortPrefix)
900 {
901     UNIMPLEMENTED;
902     return ERROR_CALL_NOT_IMPLEMENTED;
903 }
904 
905 
906 /* Function 49 */
907 NET_API_STATUS
908 __stdcall
NetrDfsDeleteExitPoint(SRVSVC_HANDLE ServerName,GUID * Uid,WCHAR * Prefix,unsigned long Type)909 NetrDfsDeleteExitPoint(
910     SRVSVC_HANDLE ServerName,
911     GUID *Uid,
912     WCHAR *Prefix,
913     unsigned long Type)
914 {
915     UNIMPLEMENTED;
916     return ERROR_CALL_NOT_IMPLEMENTED;
917 }
918 
919 
920 /* Function 50 */
921 NET_API_STATUS
922 __stdcall
NetrDfsModifyPrefix(SRVSVC_HANDLE ServerName,GUID * Uid,WCHAR * Prefix)923 NetrDfsModifyPrefix(
924     SRVSVC_HANDLE ServerName,
925     GUID *Uid,
926     WCHAR *Prefix)
927 {
928     UNIMPLEMENTED;
929     return ERROR_CALL_NOT_IMPLEMENTED;
930 }
931 
932 
933 /* Function 51 */
934 NET_API_STATUS
935 __stdcall
NetrDfsFixLocalVolume(SRVSVC_HANDLE ServerName,WCHAR * VolumeName,unsigned long EntryType,unsigned long ServiceType,WCHAR * StgId,GUID * EntryUid,WCHAR * EntryPrefix,LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,unsigned long CreateDisposition)936 NetrDfsFixLocalVolume(
937     SRVSVC_HANDLE ServerName,
938     WCHAR *VolumeName,
939     unsigned long EntryType,
940     unsigned long ServiceType,
941     WCHAR *StgId,
942     GUID *EntryUid,
943     WCHAR *EntryPrefix,
944     LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
945     unsigned long CreateDisposition)
946 {
947     UNIMPLEMENTED;
948     return ERROR_CALL_NOT_IMPLEMENTED;
949 }
950 
951 
952 /* Function 52 */
953 NET_API_STATUS
954 __stdcall
NetrDfsManagerReportSiteInfo(SRVSVC_HANDLE ServerName,LPDFS_SITELIST_INFO * ppSiteInfo)955 NetrDfsManagerReportSiteInfo(
956     SRVSVC_HANDLE ServerName,
957     LPDFS_SITELIST_INFO *ppSiteInfo)
958 {
959     UNIMPLEMENTED;
960     return ERROR_CALL_NOT_IMPLEMENTED;
961 }
962 
963 
964 /* Function 53 */
965 NET_API_STATUS
966 __stdcall
NetrServerTransportDelEx(SRVSVC_HANDLE ServerName,DWORD Level,LPTRANSPORT_INFO Buffer)967 NetrServerTransportDelEx(
968     SRVSVC_HANDLE ServerName,
969     DWORD Level,
970     LPTRANSPORT_INFO Buffer)
971 {
972     UNIMPLEMENTED;
973     return ERROR_CALL_NOT_IMPLEMENTED;
974 }
975 
976 /* EOF */
977