2 Unix SMB/CIFS implementation.
3 async implementation of WINBINDD_CHANGE_MACHINE_ACCT
4 Copyright (C) Volker Lendecke 2009
5 Copyright (C) Guenther Deschner 2009
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "librpc/gen_ndr/ndr_winbind_c.h"
24 #include "source4/lib/messaging/irpc.h"
26 struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state
{
27 struct irpc_message
*msg
;
28 struct winbind_DsrUpdateReadOnlyServerDnsRecords
*req
;
31 static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct tevent_req
*subreq
);
33 NTSTATUS
wb_irpc_DsrUpdateReadOnlyServerDnsRecords(struct irpc_message
*msg
,
34 struct winbind_DsrUpdateReadOnlyServerDnsRecords
*req
)
36 struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state
*s
;
37 struct tevent_req
*subreq
;
38 struct winbindd_domain
*domain
;
40 DEBUG(5, ("wb_irpc_DsrUpdateReadOnlyServerDnsRecords called\n"));
42 s
= talloc(msg
, struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state
);
43 NT_STATUS_HAVE_NO_MEMORY(s
);
48 domain
= find_our_domain();
50 return NT_STATUS_NO_SUCH_DOMAIN
;
53 subreq
= dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_send(s
, winbind_event_context(),
54 dom_child_handle(domain
),
59 return NT_STATUS_NO_MEMORY
;
62 tevent_req_set_callback(subreq
,
63 wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback
,
66 msg
->defer_reply
= true;
70 static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct tevent_req
*subreq
)
72 struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state
*s
=
73 tevent_req_callback_data(subreq
,
74 struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state
);
75 NTSTATUS status
, result
;
77 DEBUG(5, ("wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback called\n"));
79 status
= dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_recv(subreq
, s
, &result
);
80 any_nt_status_not_ok(status
, result
, &status
);
83 irpc_send_reply(s
->msg
, status
);