[PATCH] FSRVP client support

David Disseldorp ddiss at suse.de
Tue Apr 3 10:36:13 MDT 2012


The following patch set adds support for the File Server Remote VSS
Protocl (MS-FSRVP) to rpcclient.

FSRVP support is new to Windows Server "8" Beta, and allows an SMB
client to request the creation and exposure of a share shadow-copy
(snapshot) via a dcerpc request to the FssagentRpc named pipe.
Windows Server "8" Beta FSRVP setup instructions are briefly documented
on on page 19 of:

Once the server is configured, rpcclient can be used as follows:

ddiss at plati:~> bin/rpcclient -k -U 'DOM\administrator%pw' ncacn_np:lutze[sign]

rpcclient $> fss_create_expose backup ro hyper
fa6215e3-8207-40c0-a75b-1336cf0b2285: shadow-copy set created
fa6215e3-8207-40c0-a75b-1336cf0b2285(bf6037df-e6f0-4f4b-96ff-68223060c2a8): \\lutze\hyper shadow-copy added to set
fa6215e3-8207-40c0-a75b-1336cf0b2285: prepare completed in 63 secs
fa6215e3-8207-40c0-a75b-1336cf0b2285: commit completed in 48 secs
fa6215e3-8207-40c0-a75b-1336cf0b2285(bf6037df-e6f0-4f4b-96ff-68223060c2a8): share hyper@{BF6037DF-E6F0-4F4B-96FF-68223060C2A8} exposed as a snapshot of \\lutze\hyper

rpcclient $> netshareenum
netname: hyper
        remark: shadow-copy able ReFS share
        path:   E:\Shares\hyper
netname: hyper@{BF6037DF-E6F0-4F4B-96FF-68223060C2A8}
        remark: (null)
        path:   \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy{C767E48E-7C1A-11E1-B9F0-B8AC6F927453}\Shares\hyper\

rpcclient $> fss_delete hyper fa6215e3-8207-40c0-a75b-1336cf0b2285 bf6037df-e6f0-4f4b-96ff-68223060c2a8
fa6215e3-8207-40c0-a75b-1336cf0b2285(bf6037df-e6f0-4f4b-96ff-68223060c2a8): \\lutze\hyper shadow-copy deleted

A number of smbtorture tests are also added, in preparation for FSRVP
server support.

"pidl: remove alignment pull at ParseStructPullPrimitives tail" is
included as a workaround for NDR64 dcerpc_bind_ack unmarshalling
problems, it is likely incorrect.

Feedback welcome.

Cheers, David


The following changes since commit 22a6497526812becab60f8e49ab13d9155986ae1:

  s3: Enhance the dbwrap needed x attempts msg (2012-04-03 15:17:11 +0200)

are available in the git repository at:
  git://git.samba.org/ddiss/samba.git mstr_fsrvp_client

David Disseldorp (6):
      idl: add File Server Remote VSS Protocol idl
      s4-torture: fsrvp test suite
      pidl: remove alignment pull at ParseStructPullPrimitives tail
      s3-rpcclient: add fsrvp commands
      doc: add FSRVP commands to rpcclient man page
      selftest: do not run samba4.rpc.fsrvp tests

 docs-xml/manpages-3/rpcclient.1.xml      |   15 +
 librpc/idl/fsrvp.idl                     |  113 +++++
 librpc/idl/wscript_build                 |    4 +-
 librpc/wscript_build                     |   12 +-
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |    2 -
 selftest/skip                            |    1 +
 source3/Makefile.in                      |    8 +-
 source3/librpc/rpc/rpc_common.c          |    4 +
 source3/rpcclient/cmd_fss.c              |  655 ++++++++++++++++++++++++++++++
 source3/rpcclient/rpcclient.c            |    2 +
 source3/wscript_build                    |    3 +-
 source4/torture/rpc/fsrvp.c              |  535 ++++++++++++++++++++++++
 source4/torture/rpc/rpc.c                |    1 +
 source4/torture/wscript_build            |    4 +-
 14 files changed, 1349 insertions(+), 10 deletions(-)
 create mode 100644 librpc/idl/fsrvp.idl
 create mode 100644 source3/rpcclient/cmd_fss.c
 create mode 100644 source4/torture/rpc/fsrvp.c

More information about the samba-technical mailing list