This is the start of a bit of a rewrite of winbindd's connection handling.
[ira/wip.git] / source3 / nsswitch / winbindd_proto.h
1 #ifndef _WINBINDD_PROTO_H_
2 #define _WINBINDD_PROTO_H_
3 /* This file is automatically generated with "make proto". DO NOT EDIT */
4
5
6 /* The following definitions come from nsswitch/winbindd.c  */
7
8 int main(int argc, char **argv);
9
10 /* The following definitions come from nsswitch/winbindd_cache.c  */
11
12 void winbindd_cache_init(void);
13 void winbindd_store_user_cache(char *domain, 
14                                struct getpwent_user *sam_entries,
15                                int num_sam_entries);
16 void winbindd_store_group_cache(char *domain,
17                                 struct acct_info *sam_entries,
18                                 int num_sam_entries);
19 void winbindd_store_user_cache_entry(char *domain, char *user_name, 
20                                      struct winbindd_pw *pw);
21 void winbindd_store_uid_cache_entry(char *domain, uid_t uid, 
22                                     struct winbindd_pw *pw);
23 void winbindd_store_group_cache_entry(char *domain, char *group_name, 
24                                       struct winbindd_gr *gr, void *extra_data,
25                                       int extra_data_len);
26 void winbindd_store_gid_cache_entry(char *domain, gid_t gid, 
27                                     struct winbindd_gr *gr, void *extra_data,
28                                     int extra_data_len);
29 BOOL winbindd_fetch_user_cache(char *domain_name, 
30                                struct getpwent_user **sam_entries,
31                                int *num_entries);
32 BOOL winbindd_fetch_group_cache(char *domain_name, 
33                                 struct acct_info **sam_entries,
34                                 int *num_entries);
35 BOOL winbindd_fetch_user_cache_entry(char *domain_name, char *user, 
36                                      struct winbindd_pw *pw);
37 BOOL winbindd_fetch_uid_cache_entry(char *domain_name, uid_t uid, 
38                                     struct winbindd_pw *pw);
39 BOOL winbindd_fetch_group_cache_entry(char *domain_name, char *group, 
40                                       struct winbindd_gr *gr,
41                                       void **extra_data, int *extra_data_len);
42 BOOL winbindd_fetch_gid_cache_entry(char *domain_name, gid_t gid,
43                                     struct winbindd_gr *gr,
44                                     void **extra_data, int *extra_data_len);
45 void winbindd_flush_cache(void);
46 void winbindd_cache_dump_status(void);
47
48 /* The following definitions come from nsswitch/winbindd_cm.c  */
49
50 BOOL cm_get_dc_name(char *domain, fstring srv_name);
51 CLI_POLICY_HND *cm_get_lsa_handle(char *domain);
52 CLI_POLICY_HND *cm_get_sam_handle(char *domain);
53 CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain);
54 CLI_POLICY_HND *cm_get_sam_user_handle(char *domain, char *user);
55 CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, char *group);
56
57 /* The following definitions come from nsswitch/winbindd_group.c  */
58
59 enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state 
60                                                   *state);
61 enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state 
62                                                 *state);
63 enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state);
64 enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state);
65 enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state);
66 enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state);
67 enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state);
68
69 /* The following definitions come from nsswitch/winbindd_idmap.c  */
70
71 BOOL winbindd_idmap_get_uid_from_rid(char *domain_name, uint32 user_rid, 
72                                      uid_t *uid);
73 BOOL winbindd_idmap_get_gid_from_rid(char *domain_name, uint32 group_rid, 
74                                      gid_t *gid);
75 BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain,
76                      BOOL isgroup);
77 BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid,
78                                      struct winbindd_domain **domain);
79 BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, 
80                                      struct winbindd_domain **domain);
81 BOOL winbindd_idmap_init(void);
82 void winbindd_idmap_dump_status(void);
83
84 /* The following definitions come from nsswitch/winbindd_misc.c  */
85
86 enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state);
87 enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
88                                                    *state);
89
90 /* The following definitions come from nsswitch/winbindd_pam.c  */
91
92 enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) ;
93 enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ;
94 enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state);
95
96 /* The following definitions come from nsswitch/winbindd_sid.c  */
97
98 enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state);
99 enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state);
100 enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state);
101 enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state);
102 enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state);
103 enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state);
104
105 /* The following definitions come from nsswitch/winbindd_user.c  */
106
107 enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state 
108                                                  *state) ;
109 enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state 
110                                                 *state);
111 enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state);
112 enum winbindd_result winbindd_endpwent(struct winbindd_cli_state *state);
113 enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state);
114 enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state);
115
116 /* The following definitions come from nsswitch/winbindd_util.c  */
117
118 BOOL domain_handles_open(struct winbindd_domain *domain);
119 void winbindd_kill_all_connections(void);
120 void establish_connections(BOOL force_reestablish) ;
121 BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain);
122 BOOL get_domain_info(struct winbindd_domain *domain);
123 BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid,
124                                  enum SID_NAME_USE *type);
125 BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, fstring name,
126                                  enum SID_NAME_USE *type);
127 BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain,
128                               uint32 user_rid, SAM_USERINFO_CTR **user_info);
129 BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,
130                                 uint32 user_rid, uint32 *num_groups,
131                                 DOM_GID **user_groups);
132 BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain,
133                               uint32 group_rid, uint32 *num_names, 
134                               uint32 **rid_mem, char ***names, 
135                               uint32 **name_types);
136 struct winbindd_domain *find_domain_from_name(char *domain_name);
137 struct winbindd_domain *find_domain_from_sid(DOM_SID *sid);
138 void free_getent_state(struct getent_state *state);
139 BOOL winbindd_param_init(void);
140 NTSTATUS winbindd_query_dispinfo(struct winbindd_domain *domain,
141                                  uint32 *start_ndx, uint16 info_level, 
142                                  uint32 *num_entries, SAM_DISPINFO_CTR *ctr);
143 BOOL check_domain_env(char *domain_env, char *domain);
144 void parse_domain_user(char *domuser, fstring domain, fstring user);
145 #endif /* _PROTO_H_ */