s3: Fix bug 7842: WINBIND_LOOKUPRIDS does not return the proper domain name
[metze/samba/wip.git] / source3 / librpc / idl / wbint.idl
1 #include "idl_types.h"
2 import "lsa.idl", "netlogon.idl", "misc.idl", "security.idl";
3
4 [
5     uuid("bf09192c-ed60-4928-9dff-d0d7bcb03ed8"),
6     endpoint("ncalrpc:"),
7     pointer_default(unique),
8     version(1.0),
9     helpstring("winbind parent-child protocol"),
10     no_srv_register
11 ]
12 interface wbint
13 {
14     void wbint_Ping(
15         [in] uint32 in_data,
16         [out] uint32 *out_data
17         );
18
19     NTSTATUS wbint_LookupSid(
20         [in] dom_sid *sid,
21         [out] lsa_SidType *type,
22         [out,string,charset(UTF8)] char **domain,
23         [out,string,charset(UTF8)] char **name
24         );
25
26     NTSTATUS wbint_LookupName(
27         [in,string,charset(UTF8)] char *domain,
28         [in,string,charset(UTF8)] char *name,
29         [in] uint32 flags,
30         [out] lsa_SidType *type,
31         [out] dom_sid *sid
32         );
33
34     NTSTATUS wbint_Sid2Uid(
35         [in,unique,string,charset(UTF8)] char *dom_name,
36         [in] dom_sid *sid,
37         [out] hyper *uid
38         );
39
40     NTSTATUS wbint_Sid2Gid(
41         [in,unique,string,charset(UTF8)] char *dom_name,
42         [in] dom_sid *sid,
43         [out] hyper *gid
44         );
45
46     NTSTATUS wbint_Uid2Sid(
47         [in,unique,string,charset(UTF8)] char *dom_name,
48         [in] hyper uid,
49         [out] dom_sid *sid
50         );
51
52     NTSTATUS wbint_Gid2Sid(
53         [in,unique,string,charset(UTF8)] char *dom_name,
54         [in] hyper gid,
55         [out] dom_sid *sid
56         );
57
58     NTSTATUS wbint_AllocateUid(
59         [out] hyper *uid
60         );
61
62     NTSTATUS wbint_AllocateGid(
63         [out] hyper *gid
64         );
65
66     typedef [public] struct {
67         [string,charset(UTF8)] char *acct_name;
68         [string,charset(UTF8)] char *full_name;
69         [string,charset(UTF8)] char *homedir;
70         [string,charset(UTF8)] char *shell;
71         hyper primary_gid;
72         dom_sid user_sid;
73         dom_sid group_sid;
74     } wbint_userinfo;
75
76     NTSTATUS wbint_QueryUser(
77         [in] dom_sid *sid,
78         [out] wbint_userinfo *info
79         );
80
81     typedef [public] struct {
82         uint32 num_sids;
83         [size_is(num_sids)] dom_sid sids[];
84     } wbint_SidArray;
85
86     typedef [public] struct {
87         uint32 num_rids;
88         [size_is(num_rids)] uint32 rids[];
89     } wbint_RidArray;
90
91     NTSTATUS wbint_LookupUserAliases(
92         [in] wbint_SidArray *sids,
93         [out] wbint_RidArray *rids
94         );
95
96     NTSTATUS wbint_LookupUserGroups(
97         [in] dom_sid *sid,
98         [out] wbint_SidArray *sids
99         );
100
101     NTSTATUS wbint_QuerySequenceNumber(
102         [out] uint32 *sequence
103         );
104
105     typedef [public] struct {
106         dom_sid sid;
107         lsa_SidType type;
108         [string,charset(UTF8)] char *name;
109     } wbint_Principal;
110
111     typedef [public] struct {
112         int num_principals;
113         [size_is(num_principals)] wbint_Principal principals[];
114     } wbint_Principals;
115
116     NTSTATUS wbint_LookupGroupMembers(
117         [in] dom_sid *sid,
118         [in] lsa_SidType type,
119         [out] wbint_Principals *members
120         );
121
122     typedef [public] struct {
123         uint32 num_userinfos;
124         [size_is(num_userinfos)] wbint_userinfo userinfos[];
125     } wbint_userinfos;
126
127     NTSTATUS wbint_QueryUserList(
128         [out] wbint_userinfos *users
129         );
130
131     NTSTATUS wbint_QueryGroupList(
132         [out] wbint_Principals *groups
133         );
134
135     NTSTATUS wbint_DsGetDcName(
136         [in,string,charset(UTF8)]               char *domain_name,
137         [in,unique]                             GUID *domain_guid,
138         [in,string,unique,charset(UTF8)]        char *site_name,
139         [in]                                    uint32 flags,
140         [out]                                   netr_DsRGetDCNameInfo **dc_info
141         );
142
143     NTSTATUS wbint_LookupRids(
144         [in] wbint_RidArray *rids,
145         [out,string,charset(UTF8)] char **domain_name,
146         [out] wbint_Principals *names
147         );
148
149     NTSTATUS wbint_CheckMachineAccount(
150         );
151
152     NTSTATUS wbint_ChangeMachineAccount(
153         );
154
155     NTSTATUS wbint_PingDc(
156         );
157 }