s3:pdb_samba_dsdb: add pdb_samba_dsdb_get_trusteddom_creds
[obnox/samba/samba-obnox.git] / librpc / idl / winbind.idl
1 #include "idl_types.h"
2 import "lsa.idl", "netlogon.idl", "misc.idl", "security.idl", "idmap.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 winbind
13 {
14   /* Private methods */
15
16     void wbint_Ping(
17         [in] uint32 in_data,
18         [out] uint32 *out_data
19         );
20
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
26         );
27
28     NTSTATUS wbint_LookupSids(
29         [in] lsa_SidArray *sids,
30         [out,ref] lsa_RefDomainList *domains,
31         [out,ref] lsa_TransNameArray *names
32         );
33
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
40         );
41
42     typedef struct {
43         id_type type;
44         uint32 domain_index;
45         uint32 rid;
46         unixid xid;
47     } wbint_TransID;
48
49     typedef struct {
50         uint32 num_ids;
51         [size_is(num_ids)] wbint_TransID ids[];
52     } wbint_TransIDArray;
53
54     NTSTATUS wbint_Sids2UnixIDs(
55         [in] lsa_RefDomainList *domains,
56         [in,out] wbint_TransIDArray *ids
57         );
58
59     NTSTATUS wbint_Uid2Sid(
60         [in,unique,string,charset(UTF8)] char *dom_name,
61         [in] hyper uid,
62         [out] dom_sid *sid
63         );
64
65     NTSTATUS wbint_Gid2Sid(
66         [in,unique,string,charset(UTF8)] char *dom_name,
67         [in] hyper gid,
68         [out] dom_sid *sid
69         );
70
71     NTSTATUS wbint_AllocateUid(
72         [out] hyper *uid
73         );
74
75     NTSTATUS wbint_AllocateGid(
76         [out] hyper *gid
77         );
78
79     typedef [public] struct {
80         [string,charset(UTF8)] char *acct_name;
81         [string,charset(UTF8)] char *full_name;
82         [string,charset(UTF8)] char *homedir;
83         [string,charset(UTF8)] char *shell;
84         hyper primary_gid;
85         dom_sid user_sid;
86         dom_sid group_sid;
87     } wbint_userinfo;
88
89     NTSTATUS wbint_QueryUser(
90         [in] dom_sid *sid,
91         [out] wbint_userinfo *info
92         );
93
94     typedef [public] struct {
95         uint32 num_sids;
96         [size_is(num_sids)] dom_sid sids[];
97     } wbint_SidArray;
98
99     typedef [public] struct {
100         uint32 num_rids;
101         [size_is(num_rids)] uint32 rids[];
102     } wbint_RidArray;
103
104     NTSTATUS wbint_LookupUserAliases(
105         [in] wbint_SidArray *sids,
106         [out] wbint_RidArray *rids
107         );
108
109     NTSTATUS wbint_LookupUserGroups(
110         [in] dom_sid *sid,
111         [out] wbint_SidArray *sids
112         );
113
114     NTSTATUS wbint_QuerySequenceNumber(
115         [out] uint32 *sequence
116         );
117
118     typedef [public] struct {
119         dom_sid sid;
120         lsa_SidType type;
121         [string,charset(UTF8)] char *name;
122     } wbint_Principal;
123
124     typedef [public] struct {
125         int num_principals;
126         [size_is(num_principals)] wbint_Principal principals[];
127     } wbint_Principals;
128
129     NTSTATUS wbint_LookupGroupMembers(
130         [in] dom_sid *sid,
131         [in] lsa_SidType type,
132         [out] wbint_Principals *members
133         );
134
135     typedef [public] struct {
136         uint32 num_userinfos;
137         [size_is(num_userinfos)] wbint_userinfo userinfos[];
138     } wbint_userinfos;
139
140     NTSTATUS wbint_QueryUserList(
141         [out] wbint_userinfos *users
142         );
143
144     NTSTATUS wbint_QueryGroupList(
145         [out] wbint_Principals *groups
146         );
147
148     NTSTATUS wbint_DsGetDcName(
149         [in,string,charset(UTF8)]               char *domain_name,
150         [in,unique]                             GUID *domain_guid,
151         [in,string,unique,charset(UTF8)]        char *site_name,
152         [in]                                    uint32 flags,
153         [out]                                   netr_DsRGetDCNameInfo **dc_info
154         );
155
156     NTSTATUS wbint_LookupRids(
157         [in] dom_sid *domain_sid,
158         [in] wbint_RidArray *rids,
159         [out,string,charset(UTF8)] char **domain_name,
160         [out] wbint_Principals *names
161         );
162
163     NTSTATUS wbint_CheckMachineAccount(
164         );
165
166     NTSTATUS wbint_ChangeMachineAccount(
167         );
168
169     NTSTATUS wbint_PingDc(
170         [out,string,charset(UTF8)] char **dcname
171         );
172
173   /* Public methods available via IRPC */
174
175     typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
176     typedef [switch_type(uint16)] union netr_Validation netr_Validation;
177
178     /*
179      * do a netr_LogonSamLogon() against the right DC
180      */
181     NTSTATUS winbind_SamLogon(
182         [in]  uint16 logon_level,
183         [in]  [switch_is(logon_level)] netr_LogonLevel logon,
184         [in]  uint16 validation_level,
185         [out] [switch_is(validation_level)] netr_Validation validation,
186         [out] uint8 authoritative
187         );
188
189     NTSTATUS winbind_DsrUpdateReadOnlyServerDnsRecords(
190         [in,unique] [string,charset(UTF16)] uint16 *site_name,
191         [in] uint32 dns_ttl,
192         [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
193         );
194
195 }