-
Notifications
You must be signed in to change notification settings - Fork 2
/
v1.go
12875 lines (12336 loc) · 468 KB
/
v1.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package wkssvc
import (
"context"
"fmt"
"strings"
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
dtyp "github.com/oiweiwei/go-msrpc/msrpc/dtyp"
ndr "github.com/oiweiwei/go-msrpc/ndr"
)
var (
_ = context.Background
_ = fmt.Errorf
_ = utf16.Encode
_ = strings.TrimPrefix
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
_ = dtyp.GoPackage
)
var (
// import guard
GoPackage = "wkst"
)
var (
// Syntax UUID
WkssvcSyntaxUUID = &uuid.UUID{TimeLow: 0x6bffd098, TimeMid: 0xa112, TimeHiAndVersion: 0x3610, ClockSeqHiAndReserved: 0x98, ClockSeqLow: 0x33, Node: [6]uint8{0x46, 0xc3, 0xf8, 0x7e, 0x34, 0x5a}}
// Syntax ID
WkssvcSyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: WkssvcSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)
// wkssvc interface.
type WkssvcClient interface {
// The NetrWkstaGetInfo method returns details about the configuration of a remote computer,
// including the computer name and major and minor version numbers of the operating
// system.
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +--------------------------------+--------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +--------------------------------+--------------------------------------------------------------------+
// +--------------------------------+--------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +--------------------------------+--------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | The caller does not have the permissions to perform the operation. |
// +--------------------------------+--------------------------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +--------------------------------+--------------------------------------------------------------------+
GetInfo(context.Context, *GetInfoRequest, ...dcerpc.CallOption) (*GetInfoResponse, error)
// The NetrWkstaSetInfo method configures a remote computer according to the information
// structure passed in the call.
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +------------------------------------+----------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------+
// +------------------------------------+----------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+----------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+----------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +------------------------------------+----------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// If the Level parameter value is not valid, the server MUST fail the call as follows.
//
// Note All value ranges are inclusive.
//
// +----------------------------------------------------------------------------------+---------------------------------------------------+
// | INVALID LEVEL | FAILURE |
// | VALUE | PROCESSING |
// +----------------------------------------------------------------------------------+---------------------------------------------------+
// +----------------------------------------------------------------------------------+---------------------------------------------------+
// | 0x00000000--0x000001F5, 0x000001F7--0x000003F4, 0x000003F6--0x000003F9, | The server SHOULD return ERROR_INVALID_LEVEL.<31> |
// | 0x000003FB--0x00000415 0x00000417--0xFFFFFFFF | |
// +----------------------------------------------------------------------------------+---------------------------------------------------+
//
// Otherwise, if the Level parameter equals 0x000001F6, the server MUST store values
// from the WKSTA_INFO_502 structure WkstaInfo502 member (section 2.2.4.1) specified
// by the WkstaInfo parameter into elements of the ADM (section 3.2.1) as follows:
//
// * *wki502_keep_conn* stored in *Keep_Connection*
//
// * *wki502_max_cmds* stored in *Max_Commands*
//
// * *wki502_sess_timeout* stored in *Session_TimeOut*
//
// * *wki502_dormant_file_limit* stored in *DormantFileLimit*
//
// If the Level parameter equals 0x000003F5, the server MUST store values from the WKSTA_INFO_1013
// structure WkstaInfo1013 member (section 2.2.4.1) of the WkstaInfo parameter into
// elements of the ADM, as follows:
//
// * *wki1013_keep_conn* stored in *Keep_Connection*.
//
// If the Level parameter equals 0x000003FA, the server MUST store values from the WKSTA_INFO_1018
// structure WkstaInfo1018 member (section 2.2.4.1) of the WkstaInfo parameter into
// elements of the ADM, as follows:
//
// * *wki1018_sess_timeout* stored in *Session_TimeOut*.
//
// If the Level parameter equals 0x00000416, the server MUST store values from the WKSTA_INFO_1046
// structure WkstaInfo1046 member (section 2.2.4.1) of the WkstaInfo parameter into
// elements of the ADM, as follows:
//
// * *wki1046_dormant_file_limit* stored in *DormantFileLimit*.
SetInfo(context.Context, *SetInfoRequest, ...dcerpc.CallOption) (*SetInfoResponse, error)
// The NetrWkstaUserEnum method returns details about users who are currently active
// on a remote computer.
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2). The most common error codes are listed in the following table.
//
// +--------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +--------------------------------+----------------------------------------------------------------------------------+
// +--------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | ERROR_MORE_DATA 0x000000EA | More entries are available. The UserInfo buffer was not large enough to contain |
// | | all the entries. |
// +--------------------------------+----------------------------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// The server (2) SHOULD<35> enforce security measures to verify that the caller has
// the required permissions to execute this routine. If the server enforces security
// measures, and the caller does not have the required credentials, the server MUST
// fail the call with ERROR_ACCESS_DENIED. Specifications for determining the identity
// of the caller for the purpose of performing an access check are in [MS-RPCE] section
// 3.3.3.1.3.
//
// If the Level member of the WKSTA_USER_ENUM_STRUCT structure passed in the UserInfo
// parameter does not equal 0x00000000 or 0x00000001, the server MUST fail the call.
//
// If the Level member equals 0x00000000, the server MUST return an array of the names
// of users currently logged on the computer by filling the WKSTA_USER_INFO_0_CONTAINER
// structure (section 2.2.5.14) in the WkstaUserInfo field of the UserInfo parameter.
//
// If the Level member equals 0x00000001, the server MUST return an array of the names
// and domain details of each user currently logged on the computer, and a list of OtherDomains
// (section 3.2.1.3) in the computer.
//
// If the PreferredMaximumLength parameter equals MAX_PREFERRED_LENGTH (section 2.2.1.3),
// the server MUST return all the requested data. Otherwise, if the PreferredMaximumLength
// is insufficient to hold all the entries, then the server MUST return the maximum
// number of entries that fit in the UserInfo buffer and return ERROR_MORE_DATA.
//
// The following rules specify processing of the ResumeHandle parameter:
//
// * If the ResumeHandle parameter is either NULL or points to 0x00000000, the enumeration
// MUST start from the beginning of the list of the currently logged on users. <36>
// ( def80006-2495-4571-8a93-1668e0f8af31#Appendix_A_36 )
//
// * If the ResumeHandle parameter points to a non-zero value, the server MUST continue
// enumeration based on the value of ResumeHandle. The server is not required to maintain
// any state between calls to the NetrWkstaUserEnum method.
//
// * If the client specifies a ResumeHandle , and if the server returns ERROR_MORE_DATA,
// the server MUST set the value to which ResumeHandle points to an implementation-specific
// value that allow the server to continue with this enumeration on a subsequent call
// to this method, with the same value for ResumeHandle.
//
// The server is not required to maintain any state between calls to the NetrWkstaUserEnum
// method. If the server returns NERR_Success or ERROR_MORE_DATA, it MUST set the TotalEntries
// parameter to equal the total number of entries that could have been enumerated from
// the current resume position.
UserEnum(context.Context, *UserEnumRequest, ...dcerpc.CallOption) (*UserEnumResponse, error)
// Opnum3NotUsedOnWire operation.
// Opnum3NotUsedOnWire
// Opnum4NotUsedOnWire operation.
// Opnum4NotUsedOnWire
// The NetrWkstaTransportEnum method provides details about the transport protocols
// currently enabled for use by the SMB network redirector on a remote computer.
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +--------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +--------------------------------+----------------------------------------------------------------------------------+
// +--------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | NERR_BufTooSmall 0x0000084B | More entries are available. The TransportInfo buffer was not large enough to |
// | | contain all the entries. |
// +--------------------------------+----------------------------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// The server SHOULD<38> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures,
// and the caller does not have the required credentials, the server MUST fail the call
// with ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller
// for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// For any other conditions, this method MUST return any other value, and the client
// MUST treat all other values the same.
//
// If the Level member in the WKSTA_TRANSPORT_ENUM_STRUCT structure passed in the TransportInfo
// parameter does not equal 0x00000000, the server MUST fail the call.
//
// If the Level member is 0x00000000, the server MUST return an array of details about
// the transport protocols currently enabled for use by the SMB network redirector by
// filling the WKSTA_TRANSPORT_INFO_0_CONTAINER structure WkstaTransportInfo member
// (section 2.2.5.15) of the TransportInfo parameter for each transport in TransportList
// (section 3.2.1.4), as follows:
//
// * *wkti0_transport_address* set to *Transport.Address*
//
// * *wkti0_transport_name* set to *Transport.Name*
//
// * *wkti0_number_of_vcs* set to *Transport.VC_Count*
//
// * *wkti0_wan_ish* set to *Transport.Wannish*
//
// If the PreferredMaximumLength parameter equals MAX_PREFERRED_LENGTH (section 2.2.1.3),
// the server MUST return all the requested data. If the PreferredMaximumLength is insufficient
// to hold all the entries, the server MUST return the maximum number of entries that
// fit in the TransportInfo buffer and return NERR_BufTooSmall.
//
// The following rules specify processing of the ResumeHandle parameter:
//
// * If the ResumeHandle parameter is either NULL or points to 0x00000000, the enumeration
// MUST start from the beginning of the list of the currently enabled transport protocols.
// <39> ( def80006-2495-4571-8a93-1668e0f8af31#Appendix_A_39 )
//
// * If the ResumeHandle parameter is nonzero, the server MUST begin enumeration based
// on the value of ResumeHandle. The server is not required to maintain any state between
// calls invoking the *NetrWkstaTransportEnum* method.
//
// * If the client specified a ResumeHandle , and if the server returns NERR_BufTooSmall,
// the server MUST set ResumeHandle to an implementation-specific value that allows
// the server to continue with this enumeration on a subsequent call to this method,
// using the same value for ResumeHandle.
//
// The server is not required to maintain any state between calls to the NetrWkstaTransportEnum
// method. If the server returns NERR_Success, it MUST set the TotalEntries parameter
// to equal the total number of entries that could have been enumerated from the current
// resume position. If the server returns NERR_BufTooSmall, it SHOULD set the TotalEntries
// value to the total number of entries that could have been enumerated from the current
// resume position.<40>
TransportEnum(context.Context, *TransportEnumRequest, ...dcerpc.CallOption) (*TransportEnumResponse, error)
// The NetrWkstaTransportAdd method enables the SMB network redirector to use a transport
// protocol on a remote computer.
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +------------------------------------+----------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------+
// +------------------------------------+----------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+----------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+----------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +------------------------------------+----------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +------------------------------------+----------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// If the Level parameter is not equal to zero, the server MUST fail the call and return
// ERROR_INVALID_LEVEL.
//
// If the server does not support this method then it SHOULD be processed as follows.
//
// If any of the input parameters are invalid, the server SHOULD return ERROR_INVALID_PARAMETER.
// Otherwise, it SHOULD<41> return NERR_Success.
//
// The server SHOULD<42> enforce security measures to verify that the caller has authorization
// to execute this routine. If the server enforces security measures and the caller
// does not have the required credentials, the server SHOULD fail the call with ERROR_ACCESS_DENIED.
// Specifications for determining the identity of the caller for the purpose of performing
// an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// The TransportInfo parameter specifies details about the transport protocol that is
// to be enabled. If any of the input parameters are invalid, the server MUST return
// ERROR_INVALID_PARAMETER. If the caller has passed the ErrorParameter parameter, the
// server MUST return the zero-based index of the first member of the structure the
// TransportInfo parameter points to that was invalid.
//
// If this method call is successful, the server MUST store values from members of the
// WKSTA_TRANSPORT_INFO_0 structure passed in the TransportInfo parameter into the ADM
// elements for each transport in TransportList (section 3.2.1.4) as follows:
//
// * *wkti0_transport_address* stored in *Transport.Address*
//
// * *wkti0_transport_name* stored in *Transport.Name*
//
// * *wkti0_number_of_vcs* stored in *Transport.VC_Count*
//
// * *wkti0_wan_ish* stored in *Transport.Wannish*
TransportAdd(context.Context, *TransportAddRequest, ...dcerpc.CallOption) (*TransportAddResponse, error)
// The NetrWkstaTransportDel method disables the use of a transport protocol by the
// SMB network redirector on a remote computer. The transport can be re-enabled by calling
// the NetrWkstaTransportAdd method (section 3.2.4.5).
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is invalid. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_OPEN_FILES 0x00002401 | There are open files, or printer handles are using the transport protocol |
// | | pending on this connection. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_DEVICE_IN_USE 0x00002404 | The device or open directory handle is using the transport protocol and cannot |
// | | be disconnected. |
// +------------------------------------+----------------------------------------------------------------------------------+
//
// If the ForceLevel parameter does not equal 0x00000000, 0x00000001, or 0x00000002,
// the server MUST fail the call with ERROR_INVALID_PARAMETER. If the ForceLevel parameter
// is 0x00000000 or 0x00000001 and any open directory handle is using the transport
// protocol provided in the TransportName field, the server MUST fail the call with
// ERROR_DEVICE_IN_USE. If the ForceLevel parameter is 0x00000000 or 0x00000001 and
// any open files or printer handles are using the transport protocol provided in the
// TransportName field, fail the call with ERROR_OPEN_FILES.
//
// If the server does not support this method, it SHOULD<43> return NERR_Success if
// the ForceLevel parameter is valid. If the server does support this method, it MUST
// be processed as follows.
//
// The server SHOULD<44> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures
// and the caller does not have the required credentials, the server MUST fail the call
// with ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller
// for the purpose of performing an access check are in ([MS-RPCE] section 3.3.3.1.3.
//
// If any open file or printer handles are using the transport protocol that this call
// is trying to disable, the server behavior MUST depend on the value of the ForceLevel
// parameter. If the ForceLevel parameter is 0x00000000 or 0x00000001, the server MUST
// fail the call. If the ForceLevel parameter is 0x00000002, the server MUST forcefully
// close all open handles and disable the transport protocol.
//
// If this method call is successful, the server MUST remove this protocol from its
// list of currently enabled transport protocols.
TransportDelete(context.Context, *TransportDeleteRequest, ...dcerpc.CallOption) (*TransportDeleteResponse, error)
// The NetrUseAdd method establishes a connection between the workstation server and
// an SMB server. Workstation servers SHOULD NOT allow this method to be invoked remotely<45>
// and SHOULD return ERROR_CALL_NOT_IMPLEMENTED.
//
// Return Values: When the message processing result meets the description in the right-hand
// column of the following table, this method MUST return one of the following values
// ([MS-ERREF] section 2.2).
//
// +---------------------------------------+------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +---------------------------------------+------------------------------------------------+
// +---------------------------------------+------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +---------------------------------------+------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +---------------------------------------+------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +---------------------------------------+------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +---------------------------------------+------------------------------------------------+
// | ERROR_CALL_NOT_IMPLEMENTED 0x00000078 | This function is not supported on this system. |
// +---------------------------------------+------------------------------------------------+
//
// The server SHOULD<46> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures
// and the caller does not have the required credentials, the server SHOULD fail the
// call with ERROR_ACCESS_DENIED. Specifications for determining the identity of the
// caller for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// The Level parameter determines the type of structure that the client has used to
// specify details about the new connection. The value MUST be 0, 1, 2, or 3. If the
// Level parameter is not equal to one of the valid values, the server MUST fail the
// call with an ERROR_INVALID_LEVEL error code.
//
// * If the Level parameter is 0x00000000, the Buffer parameter points to a *USE_INFO_0*
// structure.
//
// * If the Level parameter is 0x00000001, the Buffer parameter points to a *USE_INFO_1*
// structure.
//
// * If the Level parameter is 0x00000002, the Buffer parameter points to a *USE_INFO_2*
// structure.
//
// * If the Level parameter is 0x00000003, the Buffer parameter points to a *USE_INFO_3*
// structure.
UseAdd(context.Context, *UseAddRequest, ...dcerpc.CallOption) (*UseAddResponse, error)
// The NetrUseGetInfo method retrieves details from a remote workstation about a connection
// to a shared resource on an SMB server. The server SHOULD NOT allow this method to
// be invoked remotely<47> and SHOULD return ERROR_CALL_NOT_IMPLEMENTED.
//
// Return Values: When the message processing result meets the description in the right-hand
// column of the following table, this method MUST return one of the following values
// ([MS-ERREF] section 2.2).
//
// +------------------------------------+----------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------+
// +------------------------------------+----------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+----------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+----------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +------------------------------------+----------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +------------------------------------+----------------------------------------------+
// | NERR_UseNotFound 0x000008CA | The network connection could not be found. |
// +------------------------------------+----------------------------------------------+
//
// The server SHOULD<48> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures
// and the caller does not have the required credentials, the server MUST fail the call
// with ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller
// for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// The UseName parameter specifies the local device name or shared resource name for
// which to return information. The server MUST canonicalize UseName ([MS-SRVS] section
// 3.1.4.33). This MUST be a nonempty, null-terminated UTF-16 string; otherwise, the
// server MUST fail the call with an ERROR_INVALID_PARAMETER error code.
UseGetInfo(context.Context, *UseGetInfoRequest, ...dcerpc.CallOption) (*UseGetInfoResponse, error)
// The NetrUseDel function terminates a connection from the workstation server to a
// shared resource on an SMB server. The server SHOULD NOT<49> allow this method to
// be invoked remotely and SHOULD return ERROR_CALL_NOT_IMPLEMENTED.
//
// Return Values: When the message processing result meets the description in the right-hand
// column of the following table, this method MUST return one of the following values
// ([MS-ERREF] section 2.2).
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The force level is invalid. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_DEVICE_IN_USE 0x00002404 | The connection handle is in use and cannot be disconnected. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_REDIR_PAUSED 0x00000048 | Remote access to the specified printer or serial communications device has been |
// | | paused. |
// +------------------------------------+----------------------------------------------------------------------------------+
//
// The server SHOULD<50> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures
// and the caller does not have the required credentials, the server MUST fail the call
// with ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller
// for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// The UseName parameter specifies the local device name or shared resource name for
// which to delete a tree connection. The server MUST canonicalize UseName ([MS-SRVS]
// section 3.1.4.33). This MUST be a nonempty, null-terminated UTF-16 string; otherwise,
// the server MUST fail the call with an ERROR_INVALID_PARAMETER error code.
UseDelete(context.Context, *UseDeleteRequest, ...dcerpc.CallOption) (*UseDeleteResponse, error)
// The NetrUseEnum method lists open connections between a workstation server and a
// remote SMB server. The server SHOULD NOT allow this method to be invoked remotely<51>
// and SHOULD return ERROR_CALL_NOT_IMPLEMENTED.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value ([MS-ERREF] section 2.2). The most common error codes are listed in the
// following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_MORE_DATA 0x000000EA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferredMaximumLength. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NOT_ENOUGH_MEMORY 0x00000008 | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | NERR_BufTooSmall 0x0000084B | The client request succeeded. More entries are available. The buffer size that |
// | | is specified by PreferredMaximumLength was too small to fit even a single entry. |
// +------------------------------------+----------------------------------------------------------------------------------+
//
// The server SHOULD<52> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the server enforces security measures
// and the caller does not have the required credentials, the server MUST fail the call
// with ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller
// for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.
//
// The InfoStruct parameter has a Level member. The value of Level MUST be 0, 1, or
// 2. If the Level member is not equal to one of the valid values, the server MUST fail
// the call with an ERROR_INVALID_LEVEL error code.
UseEnum(context.Context, *UseEnumRequest, ...dcerpc.CallOption) (*UseEnumResponse, error)
// Opnum12NotUsedOnWire operation.
// Opnum12NotUsedOnWire
// The NetrWorkstationStatisticsGet method returns various statistics about the SMB
// network redirector on a remote computer.
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +------------------------------------+--------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +------------------------------------+--------------------------------------------+
// +------------------------------------+--------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +------------------------------------+--------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +------------------------------------+--------------------------------------------+
// | ERROR_INVALID_LEVEL 0x0000007C | The information level is invalid. |
// +------------------------------------+--------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is invalid. |
// +------------------------------------+--------------------------------------------+
//
// If the Level parameter does not equal 0x00000000, the server MUST fail the call and
// return ERROR_INVALID_LEVEL.
//
// If the Options parameter does not equal 0x00000000, the server MUST fail the call
// and return ERROR_INVALID_PARAMETER. The server SHOULD<54> enforce security measures
// to verify that the caller has the required permissions to execute this routine. If
// the server enforces security measures and the caller does not have the required credentials,
// the server MUST fail the call and return ERROR_ACCESS_DENIED.
WorkstationStatisticsGet(context.Context, *WorkstationStatisticsGetRequest, ...dcerpc.CallOption) (*WorkstationStatisticsGetResponse, error)
// Opnum14NotUsedOnWire operation.
// Opnum14NotUsedOnWire
// Opnum15NotUsedOnWire operation.
// Opnum15NotUsedOnWire
// Opnum16NotUsedOnWire operation.
// Opnum16NotUsedOnWire
// Opnum17NotUsedOnWire operation.
// Opnum17NotUsedOnWire
// Opnum18NotUsedOnWire operation.
// Opnum18NotUsedOnWire
// Opnum19NotUsedOnWire operation.
// Opnum19NotUsedOnWire
// The NetrGetJoinInformation method retrieves details about the workgroup or domain
// to which the specified computer is joined.
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+---------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+---------------------------------------------+
// +----------------------------------------+---------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+---------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+---------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+---------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
GetJoinInformation(context.Context, *GetJoinInformationRequest, ...dcerpc.CallOption) (*GetJoinInformationResponse, error)
// Opnum21NotUsedOnWire operation.
// Opnum21NotUsedOnWire
// The NetrJoinDomain2 method uses encrypted credentials to join a computer to a domain
// or a workgroup.<57>
//
// For high-level, informative discussions about domain controller location and domain
// join and unjoin, see [MS-ADOD] sections 2.7.7 and 3.1. For more information, see
// the example in section 4.3.
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+----------------------------------------------------------------------------------+
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_FILE_NOT_FOUND 0x00000002 | The object was not found. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NOT_SUPPORTED 0x00000032 | The request is not supported. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is not correct. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | The parameter is incorrect. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_PASSWORD_RESTRICTION 0x0000052D | Unable to update the password. The value provided for the new password does not |
// | | meet the length, complexity, or history requirements of the domain. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_LOGON_FAILURE 0x0000052E | Logon failure: unknown user name or bad password. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NONE_MAPPED 0x00000534 | The account was not found. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_DOMAIN_ROLE 0x0000054A | The name of a domain controller was provided in the DomainNameParam parameter, |
// | | and validation of that domain controller failed. Validation is specified in the |
// | | message-processing steps for the section "Domain Join" later. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NO_SUCH_DOMAIN 0x0000054B | The specified domain either does not exist or could not be contacted. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | RPC_S_CALL_IN_PROGRESS 0x000006FF | A remote procedure call is already in progress.<66> |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_UserExists 0x000008B0 | The user account already exists. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_SetupAlreadyJoined 0x00000A83 | This computer is already joined to a domain. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_SetupDomainController 0x00000A85 | This computer is a domain controller and cannot be unjoined from a domain. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_InvalidWorkgroupName 0x00000A87 | The specified workgroup name is invalid. |
// +----------------------------------------+----------------------------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
JoinDomain2(context.Context, *JoinDomain2Request, ...dcerpc.CallOption) (*JoinDomain2Response, error)
// The NetrUnjoinDomain2 method uses encrypted credentials to unjoin a computer from
// a workgroup or domain.<76>
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+----------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+----------------------------------------------------------------------------+
// +----------------------------------------+----------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is not correct. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | ERROR_INVALID_FLAGS 0x000003EC | Invalid option flags are specified. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | NERR_SetupNotJoined 0x00000A84 | This computer is not currently joined to a domain. |
// +----------------------------------------+----------------------------------------------------------------------------+
// | NERR_SetupDomainController 0x00000A85 | This computer is a domain controller and cannot be unjoined from a domain. |
// +----------------------------------------+----------------------------------------------------------------------------+
//
// Unless otherwise noted, if the server encounters an error during message processing,
// the server SHOULD revert any state changes made, MUST stop message processing, and
// MUST return the error to the caller.<78>
UnjoinDomain2(context.Context, *UnjoinDomain2Request, ...dcerpc.CallOption) (*UnjoinDomain2Response, error)
// The NetrRenameMachineInDomain2 method uses encrypted credentials to change the locally
// persisted variable ComputerNameNetBIOS (section 3.2.1.5) and to optionally rename
// the computer account for a server currently in a domain, without first removing the
// computer from the domain and then adding it back.<81>
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+-----------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+-----------------------------------------------------------------+
// +----------------------------------------+-----------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+-----------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+-----------------------------------------------------------------+
// | ERROR_NOT_SUPPORTED 0x00000032 | The request is not supported. |
// +----------------------------------------+-----------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is not correct. |
// +----------------------------------------+-----------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | The parameter is incorrect. |
// +----------------------------------------+-----------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+-----------------------------------------------------------------+
// | NERR_SetupNotJoined 0x00000A84 | This computer is not currently joined to a domain. |
// +----------------------------------------+-----------------------------------------------------------------+
// | NERR_SetupDomainController 0x00000A85 | This computer is a domain controller and cannot be renamed.<82> |
// +----------------------------------------+-----------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// Unless otherwise noted, if the server encounters an error during message processing,
// the server SHOULD revert any state changes made, MUST stop message processing, and
// MUST return the error to the caller.<83>
RenameMachineInDomain2(context.Context, *RenameMachineInDomain2Request, ...dcerpc.CallOption) (*RenameMachineInDomain2Response, error)
// The NetrValidateName2 method verifies the validity of a computer, workgroup, or domain
// name (2).<87>
//
// Return Values: When the message processing result matches the description in column
// 2 of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+---------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+---------------------------------------------------------------------------+
// +----------------------------------------+---------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_DUP_NAME 0x00000034 | The connection was denied because a duplicate name exists on the network. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is incorrect. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | The parameter is incorrect. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_INVALID_NAME 0x0000007B | The file name, directory name, or volume label syntax is incorrect. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_INVALID_DOMAINNAME 0x000004BC | The format of the specified domain name (2) is invalid. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | ERROR_NO_SUCH_DOMAIN 0x0000054B | The specified domain either does not exist or could not be contacted. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | NERR_InvalidComputer 0x0000092F | This computer name is invalid. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | NERR_InvalidWorkgroupName 0x00000A87 | The specified workgroup name is invalid. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | DNS_ERROR_NON_RFC_NAME 0x00002554 | The Internet host name does not comply with RFC specifications. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | DNS_ERROR_INVALID_NAME_CHAR 0x00002558 | The Internet host name contains an invalid character. |
// +----------------------------------------+---------------------------------------------------------------------------+
// | RPC_E_REMOTE_DISABLED 0x8001011C | Remote calls are not allowed for this process. |
// +----------------------------------------+---------------------------------------------------------------------------+
//
// The following definition is used in the specification of message processing that
// follows.
//
// * PasswordString : A Unicode ( 3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8
// ) UTF-8 ( 3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_409411c4-b4ed-4ab6-b0ee-6d7815f85a35
// ) string containing a password in cleartext ( 3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_f6e0fdd0-cbc1-4c9d-93b8-f25125f9c5ef
// ).
ValidateName2(context.Context, *ValidateName2Request, ...dcerpc.CallOption) (*ValidateName2Response, error)
// The NetrGetJoinableOUs2 method returns a list of organizational units (OUs) in which
// the user can create an object.<94>
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+----------------------------------------------------------------------------------+
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NOT_ENOUGH_MEMORY 0x00000008 | Not enough storage is available to process this command. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | A parameter is incorrect.<95> |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_InvalidAPI 0x0000085E | The requested API is not supported on domain controllers. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_DefaultJoinRequired 0x00000A86 | The destination domain controller does not support creating machine accounts in |
// | | OUs. |
// +----------------------------------------+----------------------------------------------------------------------------------+
GetJoinableOUs2(context.Context, *GetJoinableOUs2Request, ...dcerpc.CallOption) (*GetJoinableOUs2Response, error)
// The NetrAddAlternateComputerName method adds an alternate name for a specified server
// (2).<99>
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+---------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+---------------------------------------------------------------------+
// +----------------------------------------+---------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_NOT_SUPPORTED 0x00000032 | This method is not supported by this server. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is incorrect. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_NAME 0x0000007B | The file name, directory name, or volume label syntax is incorrect. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_FLAGS 0x000003EC | Reserved contains an invalid value. |
// +----------------------------------------+---------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+---------------------------------------------------------------------+
// | RPC_S_CALL_IN_PROGRESS 0x000006FF | A remote procedure call is already in progress.<101> |
// +----------------------------------------+---------------------------------------------------------------------+
// | DNS_ERROR_INVALID_NAME_CHAR 0x00002558 | The Internet host name contains an invalid character. |
// +----------------------------------------+---------------------------------------------------------------------+
//
// Unless otherwise noted, if the server encounters an error during message processing,
// it SHOULD revert any state changes made, MUST stop message processing, and MUST return
// the error to the caller.<102>
AddAlternateComputerName(context.Context, *AddAlternateComputerNameRequest, ...dcerpc.CallOption) (*AddAlternateComputerNameResponse, error)
// The NetrRemoveAlternateComputerName method removes an alternate name for a specified
// server (2).<106>
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+---------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+---------------------------------------------------------------------+
// +----------------------------------------+---------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_NOT_SUPPORTED 0x00000032 | This method is not supported by this server. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is not correct. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | One of the function parameters is not valid. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_NAME 0x0000007B | An invalid name parameter is specified. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_INVALID_FLAGS 0x000003EC | The Reserved parameter contains an invalid value. |
// +----------------------------------------+---------------------------------------------------------------------+
// | ERROR_NOT_FOUND 0x00000490 | AlternateName was not found in the current list of alternate names. |
// +----------------------------------------+---------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+---------------------------------------------------------------------+
// | RPC_S_CALL_IN_PROGRESS 0x000006FF | A remote procedure call is already in progress.<108> |
// +----------------------------------------+---------------------------------------------------------------------+
// | DNS_ERROR_INVALID_NAME_CHAR 0x00002558 | The Internet host name contains an invalid character. |
// +----------------------------------------+---------------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// Unless otherwise noted, if the server encounters an error during message processing,
// the server SHOULD revert any state changes made, MUST stop message processing, and
// MUST return the error to the caller.<109>
RemoveAlternateComputerName(context.Context, *RemoveAlternateComputerNameRequest, ...dcerpc.CallOption) (*RemoveAlternateComputerNameResponse, error)
// The NetrSetPrimaryComputerName method sets the primary computer name for a specified
// server (2).<113>
//
// Return Values: When the message processing result matches the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+----------------------------------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+----------------------------------------------------------------------------------+
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_Success 0x00000000 | The operation completed successfully. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_ACCESS_DENIED 0x00000005 | Access is denied. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_NOT_SUPPORTED 0x00000032 | This method is not supported by this server. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PASSWORD 0x00000056 | The specified network password is incorrect. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_PARAMETER 0x00000057 | The parameter is incorrect. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007B ERROR_INVALID_NAME | An invalid name parameter is specified. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | ERROR_INVALID_FLAGS 0x000003EC | Reserved contains an invalid value. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | RPC_S_PROTSEQ_NOT_SUPPORTED 0x000006A7 | The RPC protocol sequence is not supported. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | RPC_S_CALL_IN_PROGRESS 0x000006FF | A remote procedure call is already in progress.<115> |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | NERR_DefaultJoinRequired 0x00000A86 | The destination domain controller does not support creating machine accounts in |
// | | OUs. |
// +----------------------------------------+----------------------------------------------------------------------------------+
// | DNS_ERROR_INVALID_NAME_CHAR 0x00002558 | The Internet host name contains an invalid character. |
// +----------------------------------------+----------------------------------------------------------------------------------+
//
// Any other return value MUST conform to the error code requirements in Protocol Details
// (section 3).
//
// Unless otherwise noted, if the server encounters an error during message processing,
// the server SHOULD revert any state changes made, MUST stop message processing, and
// MUST return the error to the caller.<116>
SetPrimaryComputerName(context.Context, *SetPrimaryComputerNameRequest, ...dcerpc.CallOption) (*SetPrimaryComputerNameResponse, error)
// The NetrEnumerateComputerNames method returns a list of computer names for a specified
// server (2). The results of the query are determined by the type of the name. <120>
//
// Return Values: When the message processing result meets the description in column
// two of the following table, this method MUST return one of the following values ([MS-ERREF]
// section 2.2).
//
// +----------------------------------------+----------------------------------------------------------+
// | | |
// | VALUE/CODE | MEANING |
// | | |
// +----------------------------------------+----------------------------------------------------------+