c7e3dd6ff2d9dbc4a5b36dd0e393e92333ec3c78
[samba.git] / source3 / winbindd / winbindd_rpc.h
1 /*
2  * Unix SMB/CIFS implementation.
3  *
4  * Winbind rpc backend functions
5  *
6  * Copyright (c) 2000-2003 Tim Potter
7  * Copyright (c) 2001      Andrew Tridgell
8  * Copyright (c) 2005      Volker Lendecke
9  * Copyright (c) 2008      Guenther Deschner (pidl conversion)
10  * Copyright (c) 2010      Andreas Schneider <asn@samba.org>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
24  */
25
26 #ifndef _WINBINDD_RPC_H_
27 #define _WINBINDD_RPC_H_
28
29 /* Query display info for a domain */
30 NTSTATUS rpc_query_user_list(TALLOC_CTX *mem_ctx,
31                              struct rpc_pipe_client *samr_pipe,
32                              struct policy_handle *samr_policy,
33                              const struct dom_sid *domain_sid,
34                              uint32_t **prids);
35
36 NTSTATUS rpc_enum_dom_groups(TALLOC_CTX *mem_ctx,
37                              struct rpc_pipe_client *samr_pipe,
38                              struct policy_handle *sam_policy,
39                              uint32_t *pnum_info,
40                              struct wb_acct_info **pinfo);
41
42 /* List all domain groups */
43 NTSTATUS rpc_enum_local_groups(TALLOC_CTX *mem_ctx,
44                                struct rpc_pipe_client *samr_pipe,
45                                struct policy_handle *samr_policy,
46                                uint32_t *pnum_info,
47                                struct wb_acct_info **pinfo);
48
49 /* Lookup groups a user is a member of. */
50 NTSTATUS rpc_lookup_usergroups(TALLOC_CTX *mem_ctx,
51                                struct rpc_pipe_client *samr_pipe,
52                                struct policy_handle *samr_policy,
53                                const struct dom_sid *domain_sid,
54                                const struct dom_sid *user_sid,
55                                uint32_t *pnum_groups,
56                                struct dom_sid **puser_grpsids);
57
58 NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx,
59                                 struct rpc_pipe_client *samr_pipe,
60                                 struct policy_handle *samr_policy,
61                                 uint32_t num_sids,
62                                 const struct dom_sid *sids,
63                                 uint32_t *pnum_aliases,
64                                 uint32_t **palias_rids);
65
66 /* Lookup group membership given a rid.   */
67 NTSTATUS rpc_lookup_groupmem(TALLOC_CTX *mem_ctx,
68                              struct rpc_pipe_client *samr_pipe,
69                              struct policy_handle *samr_policy,
70                              const char *domain_name,
71                              const struct dom_sid *domain_sid,
72                              const struct dom_sid *group_sid,
73                              enum lsa_SidType type,
74                              uint32_t *pnum_names,
75                              struct dom_sid **psid_mem,
76                              char ***pnames,
77                              uint32_t **pname_types);
78
79 /* Find the sequence number for a domain */
80 NTSTATUS rpc_sequence_number(TALLOC_CTX *mem_ctx,
81                              struct rpc_pipe_client *samr_pipe,
82                              struct policy_handle *samr_policy,
83                              const char *domain_name,
84                              uint32_t *pseq);
85
86 /* Get a list of trusted domains */
87 NTSTATUS rpc_trusted_domains(TALLOC_CTX *mem_ctx,
88                              struct rpc_pipe_client *lsa_pipe,
89                              struct policy_handle *lsa_policy,
90                              uint32_t *pnum_trusts,
91                              struct netr_DomainTrust **ptrusts);
92
93 #endif /* _WINBINDD_RPC_H_ */