3 #include "bin/default/librpc/gen_ndr/s3compat_security.h"
5 struct _s3_compat_decode_security_descriptor_state {
6 struct tevent_context *ev;
7 struct dcerpc_call_handle *call;
8 struct decode_security_descriptor *r;
11 static struct tevent_req *_s3_compat_decode_security_descriptor_send(TALLOC_CTX *mem_ctx,
12 struct tevent_context *ev,
13 struct dcerpc_call_handle *call,
14 struct decode_security_descriptor *r)
16 struct tevent_req *req
17 struct _s3_compat_decode_security_descriptor_state *state;
18 struct pipes_struct *p;
20 req = tevent_req_create(mem_ctx, &state,
21 struct _s3_compat_decode_security_descriptor_state);
29 p = dcerpc_call_handle_get_pipes_struct(call);
31 _decode_security_descriptor(p, r);
34 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
35 tevent_req_nterror(status);
36 return tevent_req_post(req, ev);
40 return tevent_req_post(req, ev);
43 static NTSTATUS _s3_compat_decode_security_descriptor_recv(struct tevent_req *req)
45 return tevent_req_simple_recv_ntstatus(req);
48 struct _s3_compat_decode_sec_desc_buf_state {
49 struct tevent_context *ev;
50 struct dcerpc_call_handle *call;
51 struct decode_sec_desc_buf *r;
54 static struct tevent_req *_s3_compat_decode_sec_desc_buf_send(TALLOC_CTX *mem_ctx,
55 struct tevent_context *ev,
56 struct dcerpc_call_handle *call,
57 struct decode_sec_desc_buf *r)
59 struct tevent_req *req
60 struct _s3_compat_decode_sec_desc_buf_state *state;
61 struct pipes_struct *p;
63 req = tevent_req_create(mem_ctx, &state,
64 struct _s3_compat_decode_sec_desc_buf_state);
72 p = dcerpc_call_handle_get_pipes_struct(call);
74 _decode_sec_desc_buf(p, r);
77 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
78 tevent_req_nterror(status);
79 return tevent_req_post(req, ev);
83 return tevent_req_post(req, ev);
86 static NTSTATUS _s3_compat_decode_sec_desc_buf_recv(struct tevent_req *req)
88 return tevent_req_simple_recv_ntstatus(req);
91 struct _s3_compat_decode_security_token_state {
92 struct tevent_context *ev;
93 struct dcerpc_call_handle *call;
94 struct decode_security_token *r;
97 static struct tevent_req *_s3_compat_decode_security_token_send(TALLOC_CTX *mem_ctx,
98 struct tevent_context *ev,
99 struct dcerpc_call_handle *call,
100 struct decode_security_token *r)
102 struct tevent_req *req
103 struct _s3_compat_decode_security_token_state *state;
104 struct pipes_struct *p;
106 req = tevent_req_create(mem_ctx, &state,
107 struct _s3_compat_decode_security_token_state);
115 p = dcerpc_call_handle_get_pipes_struct(call);
117 _decode_security_token(p, r);
119 if (p->fault_state) {
120 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
121 tevent_req_nterror(status);
122 return tevent_req_post(req, ev);
125 tevent_req_done(req);
126 return tevent_req_post(req, ev);
129 static NTSTATUS _s3_compat_decode_security_token_recv(struct tevent_req *req)
131 return tevent_req_simple_recv_ntstatus(req);
134 struct _s3_compat_decode_security_unix_token_state {
135 struct tevent_context *ev;
136 struct dcerpc_call_handle *call;
137 struct decode_security_unix_token *r;
140 static struct tevent_req *_s3_compat_decode_security_unix_token_send(TALLOC_CTX *mem_ctx,
141 struct tevent_context *ev,
142 struct dcerpc_call_handle *call,
143 struct decode_security_unix_token *r)
145 struct tevent_req *req
146 struct _s3_compat_decode_security_unix_token_state *state;
147 struct pipes_struct *p;
149 req = tevent_req_create(mem_ctx, &state,
150 struct _s3_compat_decode_security_unix_token_state);
158 p = dcerpc_call_handle_get_pipes_struct(call);
160 _decode_security_unix_token(p, r);
162 if (p->fault_state) {
163 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
164 tevent_req_nterror(status);
165 return tevent_req_post(req, ev);
168 tevent_req_done(req);
169 return tevent_req_post(req, ev);
172 static NTSTATUS _s3_compat_decode_security_unix_token_recv(struct tevent_req *req)
174 return tevent_req_simple_recv_ntstatus(req);
178 static const struct dcerpc_call_entry_point_fns struct _s3_compat_security_fns[] = {
180 .send_fn = (dcerpc_call_entry_point_send_fn_t)
181 _s3_compat_decode_security_descriptor_send,
182 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
183 _s3_compat_decode_security_descriptor_recv,
186 .send_fn = (dcerpc_call_entry_point_send_fn_t)
187 _s3_compat_decode_sec_desc_buf_send,
188 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
189 _s3_compat_decode_sec_desc_buf_recv,
192 .send_fn = (dcerpc_call_entry_point_send_fn_t)
193 _s3_compat_decode_security_token_send,
194 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
195 _s3_compat_decode_security_token_recv,
198 .send_fn = (dcerpc_call_entry_point_send_fn_t)
199 _s3_compat_decode_security_unix_token_send,
200 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
201 _s3_compat_decode_security_unix_token_recv,
209 static const struct dcerpc_call_entry_point_vector _s3_compat_security_epv[] = {
210 .name = "_s3_compat_security",
211 .table = &ndr_table_security,
213 .fns = _s3_compat_security_fns,
216 NTSTATUS dcerpc_server_setup_s3compat_security(struct dcerpc_server *server)
218 return NT_STATUS_NOT_IMPLEMENTED;