2 * Unix SMB/CIFS implementation.
4 * File Server Remote VSS Protocol (FSRVP) client
6 * Copyright (C) David Disseldorp 2012
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.
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.
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/>.
23 #include "rpcclient.h"
24 #include "../librpc/gen_ndr/ndr_fsrvp.h"
25 #include "../librpc/gen_ndr/ndr_fsrvp_c.h"
27 struct fss_context_map
{
32 struct fss_context_map ctx_map
[] = {
34 .ctx_val
= FSRVP_CTX_BACKUP
,
36 .ctx_desc
= "auto-release, non-persistent shadow-copy.",
39 .ctx_val
= FSRVP_CTX_FILE_SHARE_BACKUP
,
40 .ctx_str
= "file_share_backup",
41 .ctx_desc
= "auto-release, non-persistent shadow-copy created "
42 "without writer involvement.",
45 .ctx_val
= FSRVP_CTX_NAS_ROLLBACK
,
46 .ctx_str
= "nas_rollback",
47 .ctx_desc
= "non-auto-release, persistent shadow-copy created "
48 "without writer involvement.",
51 .ctx_val
= FSRVP_CTX_APP_ROLLBACK
,
52 .ctx_str
= "app_rollback",
53 .ctx_desc
= "non-auto-release, persistent shadow-copy.",
58 static bool map_fss_ctx_str(const char *ctx_str
,
63 for (i
= 0; ctx_map
[i
].ctx_str
!= NULL
; i
++) {
64 if (!strcmp(ctx_map
[i
].ctx_str
, ctx_str
)) {
65 *ctx_val
= ctx_map
[i
].ctx_val
;
72 static void cmd_fss_is_path_sup_usage(const char *script_name
)
74 printf("usage: %s [share_name]\n", script_name
);
77 static NTSTATUS
cmd_fss_is_path_sup(struct rpc_pipe_client
*cli
,
78 TALLOC_CTX
*mem_ctx
, int argc
,
82 struct fss_IsPathSupported r
;
83 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
86 cmd_fss_is_path_sup_usage(argv
[0]);
87 return NT_STATUS_UNSUCCESSFUL
;
91 r
.in
.ShareName
= talloc_asprintf(mem_ctx
, "%s\\%s",
92 cli
->srv_name_slash
, argv
[1]);
93 if (r
.in
.ShareName
== NULL
) {
94 return NT_STATUS_NO_MEMORY
;
97 status
= dcerpc_fss_IsPathSupported_r(b
, mem_ctx
, &r
);
98 if (!NT_STATUS_IS_OK(status
)) {
99 DEBUG(0, ("IsPathSupported failed with UNC %s\n",
101 return NT_STATUS_UNSUCCESSFUL
;
102 } else if (r
.out
.result
) {
103 DEBUG(0, ("failed IsPathSupported response: 0x%x\n",
105 return NT_STATUS_UNSUCCESSFUL
;
107 printf("UNC %s %s shadow copy requests\n", r
.in
.ShareName
,
108 *r
.out
.SupportedByThisProvider
? "supports" : "does not support");
113 static void cmd_fss_get_sup_version_usage(const char *script_name
)
115 printf("usage: %s\n", script_name
);
118 static NTSTATUS
cmd_fss_get_sup_version(struct rpc_pipe_client
*cli
,
119 TALLOC_CTX
*mem_ctx
, int argc
,
123 struct fss_GetSupportedVersion r
;
124 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
127 cmd_fss_get_sup_version_usage(argv
[0]);
128 return NT_STATUS_UNSUCCESSFUL
;
132 status
= dcerpc_fss_GetSupportedVersion_r(b
, mem_ctx
, &r
);
133 if (!NT_STATUS_IS_OK(status
) || (r
.out
.result
!= 0)) {
134 DEBUG(0, ("GetSupportedVersion failed: %s result: 0x%x\n",
135 nt_errstr(status
), r
.out
.result
));
136 return NT_STATUS_UNSUCCESSFUL
;
138 printf("server %s supports FSRVP versions from %u to %u\n",
139 cli
->desthost
, *r
.out
.MinVersion
, *r
.out
.MaxVersion
);
144 static void cmd_fss_create_expose_usage(const char *script_name
)
148 printf("usage: %s [fss_context] [ro|rw] [share1] <share2> ...\n"
149 "[fss_context] values:\n", script_name
);
150 for (i
= 0; ctx_map
[i
].ctx_str
!= NULL
; i
++) {
151 printf("\t%s: %s\n", ctx_map
[i
].ctx_str
, ctx_map
[i
].ctx_desc
);
155 static NTSTATUS
cmd_fss_create_expose_parse(TALLOC_CTX
*mem_ctx
, int argc
,
157 const char *desthost
,
158 uint32_t *fss_ctx_val
,
160 struct fssagent_share_mapping_1
**maps
)
162 int num_non_share_args
= 3;
165 struct fssagent_share_mapping_1
*map_array
;
168 return NT_STATUS_INVALID_PARAMETER
;
171 if (!map_fss_ctx_str(argv
[1], fss_ctx_val
)) {
172 return NT_STATUS_INVALID_PARAMETER
;
175 if (!strcmp(argv
[2], "rw")) {
176 /* shadow-copy is created as read-write */
177 *fss_ctx_val
|= ATTR_AUTO_RECOVERY
;
178 } else if (strcmp(argv
[2], "ro")) {
179 return NT_STATUS_INVALID_PARAMETER
;
182 num_share_args
= argc
- num_non_share_args
;
183 map_array
= talloc_array(mem_ctx
, struct fssagent_share_mapping_1
,
185 if (map_array
== NULL
) {
186 return NT_STATUS_NO_MEMORY
;
189 for (i
= 0; i
< num_share_args
; i
++) {
190 map_array
[i
].ShareNameUNC
= talloc_asprintf(mem_ctx
, "\\\\%s\\%s",
191 desthost
, argv
[i
+ num_non_share_args
]);
192 if (map_array
[i
].ShareNameUNC
== NULL
) {
193 return NT_STATUS_NO_MEMORY
;
196 *num_maps
= num_share_args
;
202 static NTSTATUS
cmd_fss_create_expose(struct rpc_pipe_client
*cli
,
203 TALLOC_CTX
*mem_ctx
, int argc
,
207 struct fss_GetSupportedVersion r_version_get
;
208 struct fss_SetContext r_context_set
;
209 struct fss_StartShadowCopySet r_scset_start
;
210 struct fss_PrepareShadowCopySet r_scset_prep
;
211 struct fss_CommitShadowCopySet r_scset_commit
;
212 struct fss_ExposeShadowCopySet r_scset_expose
;
213 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
216 uint32_t fss_ctx_val
;
218 struct fssagent_share_mapping_1
*req_maps
;
221 tmp_ctx
= talloc_new(mem_ctx
);
222 if (tmp_ctx
== NULL
) {
223 return NT_STATUS_NO_MEMORY
;
226 status
= cmd_fss_create_expose_parse(tmp_ctx
, argc
, argv
, cli
->desthost
,
227 &fss_ctx_val
, &num_maps
, &req_maps
);
228 if (!NT_STATUS_IS_OK(status
)) {
229 cmd_fss_create_expose_usage(argv
[0]);
234 * PrepareShadowCopySet & CommitShadowCopySet often exceed the default
235 * 60 second dcerpc request timeout against Windows Server "8" Beta.
236 * ACHTUNG! dcerpc_binding_handle_set_timeout() value is interpreted as
237 * seconds on a source4 transport and as msecs here.
239 dcerpc_binding_handle_set_timeout(b
, 240 * 1000);
241 for (i
= 0; i
< num_maps
; i
++) {
242 struct fss_IsPathSupported r_pathsupport_get
;
243 r_pathsupport_get
.in
.ShareName
= req_maps
[i
].ShareNameUNC
;
244 status
= dcerpc_fss_IsPathSupported_r(b
, tmp_ctx
, &r_pathsupport_get
);
245 if (!NT_STATUS_IS_OK(status
) || (r_pathsupport_get
.out
.result
!= 0)) {
246 DEBUG(0, ("IsPathSupported failed: %s result: 0x%x\n",
247 nt_errstr(status
), r_pathsupport_get
.out
.result
));
250 if (!r_pathsupport_get
.out
.SupportedByThisProvider
) {
251 printf("path %s does not supported shadow-copies\n",
252 req_maps
[i
].ShareNameUNC
);
253 status
= NT_STATUS_NOT_SUPPORTED
;
258 ZERO_STRUCT(r_version_get
);
259 status
= dcerpc_fss_GetSupportedVersion_r(b
, tmp_ctx
, &r_version_get
);
260 if (!NT_STATUS_IS_OK(status
) || (r_version_get
.out
.result
!= 0)) {
261 DEBUG(0, ("GetSupportedVersion failed: %s result: 0x%x\n",
262 nt_errstr(status
), r_version_get
.out
.result
));
266 ZERO_STRUCT(r_context_set
);
267 r_context_set
.in
.Context
= fss_ctx_val
;
268 status
= dcerpc_fss_SetContext_r(b
, tmp_ctx
, &r_context_set
);
269 if (!NT_STATUS_IS_OK(status
) || (r_context_set
.out
.result
!= 0)) {
270 DEBUG(0, ("SetContext failed: %s result: 0x%x\n",
271 nt_errstr(status
), r_context_set
.out
.result
));
275 ZERO_STRUCT(r_scset_start
);
276 r_scset_start
.in
.ClientShadowCopySetId
= GUID_random();
277 status
= dcerpc_fss_StartShadowCopySet_r(b
, tmp_ctx
, &r_scset_start
);
278 if (!NT_STATUS_IS_OK(status
) || (r_scset_start
.out
.result
!= 0)) {
279 DEBUG(0, ("StartShadowCopySet failed: %s result: 0x%x\n",
280 nt_errstr(status
), r_scset_start
.out
.result
));
283 printf("%s: shadow-copy set created\n",
284 GUID_string(tmp_ctx
, r_scset_start
.out
.pShadowCopySetId
));
286 for (i
= 0; i
< num_maps
; i
++) {
287 struct fss_AddToShadowCopySet r_scset_add
;
288 r_scset_add
.in
.ClientShadowCopyId
= GUID_random();
289 r_scset_add
.in
.ShadowCopySetId
= *r_scset_start
.out
.pShadowCopySetId
;
290 r_scset_add
.in
.ShareName
= req_maps
[i
].ShareNameUNC
;
291 status
= dcerpc_fss_AddToShadowCopySet_r(b
, tmp_ctx
, &r_scset_add
);
292 if (!NT_STATUS_IS_OK(status
) || (r_scset_add
.out
.result
!= 0)) {
293 DEBUG(0, ("AddToShadowCopySet failed: %s result: 0x%x\n",
294 nt_errstr(status
), r_scset_add
.out
.result
));
297 printf("%s(%s): %s shadow-copy added to set\n",
298 GUID_string(tmp_ctx
, r_scset_start
.out
.pShadowCopySetId
),
299 GUID_string(tmp_ctx
, r_scset_add
.out
.pShadowCopyId
),
300 r_scset_add
.in
.ShareName
);
301 req_maps
[i
].ShadowCopySetId
= *r_scset_start
.out
.pShadowCopySetId
;
302 req_maps
[i
].ShadowCopyId
= *r_scset_add
.out
.pShadowCopyId
;
305 start_time
= time_mono(NULL
);
306 ZERO_STRUCT(r_scset_prep
);
307 r_scset_prep
.in
.ShadowCopySetId
= *r_scset_start
.out
.pShadowCopySetId
;
308 r_scset_prep
.in
.TimeOutInMilliseconds
= (240 * 1000);
309 status
= dcerpc_fss_PrepareShadowCopySet_r(b
, tmp_ctx
, &r_scset_prep
);
310 if (!NT_STATUS_IS_OK(status
) || (r_scset_prep
.out
.result
!= 0)) {
311 DEBUG(0, ("PrepareShadowCopySet failed: %s result: 0x%x\n",
312 nt_errstr(status
), r_scset_prep
.out
.result
));
315 printf("%s: prepare completed in %llu secs\n",
316 GUID_string(tmp_ctx
, r_scset_start
.out
.pShadowCopySetId
),
317 (long long unsigned int)(time_mono(NULL
) - start_time
));
319 start_time
= time_mono(NULL
);
320 ZERO_STRUCT(r_scset_commit
);
321 r_scset_commit
.in
.ShadowCopySetId
= *r_scset_start
.out
.pShadowCopySetId
;
322 r_scset_commit
.in
.TimeOutInMilliseconds
= (180 * 1000); /* win8 */
323 status
= dcerpc_fss_CommitShadowCopySet_r(b
, tmp_ctx
, &r_scset_commit
);
324 if (!NT_STATUS_IS_OK(status
) || (r_scset_commit
.out
.result
!= 0)) {
325 DEBUG(0, ("CommitShadowCopySet failed: %s result: 0x%x\n",
326 nt_errstr(status
), r_scset_commit
.out
.result
));
329 printf("%s: commit completed in %llu secs\n",
330 GUID_string(tmp_ctx
, r_scset_start
.out
.pShadowCopySetId
),
331 (long long unsigned int)(time_mono(NULL
) - start_time
));
333 ZERO_STRUCT(r_scset_expose
);
334 r_scset_expose
.in
.ShadowCopySetId
= *r_scset_start
.out
.pShadowCopySetId
;
335 r_scset_expose
.in
.TimeOutInMilliseconds
= (120 * 1000); /* win8 */
336 status
= dcerpc_fss_ExposeShadowCopySet_r(b
, tmp_ctx
, &r_scset_expose
);
337 if (!NT_STATUS_IS_OK(status
) || (r_scset_expose
.out
.result
!= 0)) {
338 DEBUG(0, ("ExposeShadowCopySet failed: %s result: 0x%x\n",
339 nt_errstr(status
), r_scset_expose
.out
.result
));
343 for (i
= 0; i
< num_maps
; i
++) {
344 struct fss_GetShareMapping r_sharemap_get
;
345 struct fssagent_share_mapping_1
*map
;
346 r_sharemap_get
.in
.ShadowCopyId
= req_maps
[i
].ShadowCopyId
;
347 r_sharemap_get
.in
.ShadowCopySetId
= req_maps
[i
].ShadowCopySetId
;
348 r_sharemap_get
.in
.ShareName
= req_maps
[i
].ShareNameUNC
;
349 r_sharemap_get
.in
.Level
= 1;
350 status
= dcerpc_fss_GetShareMapping_r(b
, tmp_ctx
, &r_sharemap_get
);
351 if (!NT_STATUS_IS_OK(status
) || (r_sharemap_get
.out
.result
!= 0)) {
352 DEBUG(0, ("GetShareMapping failed: %s result: 0x%x\n",
353 nt_errstr(status
), r_sharemap_get
.out
.result
));
356 map
= r_sharemap_get
.out
.ShareMapping
->ShareMapping1
;
357 printf("%s(%s): share %s exposed as a snapshot of %s\n",
358 GUID_string(tmp_ctx
, &map
->ShadowCopySetId
),
359 GUID_string(tmp_ctx
, &map
->ShadowCopyId
),
360 map
->ShadowCopyShareName
, map
->ShareNameUNC
);
364 talloc_free(tmp_ctx
);
368 static void cmd_fss_delete_usage(const char *script_name
)
370 printf("usage: %s [base_share] [shadow_copy_set_id] [shadow_copy_id]\n",
374 static NTSTATUS
cmd_fss_delete(struct rpc_pipe_client
*cli
,
375 TALLOC_CTX
*mem_ctx
, int argc
,
378 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
379 struct fss_DeleteShareMapping r_sharemap_del
;
380 const char *sc_set_id
;
386 cmd_fss_delete_usage(argv
[0]);
387 return NT_STATUS_UNSUCCESSFUL
;
392 tmp_ctx
= talloc_new(mem_ctx
);
393 if (tmp_ctx
== NULL
) {
394 return NT_STATUS_NO_MEMORY
;
397 ZERO_STRUCT(r_sharemap_del
);
398 r_sharemap_del
.in
.ShareName
= talloc_asprintf(tmp_ctx
, "\\\\%s\\%s",
399 cli
->desthost
, argv
[1]);
400 if (r_sharemap_del
.in
.ShareName
== NULL
) {
401 status
= NT_STATUS_NO_MEMORY
;
404 status
= GUID_from_string(sc_set_id
, &r_sharemap_del
.in
.ShadowCopySetId
);
405 if (!NT_STATUS_IS_OK(status
)) {
406 DEBUG(0, ("Invalid shadow_copy_set_id parameter\n"));
409 status
= GUID_from_string(sc_id
, &r_sharemap_del
.in
.ShadowCopyId
);
410 if (!NT_STATUS_IS_OK(status
)) {
411 DEBUG(0, ("Invalid shadow_copy_id parameter\n"));
414 status
= dcerpc_fss_DeleteShareMapping_r(b
, tmp_ctx
, &r_sharemap_del
);
415 if (!NT_STATUS_IS_OK(status
)) {
416 DEBUG(0, ("DeleteShareMapping failed\n"));
418 } else if (r_sharemap_del
.out
.result
!= 0) {
419 DEBUG(0, ("failed DeleteShareMapping response: 0x%x\n",
420 r_sharemap_del
.out
.result
));
421 status
= NT_STATUS_UNSUCCESSFUL
;
425 printf("%s(%s): %s shadow-copy deleted\n",
426 sc_set_id
, sc_id
, r_sharemap_del
.in
.ShareName
);
429 talloc_free(tmp_ctx
);
433 static void cmd_fss_is_shadow_copied_usage(const char *script_name
)
435 printf("usage: %s [share_name]\n", script_name
);
438 static NTSTATUS
cmd_fss_is_shadow_copied(struct rpc_pipe_client
*cli
,
439 TALLOC_CTX
*mem_ctx
, int argc
,
443 struct fss_IsPathShadowCopied r
;
444 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
447 cmd_fss_is_shadow_copied_usage(argv
[0]);
448 return NT_STATUS_UNSUCCESSFUL
;
452 r
.in
.ShareName
= talloc_asprintf(mem_ctx
, "%s\\%s",
453 cli
->srv_name_slash
, argv
[1]);
454 if (r
.in
.ShareName
== NULL
) {
455 return NT_STATUS_NO_MEMORY
;
458 status
= dcerpc_fss_IsPathShadowCopied_r(b
, mem_ctx
, &r
);
459 if (!NT_STATUS_IS_OK(status
)) {
460 DEBUG(0, ("IsPathShadowCopied failed with UNC %s\n",
462 return NT_STATUS_UNSUCCESSFUL
;
463 } else if (r
.out
.result
) {
464 DEBUG(0, ("failed IsPathShadowCopied response: 0x%x\n",
466 return NT_STATUS_UNSUCCESSFUL
;
468 printf("UNC %s %s an associated shadow-copy with compatibility 0x%x\n",
470 *r
.out
.ShadowCopyPresent
? "has" : "does not have",
471 *r
.out
.ShadowCopyCompatibility
);
476 static void cmd_fss_get_mapping_usage(const char *script_name
)
478 printf("usage: %s [base_share] [shadow_copy_set_id] [shadow_copy_id]\n",
482 static NTSTATUS
cmd_fss_get_mapping(struct rpc_pipe_client
*cli
,
483 TALLOC_CTX
*mem_ctx
, int argc
,
486 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
487 struct fss_GetShareMapping r_sharemap_get
;
488 const char *sc_set_id
;
490 struct fssagent_share_mapping_1
*map
;
495 cmd_fss_get_mapping_usage(argv
[0]);
496 return NT_STATUS_UNSUCCESSFUL
;
501 tmp_ctx
= talloc_new(mem_ctx
);
502 if (tmp_ctx
== NULL
) {
503 return NT_STATUS_NO_MEMORY
;
506 ZERO_STRUCT(r_sharemap_get
);
507 r_sharemap_get
.in
.ShareName
= talloc_asprintf(tmp_ctx
, "\\\\%s\\%s",
508 cli
->desthost
, argv
[1]);
509 if (r_sharemap_get
.in
.ShareName
== NULL
) {
510 status
= NT_STATUS_NO_MEMORY
;
513 status
= GUID_from_string(sc_set_id
, &r_sharemap_get
.in
.ShadowCopySetId
);
514 if (!NT_STATUS_IS_OK(status
)) {
515 DEBUG(0, ("Invalid shadow_copy_set_id parameter\n"));
518 status
= GUID_from_string(sc_id
, &r_sharemap_get
.in
.ShadowCopyId
);
519 if (!NT_STATUS_IS_OK(status
)) {
520 DEBUG(0, ("Invalid shadow_copy_id parameter\n"));
523 r_sharemap_get
.in
.Level
= 1;
524 status
= dcerpc_fss_GetShareMapping_r(b
, tmp_ctx
, &r_sharemap_get
);
525 if (!NT_STATUS_IS_OK(status
)) {
526 DEBUG(0, ("GetShareMapping failed\n"));
528 } else if (r_sharemap_get
.out
.result
!= 0) {
529 DEBUG(0, ("failed GetShareMapping response: 0x%x\n",
530 r_sharemap_get
.out
.result
));
531 status
= NT_STATUS_UNSUCCESSFUL
;
535 map
= r_sharemap_get
.out
.ShareMapping
->ShareMapping1
;
536 printf("%s(%s): share %s is a shadow-copy of %s at %s\n",
537 GUID_string(tmp_ctx
, &map
->ShadowCopySetId
),
538 GUID_string(tmp_ctx
, &map
->ShadowCopyId
),
539 map
->ShadowCopyShareName
, map
->ShareNameUNC
,
540 nt_time_string(tmp_ctx
, map
->tstamp
));
543 talloc_free(tmp_ctx
);
547 static void cmd_fss_recov_complete_usage(const char *script_name
)
549 printf("usage: %s [shadow_copy_set_id]\n", script_name
);
552 static NTSTATUS
cmd_fss_recov_complete(struct rpc_pipe_client
*cli
,
553 TALLOC_CTX
*mem_ctx
, int argc
,
557 struct fss_RecoveryCompleteShadowCopySet r
;
558 struct dcerpc_binding_handle
*b
= cli
->binding_handle
;
559 const char *sc_set_id
;
562 cmd_fss_recov_complete_usage(argv
[0]);
563 return NT_STATUS_UNSUCCESSFUL
;
568 status
= GUID_from_string(sc_set_id
, &r
.in
.ShadowCopySetId
);
569 if (!NT_STATUS_IS_OK(status
)) {
570 DEBUG(0, ("Invalid shadow_copy_set_id\n"));
571 return NT_STATUS_INVALID_PARAMETER
;
574 status
= dcerpc_fss_RecoveryCompleteShadowCopySet_r(b
, mem_ctx
, &r
);
575 if (!NT_STATUS_IS_OK(status
) || (r
.out
.result
!= 0)) {
576 DEBUG(0, ("RecoveryCompleteShadowCopySet failed: %s "
577 "result: 0x%x\n", nt_errstr(status
), r
.out
.result
));
580 printf("%s: shadow-copy set marked recovery complete\n", sc_set_id
);
585 /* List of commands exported by this module */
586 struct cmd_set fss_commands
[] = {
591 .name
= "fss_is_path_sup",
592 .returntype
= RPC_RTYPE_NTSTATUS
,
593 .ntfn
= cmd_fss_is_path_sup
,
594 .table
= &ndr_table_FileServerVssAgent
,
596 .description
= "Check whether a share supports shadow-copy "
601 .name
= "fss_get_sup_version",
602 .returntype
= RPC_RTYPE_NTSTATUS
,
603 .ntfn
= cmd_fss_get_sup_version
,
604 .table
= &ndr_table_FileServerVssAgent
,
606 .description
= "Get supported FSRVP version from server",
610 .name
= "fss_create_expose",
611 .returntype
= RPC_RTYPE_NTSTATUS
,
612 .ntfn
= cmd_fss_create_expose
,
613 .table
= &ndr_table_FileServerVssAgent
,
615 .description
= "Request shadow-copy creation and exposure",
619 .name
= "fss_delete",
620 .returntype
= RPC_RTYPE_NTSTATUS
,
621 .ntfn
= cmd_fss_delete
,
622 .table
= &ndr_table_FileServerVssAgent
,
624 .description
= "Request shadow-copy share deletion",
628 .name
= "fss_has_shadow_copy",
629 .returntype
= RPC_RTYPE_NTSTATUS
,
630 .ntfn
= cmd_fss_is_shadow_copied
,
631 .table
= &ndr_table_FileServerVssAgent
,
633 .description
= "Check for an associated share shadow-copy",
637 .name
= "fss_get_mapping",
638 .returntype
= RPC_RTYPE_NTSTATUS
,
639 .ntfn
= cmd_fss_get_mapping
,
640 .table
= &ndr_table_FileServerVssAgent
,
642 .description
= "Get shadow-copy share mapping information",
646 .name
= "fss_recovery_complete",
647 .returntype
= RPC_RTYPE_NTSTATUS
,
648 .ntfn
= cmd_fss_recov_complete
,
649 .table
= &ndr_table_FileServerVssAgent
,
651 .description
= "Flag read-write snapshot as recovery complete, "
652 "allowing further shadow-copy requests",