Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source3/librpc/gen_ndr/ndr_open_files.h"
5 :
6 : #include "librpc/gen_ndr/ndr_server_id.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_file_id.h"
9 : #include "librpc/gen_ndr/ndr_smb2_lease_struct.h"
10 : #include "librpc/gen_ndr/ndr_misc.h"
11 12210 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_entry(struct ndr_push *ndr, int ndr_flags, const struct share_mode_entry *r)
12 : {
13 12210 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14 12210 : if (ndr_flags & NDR_SCALARS) {
15 12210 : NDR_CHECK(ndr_push_align(ndr, 8));
16 12210 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->pid));
17 12210 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->op_mid));
18 12210 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->op_type));
19 12210 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->client_guid));
20 12210 : NDR_CHECK(ndr_push_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
21 12210 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask));
22 12210 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->share_access));
23 12210 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->private_options));
24 12210 : NDR_CHECK(ndr_push_timeval(ndr, NDR_SCALARS, &r->time));
25 12210 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
26 12210 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uid));
27 12210 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
28 12210 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->name_hash));
29 : /* [skip] 'r->stale' */
30 12210 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
31 : }
32 12210 : if (ndr_flags & NDR_BUFFERS) {
33 12210 : NDR_CHECK(ndr_push_timeval(ndr, NDR_BUFFERS, &r->time));
34 : /* [skip] 'r->stale' */
35 : }
36 12210 : return NDR_ERR_SUCCESS;
37 : }
38 :
39 21381 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_entry(struct ndr_pull *ndr, int ndr_flags, struct share_mode_entry *r)
40 : {
41 21381 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
42 21381 : if (ndr_flags & NDR_SCALARS) {
43 21381 : NDR_CHECK(ndr_pull_align(ndr, 8));
44 21381 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->pid));
45 21381 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->op_mid));
46 21381 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->op_type));
47 21381 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->client_guid));
48 21381 : NDR_CHECK(ndr_pull_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
49 21381 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask));
50 21381 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->share_access));
51 21381 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->private_options));
52 21381 : NDR_CHECK(ndr_pull_timeval(ndr, NDR_SCALARS, &r->time));
53 21381 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
54 21381 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uid));
55 21381 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
56 21381 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_hash));
57 : /* [skip] 'r->stale' */
58 21381 : NDR_ZERO_STRUCT(r->stale);
59 21381 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
60 : }
61 21381 : if (ndr_flags & NDR_BUFFERS) {
62 21381 : NDR_CHECK(ndr_pull_timeval(ndr, NDR_BUFFERS, &r->time));
63 : }
64 21381 : return NDR_ERR_SUCCESS;
65 : }
66 :
67 0 : static void ndr_print_flags_share_mode_entry(struct ndr_print *ndr, const char *name, int unused, const struct share_mode_entry *r)
68 : {
69 0 : ndr_print_share_mode_entry(ndr, name, r);
70 0 : }
71 :
72 0 : _PUBLIC_ void ndr_print_share_mode_entry(struct ndr_print *ndr, const char *name, const struct share_mode_entry *r)
73 : {
74 0 : ndr_print_struct(ndr, name, "share_mode_entry");
75 0 : if (r == NULL) { ndr_print_null(ndr); return; }
76 0 : ndr->depth++;
77 0 : ndr_print_server_id(ndr, "pid", &r->pid);
78 0 : ndr_print_hyper(ndr, "op_mid", r->op_mid);
79 0 : ndr_print_uint16(ndr, "op_type", r->op_type);
80 0 : ndr_print_GUID(ndr, "client_guid", &r->client_guid);
81 0 : ndr_print_smb2_lease_key(ndr, "lease_key", &r->lease_key);
82 0 : ndr_print_uint32(ndr, "access_mask", r->access_mask);
83 0 : ndr_print_uint32(ndr, "share_access", r->share_access);
84 0 : ndr_print_uint32(ndr, "private_options", r->private_options);
85 0 : ndr_print_timeval(ndr, "time", &r->time);
86 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
87 0 : ndr_print_uint32(ndr, "uid", r->uid);
88 0 : ndr_print_uint16(ndr, "flags", r->flags);
89 0 : ndr_print_uint32(ndr, "name_hash", r->name_hash);
90 0 : ndr_print_uint8(ndr, "stale", r->stale);
91 0 : ndr->depth--;
92 : }
93 :
94 1606 : _PUBLIC_ enum ndr_err_code ndr_push_delete_token(struct ndr_push *ndr, int ndr_flags, const struct delete_token *r)
95 : {
96 1606 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
97 1606 : if (ndr_flags & NDR_SCALARS) {
98 803 : NDR_CHECK(ndr_push_align(ndr, 5));
99 803 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->name_hash));
100 803 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_nt_token));
101 803 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_token));
102 803 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
103 : }
104 1606 : if (ndr_flags & NDR_BUFFERS) {
105 803 : if (r->delete_nt_token) {
106 803 : NDR_CHECK(ndr_push_security_token(ndr, NDR_SCALARS, r->delete_nt_token));
107 : }
108 803 : if (r->delete_token) {
109 803 : NDR_CHECK(ndr_push_security_unix_token(ndr, NDR_SCALARS, r->delete_token));
110 : }
111 : }
112 1606 : return NDR_ERR_SUCCESS;
113 : }
114 :
115 22 : _PUBLIC_ enum ndr_err_code ndr_pull_delete_token(struct ndr_pull *ndr, int ndr_flags, struct delete_token *r)
116 : {
117 : uint32_t _ptr_delete_nt_token;
118 22 : TALLOC_CTX *_mem_save_delete_nt_token_0 = NULL;
119 : uint32_t _ptr_delete_token;
120 22 : TALLOC_CTX *_mem_save_delete_token_0 = NULL;
121 22 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
122 22 : if (ndr_flags & NDR_SCALARS) {
123 11 : NDR_CHECK(ndr_pull_align(ndr, 5));
124 11 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_hash));
125 11 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_nt_token));
126 11 : if (_ptr_delete_nt_token) {
127 11 : NDR_PULL_ALLOC(ndr, r->delete_nt_token);
128 : } else {
129 0 : r->delete_nt_token = NULL;
130 : }
131 11 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_token));
132 11 : if (_ptr_delete_token) {
133 11 : NDR_PULL_ALLOC(ndr, r->delete_token);
134 : } else {
135 0 : r->delete_token = NULL;
136 : }
137 11 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
138 : }
139 22 : if (ndr_flags & NDR_BUFFERS) {
140 11 : if (r->delete_nt_token) {
141 11 : _mem_save_delete_nt_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
142 11 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_nt_token, 0);
143 11 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_SCALARS, r->delete_nt_token));
144 11 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_nt_token_0, 0);
145 : }
146 11 : if (r->delete_token) {
147 11 : _mem_save_delete_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
148 11 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_token, 0);
149 11 : NDR_CHECK(ndr_pull_security_unix_token(ndr, NDR_SCALARS, r->delete_token));
150 11 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_token_0, 0);
151 : }
152 : }
153 22 : return NDR_ERR_SUCCESS;
154 : }
155 :
156 0 : static void ndr_print_flags_delete_token(struct ndr_print *ndr, const char *name, int unused, const struct delete_token *r)
157 : {
158 0 : ndr_print_delete_token(ndr, name, r);
159 0 : }
160 :
161 0 : _PUBLIC_ void ndr_print_delete_token(struct ndr_print *ndr, const char *name, const struct delete_token *r)
162 : {
163 0 : ndr_print_struct(ndr, name, "delete_token");
164 0 : if (r == NULL) { ndr_print_null(ndr); return; }
165 0 : ndr->depth++;
166 0 : ndr_print_uint32(ndr, "name_hash", r->name_hash);
167 0 : ndr_print_ptr(ndr, "delete_nt_token", r->delete_nt_token);
168 0 : ndr->depth++;
169 0 : if (r->delete_nt_token) {
170 0 : ndr_print_security_token(ndr, "delete_nt_token", r->delete_nt_token);
171 : }
172 0 : ndr->depth--;
173 0 : ndr_print_ptr(ndr, "delete_token", r->delete_token);
174 0 : ndr->depth++;
175 0 : if (r->delete_token) {
176 0 : ndr_print_security_unix_token(ndr, "delete_token", r->delete_token);
177 : }
178 0 : ndr->depth--;
179 0 : ndr->depth--;
180 : }
181 :
182 10161 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_flags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
183 : {
184 10161 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
185 10161 : return NDR_ERR_SUCCESS;
186 : }
187 :
188 7401 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_flags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
189 : {
190 : uint16_t v;
191 7401 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
192 7401 : *r = v;
193 7401 : return NDR_ERR_SUCCESS;
194 : }
195 :
196 0 : _PUBLIC_ void ndr_print_share_mode_flags(struct ndr_print *ndr, const char *name, uint16_t r)
197 : {
198 0 : ndr_print_uint16(ndr, name, r);
199 0 : ndr->depth++;
200 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_DELETE", SHARE_MODE_SHARE_DELETE, r);
201 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_WRITE", SHARE_MODE_SHARE_WRITE, r);
202 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_READ", SHARE_MODE_SHARE_READ, r);
203 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_DELETE", SHARE_MODE_ACCESS_DELETE, r);
204 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_WRITE", SHARE_MODE_ACCESS_WRITE, r);
205 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_READ", SHARE_MODE_ACCESS_READ, r);
206 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_HANDLE", SHARE_MODE_LEASE_HANDLE, r);
207 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_WRITE", SHARE_MODE_LEASE_WRITE, r);
208 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_READ", SHARE_MODE_LEASE_READ, r);
209 0 : ndr->depth--;
210 0 : }
211 :
212 10161 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_data(struct ndr_push *ndr, int ndr_flags, const struct share_mode_data *r)
213 : {
214 : uint32_t cntr_delete_tokens_0;
215 10161 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
216 10161 : if (ndr_flags & NDR_SCALARS) {
217 10161 : NDR_CHECK(ndr_push_align(ndr, 8));
218 10161 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unique_content_epoch));
219 10161 : NDR_CHECK(ndr_push_share_mode_flags(ndr, NDR_SCALARS, r->flags));
220 10161 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
221 10161 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
222 10161 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->stream_name));
223 10161 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_delete_tokens));
224 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_delete_tokens));
225 10964 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
226 803 : NDR_CHECK(ndr_push_delete_token(ndr, NDR_SCALARS, &r->delete_tokens[cntr_delete_tokens_0]));
227 : }
228 10161 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_write_time));
229 10161 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->changed_write_time));
230 : /* [skip] 'r->fresh' */
231 : /* [skip] 'r->modified' */
232 10161 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
233 10161 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
234 : }
235 10161 : if (ndr_flags & NDR_BUFFERS) {
236 10161 : if (r->servicepath) {
237 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
238 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
239 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
240 10161 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
241 : }
242 10161 : if (r->base_name) {
243 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
244 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
245 10161 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
246 10161 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
247 : }
248 10161 : if (r->stream_name) {
249 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
250 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
251 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
252 88 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stream_name, ndr_charset_length(r->stream_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
253 : }
254 10964 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
255 803 : NDR_CHECK(ndr_push_delete_token(ndr, NDR_BUFFERS, &r->delete_tokens[cntr_delete_tokens_0]));
256 : }
257 : /* [skip] 'r->fresh' */
258 : /* [skip] 'r->modified' */
259 : }
260 10161 : return NDR_ERR_SUCCESS;
261 : }
262 :
263 7411 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_data(struct ndr_pull *ndr, int ndr_flags, struct share_mode_data *r)
264 : {
265 : uint32_t _ptr_servicepath;
266 7411 : uint32_t size_servicepath_1 = 0;
267 7411 : uint32_t length_servicepath_1 = 0;
268 7411 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
269 : uint32_t _ptr_base_name;
270 7411 : uint32_t size_base_name_1 = 0;
271 7411 : uint32_t length_base_name_1 = 0;
272 7411 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
273 : uint32_t _ptr_stream_name;
274 7411 : uint32_t size_stream_name_1 = 0;
275 7411 : uint32_t length_stream_name_1 = 0;
276 7411 : TALLOC_CTX *_mem_save_stream_name_0 = NULL;
277 7411 : uint32_t size_delete_tokens_0 = 0;
278 : uint32_t cntr_delete_tokens_0;
279 7411 : TALLOC_CTX *_mem_save_delete_tokens_0 = NULL;
280 7411 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
281 7411 : if (ndr_flags & NDR_SCALARS) {
282 7411 : NDR_CHECK(ndr_pull_align(ndr, 8));
283 7411 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unique_content_epoch));
284 7401 : NDR_CHECK(ndr_pull_share_mode_flags(ndr, NDR_SCALARS, &r->flags));
285 7401 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
286 7401 : if (_ptr_servicepath) {
287 7401 : NDR_PULL_ALLOC(ndr, r->servicepath);
288 : } else {
289 0 : r->servicepath = NULL;
290 : }
291 7401 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
292 7401 : if (_ptr_base_name) {
293 7401 : NDR_PULL_ALLOC(ndr, r->base_name);
294 : } else {
295 0 : r->base_name = NULL;
296 : }
297 7401 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stream_name));
298 7401 : if (_ptr_stream_name) {
299 24 : NDR_PULL_ALLOC(ndr, r->stream_name);
300 : } else {
301 7377 : r->stream_name = NULL;
302 : }
303 7401 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_delete_tokens));
304 7401 : NDR_CHECK(ndr_pull_array_size(ndr, &r->delete_tokens));
305 7401 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delete_tokens, &size_delete_tokens_0));
306 7401 : NDR_PULL_ALLOC_N(ndr, r->delete_tokens, size_delete_tokens_0);
307 7401 : _mem_save_delete_tokens_0 = NDR_PULL_GET_MEM_CTX(ndr);
308 7401 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_tokens, 0);
309 7412 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
310 11 : NDR_CHECK(ndr_pull_delete_token(ndr, NDR_SCALARS, &r->delete_tokens[cntr_delete_tokens_0]));
311 : }
312 7401 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_tokens_0, 0);
313 7401 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_write_time));
314 7401 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->changed_write_time));
315 : /* [skip] 'r->fresh' */
316 7401 : NDR_ZERO_STRUCT(r->fresh);
317 : /* [skip] 'r->modified' */
318 7401 : NDR_ZERO_STRUCT(r->modified);
319 7401 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
320 7401 : if (r->delete_tokens) {
321 7401 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delete_tokens, r->num_delete_tokens));
322 : }
323 7401 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
324 : }
325 7401 : if (ndr_flags & NDR_BUFFERS) {
326 7401 : if (r->servicepath) {
327 7401 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
328 7401 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
329 7401 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
330 7401 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
331 7401 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
332 7401 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
333 7401 : if (length_servicepath_1 > size_servicepath_1) {
334 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servicepath_1, length_servicepath_1);
335 : }
336 7401 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
337 7401 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
338 7401 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
339 : }
340 7401 : if (r->base_name) {
341 7401 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
342 7401 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
343 7401 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
344 7401 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
345 7401 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
346 7401 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
347 7401 : if (length_base_name_1 > size_base_name_1) {
348 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_base_name_1, length_base_name_1);
349 : }
350 7401 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
351 7401 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
352 7401 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
353 : }
354 7401 : if (r->stream_name) {
355 24 : _mem_save_stream_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
356 24 : NDR_PULL_SET_MEM_CTX(ndr, r->stream_name, 0);
357 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->stream_name));
358 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->stream_name));
359 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->stream_name, &size_stream_name_1));
360 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->stream_name, &length_stream_name_1));
361 24 : if (length_stream_name_1 > size_stream_name_1) {
362 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_stream_name_1, length_stream_name_1);
363 : }
364 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_stream_name_1, sizeof(uint8_t)));
365 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stream_name, length_stream_name_1, sizeof(uint8_t), CH_UTF8));
366 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stream_name_0, 0);
367 : }
368 7401 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delete_tokens, &size_delete_tokens_0));
369 7401 : _mem_save_delete_tokens_0 = NDR_PULL_GET_MEM_CTX(ndr);
370 7401 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_tokens, 0);
371 7412 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
372 11 : NDR_CHECK(ndr_pull_delete_token(ndr, NDR_BUFFERS, &r->delete_tokens[cntr_delete_tokens_0]));
373 : }
374 7401 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_tokens_0, 0);
375 7401 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
376 : }
377 : }
378 7401 : return NDR_ERR_SUCCESS;
379 : }
380 :
381 0 : static void ndr_print_flags_share_mode_data(struct ndr_print *ndr, const char *name, int unused, const struct share_mode_data *r)
382 : {
383 0 : ndr_print_share_mode_data(ndr, name, r);
384 0 : }
385 :
386 0 : _PUBLIC_ void ndr_print_share_mode_data(struct ndr_print *ndr, const char *name, const struct share_mode_data *r)
387 : {
388 : uint32_t cntr_delete_tokens_0;
389 0 : ndr_print_struct(ndr, name, "share_mode_data");
390 0 : if (r == NULL) { ndr_print_null(ndr); return; }
391 0 : ndr->depth++;
392 0 : ndr_print_hyper(ndr, "unique_content_epoch", r->unique_content_epoch);
393 0 : ndr_print_share_mode_flags(ndr, "flags", r->flags);
394 0 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
395 0 : ndr->depth++;
396 0 : if (r->servicepath) {
397 0 : ndr_print_string(ndr, "servicepath", r->servicepath);
398 : }
399 0 : ndr->depth--;
400 0 : ndr_print_ptr(ndr, "base_name", r->base_name);
401 0 : ndr->depth++;
402 0 : if (r->base_name) {
403 0 : ndr_print_string(ndr, "base_name", r->base_name);
404 : }
405 0 : ndr->depth--;
406 0 : ndr_print_ptr(ndr, "stream_name", r->stream_name);
407 0 : ndr->depth++;
408 0 : if (r->stream_name) {
409 0 : ndr_print_string(ndr, "stream_name", r->stream_name);
410 : }
411 0 : ndr->depth--;
412 0 : ndr_print_uint32(ndr, "num_delete_tokens", r->num_delete_tokens);
413 0 : ndr->print(ndr, "%s: ARRAY(%d)", "delete_tokens", (int)r->num_delete_tokens);
414 0 : ndr->depth++;
415 0 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
416 0 : ndr_print_delete_token(ndr, "delete_tokens", &r->delete_tokens[cntr_delete_tokens_0]);
417 : }
418 0 : ndr->depth--;
419 0 : ndr_print_NTTIME(ndr, "old_write_time", r->old_write_time);
420 0 : ndr_print_NTTIME(ndr, "changed_write_time", r->changed_write_time);
421 0 : ndr_print_uint8(ndr, "fresh", r->fresh);
422 0 : ndr_print_uint8(ndr, "modified", r->modified);
423 0 : ndr_print_file_id(ndr, "id", &r->id);
424 0 : ndr->depth--;
425 : }
426 :
427 0 : static enum ndr_err_code ndr_push_vfs_default_durable_stat(struct ndr_push *ndr, int ndr_flags, const struct vfs_default_durable_stat *r)
428 : {
429 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
430 0 : if (ndr_flags & NDR_SCALARS) {
431 0 : NDR_CHECK(ndr_push_align(ndr, 8));
432 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_dev));
433 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_ino));
434 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_mode));
435 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_nlink));
436 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_uid));
437 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_gid));
438 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_rdev));
439 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_size));
440 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_atime));
441 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_mtime));
442 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_ctime));
443 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_btime));
444 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_blksize));
445 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_blocks));
446 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->st_ex_flags));
447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->st_ex_iflags));
448 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
449 : }
450 0 : if (ndr_flags & NDR_BUFFERS) {
451 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_atime));
452 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_mtime));
453 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_ctime));
454 0 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_btime));
455 : }
456 0 : return NDR_ERR_SUCCESS;
457 : }
458 :
459 0 : static enum ndr_err_code ndr_pull_vfs_default_durable_stat(struct ndr_pull *ndr, int ndr_flags, struct vfs_default_durable_stat *r)
460 : {
461 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
462 0 : if (ndr_flags & NDR_SCALARS) {
463 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
464 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_dev));
465 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_ino));
466 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_mode));
467 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_nlink));
468 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_uid));
469 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_gid));
470 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_rdev));
471 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_size));
472 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_atime));
473 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_mtime));
474 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_ctime));
475 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_btime));
476 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_blksize));
477 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_blocks));
478 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->st_ex_flags));
479 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->st_ex_iflags));
480 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
481 : }
482 0 : if (ndr_flags & NDR_BUFFERS) {
483 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_atime));
484 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_mtime));
485 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_ctime));
486 0 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_btime));
487 : }
488 0 : return NDR_ERR_SUCCESS;
489 : }
490 :
491 0 : _PUBLIC_ void ndr_print_vfs_default_durable_stat(struct ndr_print *ndr, const char *name, const struct vfs_default_durable_stat *r)
492 : {
493 0 : ndr_print_struct(ndr, name, "vfs_default_durable_stat");
494 0 : if (r == NULL) { ndr_print_null(ndr); return; }
495 0 : ndr->depth++;
496 0 : ndr_print_hyper(ndr, "st_ex_dev", r->st_ex_dev);
497 0 : ndr_print_hyper(ndr, "st_ex_ino", r->st_ex_ino);
498 0 : ndr_print_hyper(ndr, "st_ex_mode", r->st_ex_mode);
499 0 : ndr_print_hyper(ndr, "st_ex_nlink", r->st_ex_nlink);
500 0 : ndr_print_hyper(ndr, "st_ex_uid", r->st_ex_uid);
501 0 : ndr_print_hyper(ndr, "st_ex_gid", r->st_ex_gid);
502 0 : ndr_print_hyper(ndr, "st_ex_rdev", r->st_ex_rdev);
503 0 : ndr_print_hyper(ndr, "st_ex_size", r->st_ex_size);
504 0 : ndr_print_timespec(ndr, "st_ex_atime", &r->st_ex_atime);
505 0 : ndr_print_timespec(ndr, "st_ex_mtime", &r->st_ex_mtime);
506 0 : ndr_print_timespec(ndr, "st_ex_ctime", &r->st_ex_ctime);
507 0 : ndr_print_timespec(ndr, "st_ex_btime", &r->st_ex_btime);
508 0 : ndr_print_hyper(ndr, "st_ex_blksize", r->st_ex_blksize);
509 0 : ndr_print_hyper(ndr, "st_ex_blocks", r->st_ex_blocks);
510 0 : ndr_print_uint32(ndr, "st_ex_flags", r->st_ex_flags);
511 0 : ndr_print_uint32(ndr, "st_ex_iflags", r->st_ex_iflags);
512 0 : ndr->depth--;
513 : }
514 :
515 0 : _PUBLIC_ enum ndr_err_code ndr_push_vfs_default_durable_cookie(struct ndr_push *ndr, int ndr_flags, const struct vfs_default_durable_cookie *r)
516 : {
517 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
518 0 : if (ndr_flags & NDR_SCALARS) {
519 0 : NDR_CHECK(ndr_push_align(ndr, 8));
520 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, VFS_DEFAULT_DURABLE_COOKIE_MAGIC, 0x30, sizeof(uint8_t), CH_DOS));
521 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, VFS_DEFAULT_DURABLE_COOKIE_VERSION));
522 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->allow_reconnect));
523 0 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
524 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
525 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
526 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->initial_allocation_size));
527 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->position_information));
528 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->update_write_time_triggered));
529 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->update_write_time_on_close));
530 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->write_time_forced));
531 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->close_write_time));
532 0 : NDR_CHECK(ndr_push_vfs_default_durable_stat(ndr, NDR_SCALARS, &r->stat_info));
533 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
534 : }
535 0 : if (ndr_flags & NDR_BUFFERS) {
536 0 : if (r->servicepath) {
537 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
538 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
539 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
540 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
541 : }
542 0 : if (r->base_name) {
543 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
544 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
545 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
546 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
547 : }
548 0 : NDR_CHECK(ndr_push_vfs_default_durable_stat(ndr, NDR_BUFFERS, &r->stat_info));
549 : }
550 0 : return NDR_ERR_SUCCESS;
551 : }
552 :
553 0 : _PUBLIC_ enum ndr_err_code ndr_pull_vfs_default_durable_cookie(struct ndr_pull *ndr, int ndr_flags, struct vfs_default_durable_cookie *r)
554 : {
555 0 : uint32_t size_magic_0 = 0;
556 : uint32_t _ptr_servicepath;
557 0 : uint32_t size_servicepath_1 = 0;
558 0 : uint32_t length_servicepath_1 = 0;
559 0 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
560 : uint32_t _ptr_base_name;
561 0 : uint32_t size_base_name_1 = 0;
562 0 : uint32_t length_base_name_1 = 0;
563 0 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
564 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
565 0 : if (ndr_flags & NDR_SCALARS) {
566 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
567 0 : size_magic_0 = 0x30;
568 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, size_magic_0, sizeof(uint8_t), CH_DOS));
569 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
570 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->allow_reconnect));
571 0 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
572 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
573 0 : if (_ptr_servicepath) {
574 0 : NDR_PULL_ALLOC(ndr, r->servicepath);
575 : } else {
576 0 : r->servicepath = NULL;
577 : }
578 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
579 0 : if (_ptr_base_name) {
580 0 : NDR_PULL_ALLOC(ndr, r->base_name);
581 : } else {
582 0 : r->base_name = NULL;
583 : }
584 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->initial_allocation_size));
585 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->position_information));
586 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->update_write_time_triggered));
587 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->update_write_time_on_close));
588 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->write_time_forced));
589 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->close_write_time));
590 0 : NDR_CHECK(ndr_pull_vfs_default_durable_stat(ndr, NDR_SCALARS, &r->stat_info));
591 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
592 : }
593 0 : if (ndr_flags & NDR_BUFFERS) {
594 0 : if (r->servicepath) {
595 0 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
596 0 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
597 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
598 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
599 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
600 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
601 0 : if (length_servicepath_1 > size_servicepath_1) {
602 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servicepath_1, length_servicepath_1);
603 : }
604 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
605 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
606 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
607 : }
608 0 : if (r->base_name) {
609 0 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
610 0 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
611 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
612 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
613 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
614 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
615 0 : if (length_base_name_1 > size_base_name_1) {
616 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_base_name_1, length_base_name_1);
617 : }
618 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
619 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
620 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
621 : }
622 0 : NDR_CHECK(ndr_pull_vfs_default_durable_stat(ndr, NDR_BUFFERS, &r->stat_info));
623 : }
624 0 : return NDR_ERR_SUCCESS;
625 : }
626 :
627 0 : static void ndr_print_flags_vfs_default_durable_cookie(struct ndr_print *ndr, const char *name, int unused, const struct vfs_default_durable_cookie *r)
628 : {
629 0 : ndr_print_vfs_default_durable_cookie(ndr, name, r);
630 0 : }
631 :
632 0 : _PUBLIC_ void ndr_print_vfs_default_durable_cookie(struct ndr_print *ndr, const char *name, const struct vfs_default_durable_cookie *r)
633 : {
634 0 : ndr_print_struct(ndr, name, "vfs_default_durable_cookie");
635 0 : if (r == NULL) { ndr_print_null(ndr); return; }
636 0 : ndr->depth++;
637 0 : ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?VFS_DEFAULT_DURABLE_COOKIE_MAGIC:r->magic);
638 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?VFS_DEFAULT_DURABLE_COOKIE_VERSION:r->version);
639 0 : ndr_print_uint8(ndr, "allow_reconnect", r->allow_reconnect);
640 0 : ndr_print_file_id(ndr, "id", &r->id);
641 0 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
642 0 : ndr->depth++;
643 0 : if (r->servicepath) {
644 0 : ndr_print_string(ndr, "servicepath", r->servicepath);
645 : }
646 0 : ndr->depth--;
647 0 : ndr_print_ptr(ndr, "base_name", r->base_name);
648 0 : ndr->depth++;
649 0 : if (r->base_name) {
650 0 : ndr_print_string(ndr, "base_name", r->base_name);
651 : }
652 0 : ndr->depth--;
653 0 : ndr_print_hyper(ndr, "initial_allocation_size", r->initial_allocation_size);
654 0 : ndr_print_hyper(ndr, "position_information", r->position_information);
655 0 : ndr_print_uint8(ndr, "update_write_time_triggered", r->update_write_time_triggered);
656 0 : ndr_print_uint8(ndr, "update_write_time_on_close", r->update_write_time_on_close);
657 0 : ndr_print_uint8(ndr, "write_time_forced", r->write_time_forced);
658 0 : ndr_print_NTTIME(ndr, "close_write_time", r->close_write_time);
659 0 : ndr_print_vfs_default_durable_stat(ndr, "stat_info", &r->stat_info);
660 0 : ndr->depth--;
661 : }
662 :
663 0 : _PUBLIC_ enum ndr_err_code ndr_push_oplock_break_message(struct ndr_push *ndr, int ndr_flags, const struct oplock_break_message *r)
664 : {
665 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
666 0 : if (ndr_flags & NDR_SCALARS) {
667 0 : NDR_CHECK(ndr_push_align(ndr, 4));
668 0 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
669 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
670 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->break_to));
671 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
672 : }
673 0 : if (ndr_flags & NDR_BUFFERS) {
674 : }
675 0 : return NDR_ERR_SUCCESS;
676 : }
677 :
678 0 : _PUBLIC_ enum ndr_err_code ndr_pull_oplock_break_message(struct ndr_pull *ndr, int ndr_flags, struct oplock_break_message *r)
679 : {
680 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
681 0 : if (ndr_flags & NDR_SCALARS) {
682 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
683 0 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
684 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
685 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->break_to));
686 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
687 : }
688 0 : if (ndr_flags & NDR_BUFFERS) {
689 : }
690 0 : return NDR_ERR_SUCCESS;
691 : }
692 :
693 0 : static void ndr_print_flags_oplock_break_message(struct ndr_print *ndr, const char *name, int unused, const struct oplock_break_message *r)
694 : {
695 0 : ndr_print_oplock_break_message(ndr, name, r);
696 0 : }
697 :
698 0 : _PUBLIC_ void ndr_print_oplock_break_message(struct ndr_print *ndr, const char *name, const struct oplock_break_message *r)
699 : {
700 0 : ndr_print_struct(ndr, name, "oplock_break_message");
701 0 : if (r == NULL) { ndr_print_null(ndr); return; }
702 0 : ndr->depth++;
703 0 : ndr_print_file_id(ndr, "id", &r->id);
704 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
705 0 : ndr_print_uint8(ndr, "break_to", r->break_to);
706 0 : ndr->depth--;
707 : }
708 :
709 0 : _PUBLIC_ enum ndr_err_code ndr_push_file_rename_message(struct ndr_push *ndr, int ndr_flags, const struct file_rename_message *r)
710 : {
711 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
712 0 : if (ndr_flags & NDR_SCALARS) {
713 0 : NDR_CHECK(ndr_push_align(ndr, 5));
714 0 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
715 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
716 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
717 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
718 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->stream_name));
719 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
720 : }
721 0 : if (ndr_flags & NDR_BUFFERS) {
722 0 : if (r->servicepath) {
723 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
724 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
725 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
726 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
727 : }
728 0 : if (r->base_name) {
729 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
730 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
731 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
732 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
733 : }
734 0 : if (r->stream_name) {
735 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
736 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
737 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
738 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stream_name, ndr_charset_length(r->stream_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
739 : }
740 : }
741 0 : return NDR_ERR_SUCCESS;
742 : }
743 :
744 0 : _PUBLIC_ enum ndr_err_code ndr_pull_file_rename_message(struct ndr_pull *ndr, int ndr_flags, struct file_rename_message *r)
745 : {
746 : uint32_t _ptr_servicepath;
747 0 : uint32_t size_servicepath_1 = 0;
748 0 : uint32_t length_servicepath_1 = 0;
749 0 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
750 : uint32_t _ptr_base_name;
751 0 : uint32_t size_base_name_1 = 0;
752 0 : uint32_t length_base_name_1 = 0;
753 0 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
754 : uint32_t _ptr_stream_name;
755 0 : uint32_t size_stream_name_1 = 0;
756 0 : uint32_t length_stream_name_1 = 0;
757 0 : TALLOC_CTX *_mem_save_stream_name_0 = NULL;
758 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
759 0 : if (ndr_flags & NDR_SCALARS) {
760 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
761 0 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
762 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
763 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
764 0 : if (_ptr_servicepath) {
765 0 : NDR_PULL_ALLOC(ndr, r->servicepath);
766 : } else {
767 0 : r->servicepath = NULL;
768 : }
769 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
770 0 : if (_ptr_base_name) {
771 0 : NDR_PULL_ALLOC(ndr, r->base_name);
772 : } else {
773 0 : r->base_name = NULL;
774 : }
775 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stream_name));
776 0 : if (_ptr_stream_name) {
777 0 : NDR_PULL_ALLOC(ndr, r->stream_name);
778 : } else {
779 0 : r->stream_name = NULL;
780 : }
781 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
782 : }
783 0 : if (ndr_flags & NDR_BUFFERS) {
784 0 : if (r->servicepath) {
785 0 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
786 0 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
787 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
788 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
789 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
790 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
791 0 : if (length_servicepath_1 > size_servicepath_1) {
792 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servicepath_1, length_servicepath_1);
793 : }
794 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
795 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
796 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
797 : }
798 0 : if (r->base_name) {
799 0 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
800 0 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
801 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
802 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
803 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
804 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
805 0 : if (length_base_name_1 > size_base_name_1) {
806 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_base_name_1, length_base_name_1);
807 : }
808 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
809 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
811 : }
812 0 : if (r->stream_name) {
813 0 : _mem_save_stream_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
814 0 : NDR_PULL_SET_MEM_CTX(ndr, r->stream_name, 0);
815 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->stream_name));
816 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->stream_name));
817 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->stream_name, &size_stream_name_1));
818 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->stream_name, &length_stream_name_1));
819 0 : if (length_stream_name_1 > size_stream_name_1) {
820 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_stream_name_1, length_stream_name_1);
821 : }
822 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_stream_name_1, sizeof(uint8_t)));
823 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stream_name, length_stream_name_1, sizeof(uint8_t), CH_UTF8));
824 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stream_name_0, 0);
825 : }
826 : }
827 0 : return NDR_ERR_SUCCESS;
828 : }
829 :
830 0 : static void ndr_print_flags_file_rename_message(struct ndr_print *ndr, const char *name, int unused, const struct file_rename_message *r)
831 : {
832 0 : ndr_print_file_rename_message(ndr, name, r);
833 0 : }
834 :
835 0 : _PUBLIC_ void ndr_print_file_rename_message(struct ndr_print *ndr, const char *name, const struct file_rename_message *r)
836 : {
837 0 : ndr_print_struct(ndr, name, "file_rename_message");
838 0 : if (r == NULL) { ndr_print_null(ndr); return; }
839 0 : ndr->depth++;
840 0 : ndr_print_file_id(ndr, "id", &r->id);
841 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
842 0 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
843 0 : ndr->depth++;
844 0 : if (r->servicepath) {
845 0 : ndr_print_string(ndr, "servicepath", r->servicepath);
846 : }
847 0 : ndr->depth--;
848 0 : ndr_print_ptr(ndr, "base_name", r->base_name);
849 0 : ndr->depth++;
850 0 : if (r->base_name) {
851 0 : ndr_print_string(ndr, "base_name", r->base_name);
852 : }
853 0 : ndr->depth--;
854 0 : ndr_print_ptr(ndr, "stream_name", r->stream_name);
855 0 : ndr->depth++;
856 0 : if (r->stream_name) {
857 0 : ndr_print_string(ndr, "stream_name", r->stream_name);
858 : }
859 0 : ndr->depth--;
860 0 : ndr->depth--;
861 : }
862 :
863 : #ifndef SKIP_NDR_TABLE_open_files
864 : static const struct ndr_interface_public_struct open_files_public_structs[] = {
865 : {
866 : .name = "share_mode_entry",
867 : .struct_size = sizeof(struct share_mode_entry ),
868 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_share_mode_entry,
869 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_share_mode_entry,
870 : .ndr_print = (ndr_print_function_t) ndr_print_flags_share_mode_entry,
871 : },
872 : {
873 : .name = "delete_token",
874 : .struct_size = sizeof(struct delete_token ),
875 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_delete_token,
876 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_delete_token,
877 : .ndr_print = (ndr_print_function_t) ndr_print_flags_delete_token,
878 : },
879 : {
880 : .name = "share_mode_data",
881 : .struct_size = sizeof(struct share_mode_data ),
882 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_share_mode_data,
883 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_share_mode_data,
884 : .ndr_print = (ndr_print_function_t) ndr_print_flags_share_mode_data,
885 : },
886 : {
887 : .name = "vfs_default_durable_cookie",
888 : .struct_size = sizeof(struct vfs_default_durable_cookie ),
889 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_vfs_default_durable_cookie,
890 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_vfs_default_durable_cookie,
891 : .ndr_print = (ndr_print_function_t) ndr_print_flags_vfs_default_durable_cookie,
892 : },
893 : {
894 : .name = "oplock_break_message",
895 : .struct_size = sizeof(struct oplock_break_message ),
896 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_oplock_break_message,
897 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_oplock_break_message,
898 : .ndr_print = (ndr_print_function_t) ndr_print_flags_oplock_break_message,
899 : },
900 : {
901 : .name = "file_rename_message",
902 : .struct_size = sizeof(struct file_rename_message ),
903 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_file_rename_message,
904 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_file_rename_message,
905 : .ndr_print = (ndr_print_function_t) ndr_print_flags_file_rename_message,
906 : },
907 : { .name = NULL }
908 : };
909 :
910 : static const struct ndr_interface_call open_files_calls[] = {
911 : { .name = NULL }
912 : };
913 :
914 : static const char * const open_files_endpoint_strings[] = {
915 : "ncacn_np:[\\pipe\\open_files]",
916 : };
917 :
918 : static const struct ndr_interface_string_array open_files_endpoints = {
919 : .count = 1,
920 : .names = open_files_endpoint_strings
921 : };
922 :
923 : static const char * const open_files_authservice_strings[] = {
924 : "host",
925 : };
926 :
927 : static const struct ndr_interface_string_array open_files_authservices = {
928 : .count = 1,
929 : .names = open_files_authservice_strings
930 : };
931 :
932 :
933 : const struct ndr_interface_table ndr_table_open_files = {
934 : .name = "open_files",
935 : .num_calls = 0,
936 : .calls = open_files_calls,
937 : .num_public_structs = 6,
938 : .public_structs = open_files_public_structs,
939 : .endpoints = &open_files_endpoints,
940 : .authservices = &open_files_authservices
941 : };
942 :
943 : #endif /* SKIP_NDR_TABLE_open_files */
|