ef2a69bbc942914422cc700cdffa5b7bf1f8050a
[metze/old/v3-2-winbind-ndr.git] / source / librpc / idl / winbind_protocol.idl
1 /*
2  * Winbind (NDR-based) Protocol
3  */
4
5 import "security.idl";
6
7 [ uuid("b6608c99-0407-401b-96d3-7bcda67232af"),
8   version(1.0),
9   pointer_default(unique)
10 ] interface winbind_protocol
11 {
12         const uint32 WINBIND_MAX_LENGTH_PRIVILEGED      = 0x0FFFFFFF;
13         const uint32 WINBIND_MAX_LENGTH_UNPRIVILEGED    = 0x00020000;
14
15         typedef [public,v1_enum] enum {
16                 WINBIND_STATUS_OK                       = 0x00000000,
17                 WINBIND_STATUS_UNKNOWN_ERROR            = 0x57420001,
18                 WINBIND_STATUS_NOT_IMPLEMENTED          = 0x57420002,
19                 WINBIND_STATUS_NOT_SUPPORTED            = 0x57420003,
20                 WINBIND_STATUS_NO_MEMORY                = 0x57420004,
21                 WINBIND_STATUS_INVALID_PARAMETER        = 0x57420005,
22                 WINBIND_STATUS_INVALID_LEVEL            = 0x57420006,
23                 WINBIND_STATUS_UNKNOWN_LEVEL            = 0x57420007,
24                 WINBIND_STATUS_DOMAIN_OFFLINE           = 0x57420008
25         } winbind_status;
26
27         const uint32 WINBIND_STATUS_FOOBAR              = WINBIND_STATUS_UNKNOWN_ERROR;
28
29         typedef [bitmap16bit] bitmap {
30                 WINBIND_HEADER_VERSION          = 0x0001
31         } winbind_header_version;
32
33         typedef [bitmap32bit] bitmap {
34                 WINBIND_HEADER_FLAGS_RESPONSE   = 0x00000001,
35                 WINBIND_HEADER_FLAGS_ERROR      = 0x00000002
36         } winbind_header_flags;
37
38         const uint32 WINBIND_HEADER_SIZE        = 0x10;
39         [public] struct winbind_header {
40                 uint32 length;
41                 [charset(DOS),value("WBPT")] uint8 magic[4];
42                 [value(WINBIND_HEADER_VERSION)] winbind_header_version version;
43                 uint16 opnum;
44                 winbind_header_flags flags;
45         };
46
47         /*
48          * Just tell me winbindd is running
49          */
50         winbind_status winbind_ping();
51
52         /*
53          * - Get the interface version
54          * - Find the location of the privileged pipe
55          */
56         winbind_status winbind_interface_details(/*TODO*/);
57
58         /*
59          * Get users and groups
60          */
61         winbind_status winbind_getpwnam(/*TODO*/);
62         winbind_status winbind_getpwuid(/*TODO*/);
63
64         winbind_status winbind_getgrnam(/*TODO*/);
65         winbind_status winbind_getgrgid(/*TODO*/);
66
67         winbind_status winbind_getgroups(/*TODO*/);
68
69         /*
70          * Enumerate users and groups
71          */
72         winbind_status winbind_setpwent(/*TODO*/);
73         winbind_status winbind_endpwent(/*TODO*/);
74         winbind_status winbind_getpwent(/*TODO*/);
75
76         winbind_status winbind_setgrent(/*TODO*/);
77         winbind_status winbind_endgrent(/*TODO*/);
78         winbind_status winbind_getgrent(/*TODO*/);
79
80         /*
81          * PAM authenticate and password change
82          */
83         winbind_status winbind_pam_auth(/*TODO*/);
84         winbind_status winbind_pam_auth_crap(/*TODO*/);
85         winbind_status winbind_pam_chauthtok(/*TODO*/);
86         winbind_status winbind_pam_logoff(/*TODO*/);
87         winbind_status winbind_pam_chng_paswd_auth_crap(/*TODO*/);
88
89         /*
90          * List various things
91          */
92
93         /* List w/o rid->id mapping */
94         winbind_status winbind_list_users(/*TODO*/);
95
96         /* List w/o rid->id mapping */
97         winbind_status winbind_list_groups(/*TODO*/);
98
99         winbind_status winbind_list_trustdom(/*TODO*/);
100
101         /*
102          * Lookup functions
103          */
104
105         winbind_status winbind_lookup_sid(/*TODO*/);
106         winbind_status winbind_lookup_name(/*TODO*/);
107         winbind_status winbind_lookup_rids(/*TODO*/);
108
109         /*
110          * SID conversion
111          */
112
113         winbind_status winbind_sid_to_uid(/*TODO*/);
114         winbind_status winbind_sid_to_gid(/*TODO*/);
115         winbind_status winbind_sids_to_xids(/*TODO*/);
116         winbind_status winbind_uid_to_sid(/*TODO*/);
117         winbind_status winbind_gid_to_sid(/*TODO*/);
118
119         winbind_status winbind_allocate_uid(/*TODO*/);
120         winbind_status winbind_allocate_gid(/*TODO*/);
121         winbind_status winbind_set_mapping(/*TODO*/);
122         winbind_status winbind_set_hwm(/*TODO*/);
123
124         /*
125          * Miscellaneous other stuff
126          */
127
128         winbind_status winbind_dump_maps(/*TODO*/);
129
130         /* Check machine account pw works */
131         winbind_status winbind_check_machcc(/*TODO*/);
132         /* Various bit of info.  Currently just tidbits */
133         winbind_status winbind_info_fixname(/*TODO*/);
134         /* The domain this winbind server is a member of (lp_workgroup()) */
135         winbind_status winbind_domain_name(/*TODO*/);
136
137         /* Most of what we know from struct winbind_domain */
138         struct winbind_domain_info_compat {
139                 [string,charset(UTF8)] uint8    netbios_name[];
140                 [string,charset(UTF8)] uint8    *dns_name;
141                 [ref] dom_sid                   *sid;
142                 boolean32                       is_native_mode;
143                 boolean32                       is_active_directory;
144                 boolean32                       is_primary;
145         };
146
147         typedef [v1_enum] enum {
148                 WINBIND_DOMAIN_INFO_LEVEL_COMPAT = 1
149         } winbind_domain_info_level;
150
151         typedef [switch_type(winbind_domain_info_level)] union {
152         [case(WINBIND_DOMAIN_INFO_LEVEL_COMPAT)]
153                 struct winbind_domain_info_compat compat;
154         } winbind_domain_info;
155
156         winbind_status winbind_get_domain_info(
157                 [in,string,charset(UTF8)] uint8 domain_name[],
158                 [in,unique,string,charset(UTF8)] uint8 *dc_name,
159                 [in,out] winbind_domain_info_level *level,
160                 [out,switch_is(*level)] winbind_domain_info *domain_info
161         );
162
163         /* Issue a GetDCName or DsGetDCName Request */
164         winbind_status winbind_get_dc_info(/*TODO*/);
165
166         /* display sequence numbers of domains */
167         winbind_status winbind_show_sequence(/*TODO*/);
168
169         /*
170          * WINS commands
171          */
172
173         winbind_status winbind_wins_byip(/*TODO*/);
174         winbind_status winbind_wins_byname(/*TODO*/);
175
176         /* this is like GETGRENT but gives an empty group list */
177         winbind_status winbind_getgrlist(/*TODO*/);
178
179         /* The netbios name of the server */
180         winbind_status winbind_netbios_name(/*TODO*/);
181
182
183         /* return a list of group sids for a user sid */
184         winbind_status winbind_getusersids(/*TODO*/);
185
186         /* Various group queries */
187         winbind_status winbind_getuserdomgroups(/*TODO*/);
188
189         /*
190          * Blocking calls that are not allowed on the main winbind pipe, only
191          * between parent and children
192          */
193         winbind_status winbind_dual_sid2gid(/*TODO*/);
194         winbind_status winbind_dual_sid2uid(/*TODO*/);
195         winbind_status winbind_dual_sids2xids(/*TODO*/);
196         winbind_status winbind_dual_uid2sid(/*TODO*/);
197         winbind_status winbind_dual_gid2sid(/*TODO*/);
198         winbind_status winbind_dual_set_mapping(/*TODO*/);
199         winbind_status winbind_dual_set_hwm(/*TODO*/);
200         winbind_status winbind_dual_dump_maps(/*TODO*/);
201
202         /*
203          * Wrapper around possibly blocking unix nss calls
204          */
205         winbind_status winbind_dual_uid2name(/*TODO*/);
206         winbind_status winbind_dual_name2uid(/*TODO*/);
207         winbind_status winbind_dual_gid2name(/*TODO*/);
208         winbind_status winbind_dual_name2gid(/*TODO*/);
209
210         winbind_status winbind_dual_userinfo(/*TODO*/);
211         winbind_status winbind_dual_getsidaliases(/*TODO*/);
212
213         /*
214          * Complete the challenge phase of the NTLM authentication
215          * protocol using cached password.
216          */
217         winbind_status winbind_ccache_ntlmauth(/*TODO*/);
218 }