1 | /*
|
---|
2 | * Unix SMB/CIFS implementation.
|
---|
3 | * NetApi Share Support
|
---|
4 | * Copyright (C) Guenther Deschner 2008
|
---|
5 | *
|
---|
6 | * This program is free software; you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation; either version 3 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This program is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #include "includes.h"
|
---|
21 |
|
---|
22 | #include "librpc/gen_ndr/libnetapi.h"
|
---|
23 | #include "lib/netapi/netapi.h"
|
---|
24 | #include "lib/netapi/netapi_private.h"
|
---|
25 | #include "lib/netapi/libnetapi.h"
|
---|
26 |
|
---|
27 | /****************************************************************
|
---|
28 | ****************************************************************/
|
---|
29 |
|
---|
30 | static NTSTATUS map_srvsvc_share_info_to_SHARE_INFO_buffer(TALLOC_CTX *mem_ctx,
|
---|
31 | uint32_t level,
|
---|
32 | union srvsvc_NetShareInfo *info,
|
---|
33 | uint8_t **buffer,
|
---|
34 | uint32_t *num_shares)
|
---|
35 | {
|
---|
36 | struct SHARE_INFO_0 i0;
|
---|
37 | struct SHARE_INFO_1 i1;
|
---|
38 | struct SHARE_INFO_2 i2;
|
---|
39 | struct SHARE_INFO_501 i501;
|
---|
40 | struct SHARE_INFO_1005 i1005;
|
---|
41 |
|
---|
42 | struct srvsvc_NetShareInfo0 *s0;
|
---|
43 | struct srvsvc_NetShareInfo1 *s1;
|
---|
44 | struct srvsvc_NetShareInfo2 *s2;
|
---|
45 | struct srvsvc_NetShareInfo501 *s501;
|
---|
46 | struct srvsvc_NetShareInfo1005 *s1005;
|
---|
47 |
|
---|
48 | if (!buffer) {
|
---|
49 | return NT_STATUS_INVALID_PARAMETER;
|
---|
50 | }
|
---|
51 |
|
---|
52 | switch (level) {
|
---|
53 | case 0:
|
---|
54 | s0 = info->info0;
|
---|
55 |
|
---|
56 | i0.shi0_netname = talloc_strdup(mem_ctx, s0->name);
|
---|
57 |
|
---|
58 | ADD_TO_ARRAY(mem_ctx, struct SHARE_INFO_0, i0,
|
---|
59 | (struct SHARE_INFO_0 **)buffer,
|
---|
60 | num_shares);
|
---|
61 | break;
|
---|
62 |
|
---|
63 | case 1:
|
---|
64 | s1 = info->info1;
|
---|
65 |
|
---|
66 | i1.shi1_netname = talloc_strdup(mem_ctx, s1->name);
|
---|
67 | i1.shi1_type = s1->type;
|
---|
68 | i1.shi1_remark = talloc_strdup(mem_ctx, s1->comment);
|
---|
69 |
|
---|
70 | ADD_TO_ARRAY(mem_ctx, struct SHARE_INFO_1, i1,
|
---|
71 | (struct SHARE_INFO_1 **)buffer,
|
---|
72 | num_shares);
|
---|
73 | break;
|
---|
74 |
|
---|
75 | case 2:
|
---|
76 | s2 = info->info2;
|
---|
77 |
|
---|
78 | i2.shi2_netname = talloc_strdup(mem_ctx, s2->name);
|
---|
79 | i2.shi2_type = s2->type;
|
---|
80 | i2.shi2_remark = talloc_strdup(mem_ctx, s2->comment);
|
---|
81 | i2.shi2_permissions = s2->permissions;
|
---|
82 | i2.shi2_max_uses = s2->max_users;
|
---|
83 | i2.shi2_current_uses = s2->current_users;
|
---|
84 | i2.shi2_path = talloc_strdup(mem_ctx, s2->path);
|
---|
85 | i2.shi2_passwd = talloc_strdup(mem_ctx, s2->password);
|
---|
86 |
|
---|
87 | ADD_TO_ARRAY(mem_ctx, struct SHARE_INFO_2, i2,
|
---|
88 | (struct SHARE_INFO_2 **)buffer,
|
---|
89 | num_shares);
|
---|
90 | break;
|
---|
91 |
|
---|
92 | case 501:
|
---|
93 | s501 = info->info501;
|
---|
94 |
|
---|
95 | i501.shi501_netname = talloc_strdup(mem_ctx, s501->name);
|
---|
96 | i501.shi501_type = s501->type;
|
---|
97 | i501.shi501_remark = talloc_strdup(mem_ctx, s501->comment);
|
---|
98 | i501.shi501_flags = s501->csc_policy;
|
---|
99 |
|
---|
100 | ADD_TO_ARRAY(mem_ctx, struct SHARE_INFO_501, i501,
|
---|
101 | (struct SHARE_INFO_501 **)buffer,
|
---|
102 | num_shares);
|
---|
103 | break;
|
---|
104 |
|
---|
105 | case 1005:
|
---|
106 | s1005 = info->info1005;
|
---|
107 |
|
---|
108 | i1005.shi1005_flags = s1005->dfs_flags;
|
---|
109 |
|
---|
110 | ADD_TO_ARRAY(mem_ctx, struct SHARE_INFO_1005, i1005,
|
---|
111 | (struct SHARE_INFO_1005 **)buffer,
|
---|
112 | num_shares);
|
---|
113 | break;
|
---|
114 |
|
---|
115 | default:
|
---|
116 | return NT_STATUS_INVALID_PARAMETER;
|
---|
117 | }
|
---|
118 |
|
---|
119 | return NT_STATUS_OK;
|
---|
120 | }
|
---|
121 |
|
---|
122 | /****************************************************************
|
---|
123 | ****************************************************************/
|
---|
124 |
|
---|
125 | static NTSTATUS map_SHARE_INFO_buffer_to_srvsvc_share_info(TALLOC_CTX *mem_ctx,
|
---|
126 | uint8_t *buffer,
|
---|
127 | uint32_t level,
|
---|
128 | union srvsvc_NetShareInfo *info)
|
---|
129 | {
|
---|
130 | struct SHARE_INFO_2 *i2 = NULL;
|
---|
131 | struct SHARE_INFO_1004 *i1004 = NULL;
|
---|
132 | struct srvsvc_NetShareInfo2 *s2 = NULL;
|
---|
133 | struct srvsvc_NetShareInfo1004 *s1004 = NULL;
|
---|
134 |
|
---|
135 | if (!buffer) {
|
---|
136 | return NT_STATUS_INVALID_PARAMETER;
|
---|
137 | }
|
---|
138 |
|
---|
139 | switch (level) {
|
---|
140 | case 2:
|
---|
141 | i2 = (struct SHARE_INFO_2 *)buffer;
|
---|
142 |
|
---|
143 | s2 = TALLOC_P(mem_ctx, struct srvsvc_NetShareInfo2);
|
---|
144 | NT_STATUS_HAVE_NO_MEMORY(s2);
|
---|
145 |
|
---|
146 | s2->name = i2->shi2_netname;
|
---|
147 | s2->type = i2->shi2_type;
|
---|
148 | s2->comment = i2->shi2_remark;
|
---|
149 | s2->permissions = i2->shi2_permissions;
|
---|
150 | s2->max_users = i2->shi2_max_uses;
|
---|
151 | s2->current_users = i2->shi2_current_uses;
|
---|
152 | s2->path = i2->shi2_path;
|
---|
153 | s2->password = i2->shi2_passwd;
|
---|
154 |
|
---|
155 | info->info2 = s2;
|
---|
156 |
|
---|
157 | break;
|
---|
158 | case 1004:
|
---|
159 | i1004 = (struct SHARE_INFO_1004 *)buffer;
|
---|
160 |
|
---|
161 | s1004 = TALLOC_P(mem_ctx, struct srvsvc_NetShareInfo1004);
|
---|
162 | NT_STATUS_HAVE_NO_MEMORY(s1004);
|
---|
163 |
|
---|
164 | s1004->comment = i1004->shi1004_remark;
|
---|
165 |
|
---|
166 | info->info1004 = s1004;
|
---|
167 |
|
---|
168 | break;
|
---|
169 | default:
|
---|
170 | return NT_STATUS_INVALID_PARAMETER;
|
---|
171 | }
|
---|
172 |
|
---|
173 | return NT_STATUS_OK;
|
---|
174 | }
|
---|
175 |
|
---|
176 | /****************************************************************
|
---|
177 | ****************************************************************/
|
---|
178 |
|
---|
179 | WERROR NetShareAdd_r(struct libnetapi_ctx *ctx,
|
---|
180 | struct NetShareAdd *r)
|
---|
181 | {
|
---|
182 | WERROR werr;
|
---|
183 | NTSTATUS status;
|
---|
184 | struct cli_state *cli = NULL;
|
---|
185 | struct rpc_pipe_client *pipe_cli = NULL;
|
---|
186 | union srvsvc_NetShareInfo info;
|
---|
187 |
|
---|
188 | if (!r->in.buffer) {
|
---|
189 | return WERR_INVALID_PARAM;
|
---|
190 | }
|
---|
191 |
|
---|
192 | switch (r->in.level) {
|
---|
193 | case 2:
|
---|
194 | break;
|
---|
195 | case 502:
|
---|
196 | case 503:
|
---|
197 | return WERR_NOT_SUPPORTED;
|
---|
198 | default:
|
---|
199 | return WERR_UNKNOWN_LEVEL;
|
---|
200 | }
|
---|
201 |
|
---|
202 | werr = libnetapi_open_pipe(ctx, r->in.server_name,
|
---|
203 | &ndr_table_srvsvc.syntax_id,
|
---|
204 | &cli,
|
---|
205 | &pipe_cli);
|
---|
206 | if (!W_ERROR_IS_OK(werr)) {
|
---|
207 | goto done;
|
---|
208 | }
|
---|
209 |
|
---|
210 | status = map_SHARE_INFO_buffer_to_srvsvc_share_info(ctx,
|
---|
211 | r->in.buffer,
|
---|
212 | r->in.level,
|
---|
213 | &info);
|
---|
214 | if (!NT_STATUS_IS_OK(status)) {
|
---|
215 | werr = ntstatus_to_werror(status);
|
---|
216 | goto done;
|
---|
217 | }
|
---|
218 |
|
---|
219 | status = rpccli_srvsvc_NetShareAdd(pipe_cli, ctx,
|
---|
220 | r->in.server_name,
|
---|
221 | r->in.level,
|
---|
222 | &info,
|
---|
223 | r->out.parm_err,
|
---|
224 | &werr);
|
---|
225 | if (!W_ERROR_IS_OK(werr)) {
|
---|
226 | goto done;
|
---|
227 | }
|
---|
228 |
|
---|
229 | done:
|
---|
230 | if (!cli) {
|
---|
231 | return werr;
|
---|
232 | }
|
---|
233 |
|
---|
234 | return werr;
|
---|
235 | }
|
---|
236 |
|
---|
237 | /****************************************************************
|
---|
238 | ****************************************************************/
|
---|
239 |
|
---|
240 | WERROR NetShareAdd_l(struct libnetapi_ctx *ctx,
|
---|
241 | struct NetShareAdd *r)
|
---|
242 | {
|
---|
243 | LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareAdd);
|
---|
244 | }
|
---|
245 |
|
---|
246 | /****************************************************************
|
---|
247 | ****************************************************************/
|
---|
248 |
|
---|
249 | WERROR NetShareDel_r(struct libnetapi_ctx *ctx,
|
---|
250 | struct NetShareDel *r)
|
---|
251 | {
|
---|
252 | WERROR werr;
|
---|
253 | NTSTATUS status;
|
---|
254 | struct cli_state *cli = NULL;
|
---|
255 | struct rpc_pipe_client *pipe_cli = NULL;
|
---|
256 |
|
---|
257 | if (!r->in.net_name) {
|
---|
258 | return WERR_INVALID_PARAM;
|
---|
259 | }
|
---|
260 |
|
---|
261 | werr = libnetapi_open_pipe(ctx, r->in.server_name,
|
---|
262 | &ndr_table_srvsvc.syntax_id,
|
---|
263 | &cli,
|
---|
264 | &pipe_cli);
|
---|
265 | if (!W_ERROR_IS_OK(werr)) {
|
---|
266 | goto done;
|
---|
267 | }
|
---|
268 |
|
---|
269 | status = rpccli_srvsvc_NetShareDel(pipe_cli, ctx,
|
---|
270 | r->in.server_name,
|
---|
271 | r->in.net_name,
|
---|
272 | r->in.reserved,
|
---|
273 | &werr);
|
---|
274 | if (!NT_STATUS_IS_OK(status)) {
|
---|
275 | werr = ntstatus_to_werror(status);
|
---|
276 | goto done;
|
---|
277 | }
|
---|
278 |
|
---|
279 | done:
|
---|
280 | if (!cli) {
|
---|
281 | return werr;
|
---|
282 | }
|
---|
283 |
|
---|
284 | return werr;
|
---|
285 | }
|
---|
286 |
|
---|
287 | /****************************************************************
|
---|
288 | ****************************************************************/
|
---|
289 |
|
---|
290 | WERROR NetShareDel_l(struct libnetapi_ctx *ctx,
|
---|
291 | struct NetShareDel *r)
|
---|
292 | {
|
---|
293 | LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareDel);
|
---|
294 | }
|
---|
295 |
|
---|
296 | /****************************************************************
|
---|
297 | ****************************************************************/
|
---|
298 |
|
---|
299 | WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
|
---|
300 | struct NetShareEnum *r)
|
---|
301 | {
|
---|
302 | WERROR werr;
|
---|
303 | NTSTATUS status;
|
---|
304 | struct cli_state *cli = NULL;
|
---|
305 | struct rpc_pipe_client *pipe_cli = NULL;
|
---|
306 | struct srvsvc_NetShareInfoCtr info_ctr;
|
---|
307 | struct srvsvc_NetShareCtr0 ctr0;
|
---|
308 | struct srvsvc_NetShareCtr1 ctr1;
|
---|
309 | struct srvsvc_NetShareCtr2 ctr2;
|
---|
310 | uint32_t i;
|
---|
311 |
|
---|
312 | if (!r->out.buffer) {
|
---|
313 | return WERR_INVALID_PARAM;
|
---|
314 | }
|
---|
315 |
|
---|
316 | switch (r->in.level) {
|
---|
317 | case 0:
|
---|
318 | case 1:
|
---|
319 | case 2:
|
---|
320 | break;
|
---|
321 | case 502:
|
---|
322 | case 503:
|
---|
323 | return WERR_NOT_SUPPORTED;
|
---|
324 | default:
|
---|
325 | return WERR_UNKNOWN_LEVEL;
|
---|
326 | }
|
---|
327 |
|
---|
328 | ZERO_STRUCT(info_ctr);
|
---|
329 |
|
---|
330 | werr = libnetapi_open_pipe(ctx, r->in.server_name,
|
---|
331 | &ndr_table_srvsvc.syntax_id,
|
---|
332 | &cli,
|
---|
333 | &pipe_cli);
|
---|
334 | if (!W_ERROR_IS_OK(werr)) {
|
---|
335 | goto done;
|
---|
336 | }
|
---|
337 |
|
---|
338 | info_ctr.level = r->in.level;
|
---|
339 | switch (r->in.level) {
|
---|
340 | case 0:
|
---|
341 | ZERO_STRUCT(ctr0);
|
---|
342 | info_ctr.ctr.ctr0 = &ctr0;
|
---|
343 | break;
|
---|
344 | case 1:
|
---|
345 | ZERO_STRUCT(ctr1);
|
---|
346 | info_ctr.ctr.ctr1 = &ctr1;
|
---|
347 | break;
|
---|
348 | case 2:
|
---|
349 | ZERO_STRUCT(ctr2);
|
---|
350 | info_ctr.ctr.ctr2 = &ctr2;
|
---|
351 | break;
|
---|
352 | }
|
---|
353 |
|
---|
354 | status = rpccli_srvsvc_NetShareEnumAll(pipe_cli, ctx,
|
---|
355 | r->in.server_name,
|
---|
356 | &info_ctr,
|
---|
357 | r->in.prefmaxlen,
|
---|
358 | r->out.total_entries,
|
---|
359 | r->out.resume_handle,
|
---|
360 | &werr);
|
---|
361 | if (NT_STATUS_IS_ERR(status)) {
|
---|
362 | goto done;
|
---|
363 | }
|
---|
364 |
|
---|
365 | for (i=0; i < info_ctr.ctr.ctr1->count; i++) {
|
---|
366 | union srvsvc_NetShareInfo _i;
|
---|
367 | switch (r->in.level) {
|
---|
368 | case 0:
|
---|
369 | _i.info0 = &info_ctr.ctr.ctr0->array[i];
|
---|
370 | break;
|
---|
371 | case 1:
|
---|
372 | _i.info1 = &info_ctr.ctr.ctr1->array[i];
|
---|
373 | break;
|
---|
374 | case 2:
|
---|
375 | _i.info2 = &info_ctr.ctr.ctr2->array[i];
|
---|
376 | break;
|
---|
377 | }
|
---|
378 |
|
---|
379 | status = map_srvsvc_share_info_to_SHARE_INFO_buffer(ctx,
|
---|
380 | r->in.level,
|
---|
381 | &_i,
|
---|
382 | r->out.buffer,
|
---|
383 | r->out.entries_read);
|
---|
384 | if (!NT_STATUS_IS_OK(status)) {
|
---|
385 | werr = ntstatus_to_werror(status);
|
---|
386 | }
|
---|
387 | }
|
---|
388 |
|
---|
389 | done:
|
---|
390 | if (!cli) {
|
---|
391 | return werr;
|
---|
392 | }
|
---|
393 |
|
---|
394 | return werr;
|
---|
395 | }
|
---|
396 |
|
---|
397 | /****************************************************************
|
---|
398 | ****************************************************************/
|
---|
399 |
|
---|
400 | WERROR NetShareEnum_l(struct libnetapi_ctx *ctx,
|
---|
401 | struct NetShareEnum *r)
|
---|
402 | {
|
---|
403 | LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareEnum);
|
---|
404 | }
|
---|
405 |
|
---|
406 | /****************************************************************
|
---|
407 | ****************************************************************/
|
---|
408 |
|
---|
409 | WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
|
---|
410 | struct NetShareGetInfo *r)
|
---|
411 | {
|
---|
412 | WERROR werr;
|
---|
413 | NTSTATUS status;
|
---|
414 | struct cli_state *cli = NULL;
|
---|
415 | struct rpc_pipe_client *pipe_cli = NULL;
|
---|
416 | union srvsvc_NetShareInfo info;
|
---|
417 | uint32_t num_entries = 0;
|
---|
418 |
|
---|
419 | if (!r->in.net_name || !r->out.buffer) {
|
---|
420 | return WERR_INVALID_PARAM;
|
---|
421 | }
|
---|
422 |
|
---|
423 | switch (r->in.level) {
|
---|
424 | case 0:
|
---|
425 | case 1:
|
---|
426 | case 2:
|
---|
427 | case 501:
|
---|
428 | case 1005:
|
---|
429 | break;
|
---|
430 | case 502:
|
---|
431 | case 503:
|
---|
432 | return WERR_NOT_SUPPORTED;
|
---|
433 | default:
|
---|
434 | return WERR_UNKNOWN_LEVEL;
|
---|
435 | }
|
---|
436 |
|
---|
437 | werr = libnetapi_open_pipe(ctx, r->in.server_name,
|
---|
438 | &ndr_table_srvsvc.syntax_id,
|
---|
439 | &cli,
|
---|
440 | &pipe_cli);
|
---|
441 | if (!W_ERROR_IS_OK(werr)) {
|
---|
442 | goto done;
|
---|
443 | }
|
---|
444 |
|
---|
445 | status = rpccli_srvsvc_NetShareGetInfo(pipe_cli, ctx,
|
---|
446 | r->in.server_name,
|
---|
447 | r->in.net_name,
|
---|
448 | r->in.level,
|
---|
449 | &info,
|
---|
450 | &werr);
|
---|
451 |
|
---|
452 | if (!W_ERROR_IS_OK(werr)) {
|
---|
453 | goto done;
|
---|
454 | }
|
---|
455 |
|
---|
456 | status = map_srvsvc_share_info_to_SHARE_INFO_buffer(ctx,
|
---|
457 | r->in.level,
|
---|
458 | &info,
|
---|
459 | r->out.buffer,
|
---|
460 | &num_entries);
|
---|
461 | if (!NT_STATUS_IS_OK(status)) {
|
---|
462 | werr = ntstatus_to_werror(status);
|
---|
463 | }
|
---|
464 |
|
---|
465 | done:
|
---|
466 | if (!cli) {
|
---|
467 | return werr;
|
---|
468 | }
|
---|
469 |
|
---|
470 | return werr;
|
---|
471 | }
|
---|
472 |
|
---|
473 | /****************************************************************
|
---|
474 | ****************************************************************/
|
---|
475 |
|
---|
476 | WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
|
---|
477 | struct NetShareGetInfo *r)
|
---|
478 | {
|
---|
479 | LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareGetInfo);
|
---|
480 | }
|
---|
481 |
|
---|
482 | /****************************************************************
|
---|
483 | ****************************************************************/
|
---|
484 |
|
---|
485 | WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
|
---|
486 | struct NetShareSetInfo *r)
|
---|
487 | {
|
---|
488 | WERROR werr;
|
---|
489 | NTSTATUS status;
|
---|
490 | struct cli_state *cli = NULL;
|
---|
491 | struct rpc_pipe_client *pipe_cli = NULL;
|
---|
492 | union srvsvc_NetShareInfo info;
|
---|
493 |
|
---|
494 | if (!r->in.buffer) {
|
---|
495 | return WERR_INVALID_PARAM;
|
---|
496 | }
|
---|
497 |
|
---|
498 | switch (r->in.level) {
|
---|
499 | case 2:
|
---|
500 | case 1004:
|
---|
501 | break;
|
---|
502 | case 1:
|
---|
503 | case 502:
|
---|
504 | case 503:
|
---|
505 | case 1005:
|
---|
506 | case 1006:
|
---|
507 | case 1501:
|
---|
508 | return WERR_NOT_SUPPORTED;
|
---|
509 | default:
|
---|
510 | return WERR_UNKNOWN_LEVEL;
|
---|
511 | }
|
---|
512 |
|
---|
513 | werr = libnetapi_open_pipe(ctx, r->in.server_name,
|
---|
514 | &ndr_table_srvsvc.syntax_id,
|
---|
515 | &cli,
|
---|
516 | &pipe_cli);
|
---|
517 | if (!W_ERROR_IS_OK(werr)) {
|
---|
518 | goto done;
|
---|
519 | }
|
---|
520 |
|
---|
521 | status = map_SHARE_INFO_buffer_to_srvsvc_share_info(ctx,
|
---|
522 | r->in.buffer,
|
---|
523 | r->in.level,
|
---|
524 | &info);
|
---|
525 | if (!NT_STATUS_IS_OK(status)) {
|
---|
526 | werr = ntstatus_to_werror(status);
|
---|
527 | goto done;
|
---|
528 | }
|
---|
529 |
|
---|
530 | status = rpccli_srvsvc_NetShareSetInfo(pipe_cli, ctx,
|
---|
531 | r->in.server_name,
|
---|
532 | r->in.net_name,
|
---|
533 | r->in.level,
|
---|
534 | &info,
|
---|
535 | r->out.parm_err,
|
---|
536 | &werr);
|
---|
537 | if (!W_ERROR_IS_OK(werr)) {
|
---|
538 | goto done;
|
---|
539 | }
|
---|
540 |
|
---|
541 | done:
|
---|
542 | if (!cli) {
|
---|
543 | return werr;
|
---|
544 | }
|
---|
545 |
|
---|
546 | return werr;
|
---|
547 | }
|
---|
548 |
|
---|
549 | /****************************************************************
|
---|
550 | ****************************************************************/
|
---|
551 |
|
---|
552 | WERROR NetShareSetInfo_l(struct libnetapi_ctx *ctx,
|
---|
553 | struct NetShareSetInfo *r)
|
---|
554 | {
|
---|
555 | LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareSetInfo);
|
---|
556 | }
|
---|