1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 |
|
---|
4 | Winbind domain child functions
|
---|
5 |
|
---|
6 | Copyright (C) Stefan Metzmacher 2007
|
---|
7 |
|
---|
8 | This program is free software; you can redistribute it and/or modify
|
---|
9 | it under the terms of the GNU General Public License as published by
|
---|
10 | the Free Software Foundation; either version 3 of the License, or
|
---|
11 | (at your option) any later version.
|
---|
12 |
|
---|
13 | This program is distributed in the hope that it will be useful,
|
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
16 | GNU General Public License for more details.
|
---|
17 |
|
---|
18 | You should have received a copy of the GNU General Public License
|
---|
19 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #include "includes.h"
|
---|
23 | #include "winbindd.h"
|
---|
24 |
|
---|
25 | #undef DBGC_CLASS
|
---|
26 | #define DBGC_CLASS DBGC_WINBIND
|
---|
27 |
|
---|
28 | static const struct winbindd_child_dispatch_table domain_dispatch_table[] = {
|
---|
29 | {
|
---|
30 | .name = "LOOKUPSID",
|
---|
31 | .struct_cmd = WINBINDD_LOOKUPSID,
|
---|
32 | .struct_fn = winbindd_dual_lookupsid,
|
---|
33 | },{
|
---|
34 | .name = "LOOKUPNAME",
|
---|
35 | .struct_cmd = WINBINDD_LOOKUPNAME,
|
---|
36 | .struct_fn = winbindd_dual_lookupname,
|
---|
37 | },{
|
---|
38 | .name = "LOOKUPRIDS",
|
---|
39 | .struct_cmd = WINBINDD_LOOKUPRIDS,
|
---|
40 | .struct_fn = winbindd_dual_lookuprids,
|
---|
41 | },{
|
---|
42 | .name = "LIST_USERS",
|
---|
43 | .struct_cmd = WINBINDD_LIST_USERS,
|
---|
44 | .struct_fn = winbindd_dual_list_users,
|
---|
45 | },{
|
---|
46 | .name = "LIST_GROUPS",
|
---|
47 | .struct_cmd = WINBINDD_LIST_GROUPS,
|
---|
48 | .struct_fn = winbindd_dual_list_groups,
|
---|
49 | },{
|
---|
50 | .name = "LIST_TRUSTDOM",
|
---|
51 | .struct_cmd = WINBINDD_LIST_TRUSTDOM,
|
---|
52 | .struct_fn = winbindd_dual_list_trusted_domains,
|
---|
53 | },{
|
---|
54 | .name = "INIT_CONNECTION",
|
---|
55 | .struct_cmd = WINBINDD_INIT_CONNECTION,
|
---|
56 | .struct_fn = winbindd_dual_init_connection,
|
---|
57 | },{
|
---|
58 | .name = "GETDCNAME",
|
---|
59 | .struct_cmd = WINBINDD_GETDCNAME,
|
---|
60 | .struct_fn = winbindd_dual_getdcname,
|
---|
61 | },{
|
---|
62 | .name = "SHOW_SEQUENCE",
|
---|
63 | .struct_cmd = WINBINDD_SHOW_SEQUENCE,
|
---|
64 | .struct_fn = winbindd_dual_show_sequence,
|
---|
65 | },{
|
---|
66 | .name = "PAM_AUTH",
|
---|
67 | .struct_cmd = WINBINDD_PAM_AUTH,
|
---|
68 | .struct_fn = winbindd_dual_pam_auth,
|
---|
69 | },{
|
---|
70 | .name = "AUTH_CRAP",
|
---|
71 | .struct_cmd = WINBINDD_PAM_AUTH_CRAP,
|
---|
72 | .struct_fn = winbindd_dual_pam_auth_crap,
|
---|
73 | },{
|
---|
74 | .name = "PAM_LOGOFF",
|
---|
75 | .struct_cmd = WINBINDD_PAM_LOGOFF,
|
---|
76 | .struct_fn = winbindd_dual_pam_logoff,
|
---|
77 | },{
|
---|
78 | .name = "CHNG_PSWD_AUTH_CRAP",
|
---|
79 | .struct_cmd = WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP,
|
---|
80 | .struct_fn = winbindd_dual_pam_chng_pswd_auth_crap,
|
---|
81 | },{
|
---|
82 | .name = "PAM_CHAUTHTOK",
|
---|
83 | .struct_cmd = WINBINDD_PAM_CHAUTHTOK,
|
---|
84 | .struct_fn = winbindd_dual_pam_chauthtok,
|
---|
85 | },{
|
---|
86 | .name = "CHECK_MACHACC",
|
---|
87 | .struct_cmd = WINBINDD_CHECK_MACHACC,
|
---|
88 | .struct_fn = winbindd_dual_check_machine_acct,
|
---|
89 | },{
|
---|
90 | .name = "DUAL_USERINFO",
|
---|
91 | .struct_cmd = WINBINDD_DUAL_USERINFO,
|
---|
92 | .struct_fn = winbindd_dual_userinfo,
|
---|
93 | },{
|
---|
94 | .name = "GETUSERDOMGROUPS",
|
---|
95 | .struct_cmd = WINBINDD_GETUSERDOMGROUPS,
|
---|
96 | .struct_fn = winbindd_dual_getuserdomgroups,
|
---|
97 | },{
|
---|
98 | .name = "GETSIDALIASES",
|
---|
99 | .struct_cmd = WINBINDD_DUAL_GETSIDALIASES,
|
---|
100 | .struct_fn = winbindd_dual_getsidaliases,
|
---|
101 | },{
|
---|
102 | .name = "CCACHE_NTLM_AUTH",
|
---|
103 | .struct_cmd = WINBINDD_CCACHE_NTLMAUTH,
|
---|
104 | .struct_fn = winbindd_dual_ccache_ntlm_auth,
|
---|
105 | },{
|
---|
106 | .name = NULL,
|
---|
107 | }
|
---|
108 | };
|
---|
109 |
|
---|
110 | void setup_domain_child(struct winbindd_domain *domain,
|
---|
111 | struct winbindd_child *child)
|
---|
112 | {
|
---|
113 | setup_child(child, domain_dispatch_table,
|
---|
114 | "log.wb", domain->name);
|
---|
115 |
|
---|
116 | child->domain = domain;
|
---|
117 | }
|
---|