s4:librpc/rpc: make use of tstream_tls_params_client_lpcfg()
[samba.git] / librpc / idl / winbind.idl
blob50e36884129cd1c7897677cb4fea726bcd60ef73
1 #include "idl_types.h"
2 import "lsa.idl", "netlogon.idl", "samr.idl", "misc.idl", "security.idl", "idmap.idl";
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
12 interface winbind
14 /* Private methods */
16 NTSTATUS wbint_Ping(
17 [in] uint32 in_data,
18 [out] uint32 *out_data
21 NTSTATUS wbint_LookupSid(
22 [in] dom_sid *sid,
23 [out] lsa_SidType *type,
24 [out,string,charset(UTF8)] char **domain,
25 [out,string,charset(UTF8)] char **name
28 NTSTATUS wbint_LookupSids(
29 [in] lsa_SidArray *sids,
30 [out,ref] lsa_RefDomainList *domains,
31 [out,ref] lsa_TransNameArray *names
34 NTSTATUS wbint_LookupName(
35 [in,string,charset(UTF8)] char *domain,
36 [in,string,charset(UTF8)] char *name,
37 [in] uint32 flags,
38 [out] lsa_SidType *type,
39 [out] dom_sid *sid
42 typedef struct {
43 id_type type_hint;
44 uint32 domain_index;
45 uint32 rid;
46 unixid xid;
47 } wbint_TransID;
49 typedef struct {
50 uint32 num_ids;
51 [size_is(num_ids)] wbint_TransID ids[];
52 } wbint_TransIDArray;
54 NTSTATUS wbint_Sids2UnixIDs(
55 [in] lsa_RefDomainList *domains,
56 [in,out] wbint_TransIDArray *ids
59 NTSTATUS wbint_UnixIDs2Sids(
60 [in,string,charset(UTF8)] char *domain_name,
61 [in] dom_sid domain_sid,
62 [in] uint32 num_ids,
63 [in,out] unixid xids[num_ids],
64 [out] dom_sid sids[num_ids]
67 NTSTATUS wbint_AllocateUid(
68 [out] hyper *uid
71 NTSTATUS wbint_AllocateGid(
72 [out] hyper *gid
75 typedef [public] struct {
76 [string,charset(UTF8)] char *domain_name;
77 [string,charset(UTF8)] char *acct_name;
78 [string,charset(UTF8)] char *full_name;
79 [string,charset(UTF8)] char *homedir;
80 [string,charset(UTF8)] char *shell;
81 hyper uid;
82 hyper primary_gid;
83 [string,charset(UTF8)] char *primary_group_name;
84 dom_sid user_sid;
85 dom_sid group_sid;
86 } wbint_userinfo;
88 NTSTATUS wbint_GetNssInfo(
89 [in,out] wbint_userinfo *info
92 typedef [public] struct {
93 uint32 num_sids;
94 [size_is(num_sids)] dom_sid sids[];
95 } wbint_SidArray;
97 typedef [public] struct {
98 uint32 num_rids;
99 [size_is(num_rids)] uint32 rids[];
100 } wbint_RidArray;
102 NTSTATUS wbint_LookupUserAliases(
103 [in] wbint_SidArray *sids,
104 [out] wbint_RidArray *rids
107 NTSTATUS wbint_LookupUserGroups(
108 [in] dom_sid *sid,
109 [out] wbint_SidArray *sids
112 NTSTATUS wbint_QuerySequenceNumber(
113 [out] uint32 *sequence
116 typedef [public] struct {
117 dom_sid sid;
118 lsa_SidType type;
119 [string,charset(UTF8)] char *name;
120 } wbint_Principal;
122 typedef [public] struct {
123 uint32 num_principals;
124 [size_is(num_principals)] wbint_Principal principals[];
125 } wbint_Principals;
127 NTSTATUS wbint_LookupGroupMembers(
128 [in] dom_sid *sid,
129 [in] lsa_SidType type,
130 [out] wbint_Principals *members
133 NTSTATUS wbint_LookupAliasMembers(
134 [in] dom_sid *sid,
135 [in] lsa_SidType type,
136 [out] wbint_SidArray *sids
139 typedef [public] struct {
140 uint32 num_userinfos;
141 [size_is(num_userinfos)] wbint_userinfo userinfos[];
142 } wbint_userinfos;
144 NTSTATUS wbint_QueryGroupList(
145 [out] wbint_Principals *groups
148 NTSTATUS wbint_QueryUserRidList(
149 [out] wbint_RidArray *rids
152 NTSTATUS wbint_DsGetDcName(
153 [in,string,charset(UTF8)] char *domain_name,
154 [in,unique] GUID *domain_guid,
155 [in,string,unique,charset(UTF8)] char *site_name,
156 [in] uint32 flags,
157 [out] netr_DsRGetDCNameInfo **dc_info
160 NTSTATUS wbint_LookupRids(
161 [in] dom_sid *domain_sid,
162 [in] wbint_RidArray *rids,
163 [out,string,charset(UTF8)] char **domain_name,
164 [out] wbint_Principals *names
167 NTSTATUS wbint_CheckMachineAccount(
170 NTSTATUS wbint_ChangeMachineAccount(
171 [in,unique,string,charset(UTF8)] char *dcname
174 NTSTATUS wbint_PingDc(
175 [out,string,charset(UTF8)] char **dcname
178 NTSTATUS wbint_ListTrustedDomains(
179 [in,string,charset(UTF8)] char *client_name,
180 [in] hyper client_pid,
181 [out,ref] netr_DomainTrustList *domains
184 typedef [public] struct {
185 uint16 level;
186 [switch_is(level)] netr_Validation *validation;
187 [string,charset(UTF8)] char *krb5ccname;
188 } wbint_Validation;
190 typedef [public] struct {
191 [string,charset(UTF8)] char *username;
192 [string,charset(UTF8),flag(NDR_SECRET)] char *password;
193 [string,charset(UTF8)] char *krb5_cc_type;
194 hyper uid;
195 } wbint_AuthUserInfo;
197 NTSTATUS wbint_PamAuth(
198 [in,string,charset(UTF8)] char *client_name,
199 [in] hyper client_pid,
200 [in] uint32 flags,
201 [in] wbint_AuthUserInfo *info,
202 [in] wbint_SidArray *require_membership_of_sid,
203 [out,ref] wbint_Validation *validation
206 typedef [public] struct {
207 uint16 level;
208 [switch_is(level)] netr_Validation *validation;
209 } wbint_PamAuthCrapValidation;
211 NTSTATUS wbint_PamAuthCrap(
212 [in,string,charset(UTF8)] char *client_name,
213 [in] hyper client_pid,
214 [in] uint32 flags,
215 [in, string,charset(UTF8)] char *user,
216 [in, string,charset(UTF8)] char *domain,
217 [in, string,charset(UTF8)] char *workstation,
218 [in,flag(NDR_SECRET)] DATA_BLOB lm_resp,
219 [in,flag(NDR_SECRET)] DATA_BLOB nt_resp,
220 [in,flag(NDR_SECRET)] DATA_BLOB chal,
221 [in] uint32 logon_parameters,
222 [in] wbint_SidArray *require_membership_of_sid,
223 [out,ref] uint8 *authoritative,
224 [out,ref] wbint_PamAuthCrapValidation *validation
227 NTSTATUS wbint_PamLogOff(
228 [in,string,charset(UTF8)] char *client_name,
229 [in] hyper client_pid,
230 [in] uint32 flags,
231 [in,string,charset(UTF8)] char *user,
232 [in,string,charset(UTF8)] char *krb5ccname,
233 [in] hyper uid
236 NTSTATUS wbint_PamAuthCrapChangePassword(
237 [in,string,charset(UTF8)] char *client_name,
238 [in] hyper client_pid,
239 [in,string,charset(UTF8)] char *user,
240 [in,string,charset(UTF8)] char *domain,
241 [in,flag(NDR_SECRET)] DATA_BLOB new_nt_pswd,
242 [in,flag(NDR_SECRET)] DATA_BLOB old_nt_hash_enc,
243 [in,flag(NDR_SECRET)] DATA_BLOB new_lm_pswd,
244 [in,flag(NDR_SECRET)] DATA_BLOB old_lm_hash_enc
247 NTSTATUS wbint_PamAuthChangePassword(
248 [in,string,charset(UTF8)] char *client_name,
249 [in] hyper client_pid,
250 [in] uint32 flags,
251 [in,string,charset(UTF8)] char *user,
252 [in,string,charset(UTF8),flag(NDR_SECRET)] char *old_password,
253 [in,string,charset(UTF8),flag(NDR_SECRET)] char *new_password,
254 [out,ref] samr_DomInfo1 **dominfo,
255 [out,ref] samPwdChangeReason *reject_reason
258 typedef [enum16bit] enum {
259 WB_DOMINFO_DOMAIN_UNKNOWN = 0x0000,
260 WB_DOMINFO_DOMAIN_NATIVE = 0x0001,
261 WB_DOMINFO_DOMAIN_AD = 0x0002,
262 WB_DOMINFO_DOMAIN_PRIMARY = 0x0004,
263 WB_DOMINFO_DOMAIN_OFFLINE = 0x0008
264 } DomainInfoFlags;
266 NTSTATUS wbint_InitConnection(
267 [in,string,charset(UTF8)] char *dcname,
268 [out,string,charset(UTF8)] char **name,
269 [out,string,charset(UTF8)] char **alt_name,
270 [out,ref] dom_sid *sid,
271 [out,ref] DomainInfoFlags *flags
274 /* Public methods available via IRPC */
276 typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
277 typedef [switch_type(uint16)] union netr_Validation netr_Validation;
280 * do a netr_LogonSamLogon() against the right DC
282 NTSTATUS winbind_SamLogon(
283 [in] uint16 logon_level,
284 [in] [switch_is(logon_level)] netr_LogonLevel logon,
285 [in] uint16 validation_level,
286 [out] [switch_is(validation_level)] netr_Validation validation,
287 [out] uint8 authoritative
290 NTSTATUS winbind_DsrUpdateReadOnlyServerDnsRecords(
291 [in,unique] [string,charset(UTF16)] uint16 *site_name,
292 [in] uint32 dns_ttl,
293 [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
297 * do a netr_LogonControl2Ex() against the right DC
299 typedef [v1_enum] enum netr_LogonControlCode netr_LogonControlCode;
300 typedef [switch_type(netr_LogonControlCode)] union netr_CONTROL_DATA_INFORMATION netr_CONTROL_DATA_INFORMATION;
301 typedef [switch_type(uint32)] union netr_CONTROL_QUERY_INFORMATION netr_CONTROL_QUERY_INFORMATION;
303 WERROR winbind_LogonControl(
304 [in] netr_LogonControlCode function_code,
305 [in] uint32 level,
306 [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
307 [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
311 * do a netr_GetForestTrustInformation() against the right DC
313 WERROR winbind_GetForestTrustInformation(
314 [in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
315 [in] uint32 flags,
316 [out,ref] lsa_ForestTrustInformation **forest_trust_info
319 NTSTATUS winbind_SendToSam(
320 [in] netr_SendToSamBase message