Bug 10521 - rpcclient FSRVP request UNCs should include a trailing backslash
rpcclient FSRVP request UNCs should include a trailing backslash
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DCE-RPCs and pipes
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2014-03-28 18:00 UTC by David Disseldorp
Modified: 2014-04-07 08:09 UTC (History)
0 users

See Also:

fix for 4.1.next, cherry-picked from master (7.04 KB, patch)
2014-04-01 16:08 UTC, David Disseldorp
jra: review+
ddiss: review? (asn)

Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2014-03-28 18:00:54 UTC
When exposing a share shadow-copy of a hidden base share, the MS-FSRVP document states:
<8> Section Windows servers expose the shadow copy
    of the share by invoking the NetrShareAdd() method, as
    specified in [MS-SRVS] section
    If MappedShare.ShareName ends with a '$' character
    (meaning that the share is hidden), then the exposed share
    name will have the '$' suffix appended.
    For example, if MappedShare.ShareName is
    \\server\thisshare$, the exposed name would be

The existing Samba FSRVP client does not invoke this behaviour when run against a Windows Server 2012 FSRVP server - instead, the exposed share does not include a trailing '$', causing it to be visible.

Taking the issue up with Dochelp, it was brought to my attention that, unlike the Windows FSRVP client, rpcclient does not add a trailing backslash to the ShareName in the AddToShadowCopySet request. Once added, snapshots of hidden shares are also hidden.
Comment 1 David Disseldorp 2014-04-01 16:08:42 UTC
Created attachment 9822 [details]
fix for 4.1.next, cherry-picked from master

Includes "rpcclient: abort shadow-copy set on commit failure" and "rpcclient: append a trailing slash to FSRVP request UNCs" from master.
Comment 2 Jeremy Allison 2014-04-01 22:27:51 UTC
Comment on attachment 9822 [details]
fix for 4.1.next, cherry-picked from master

Comment 3 Jeremy Allison 2014-04-01 22:28:11 UTC
Re-assigning to Karolin for inclusion in 4.1.next.
Comment 4 Karolin Seeger 2014-04-04 19:01:23 UTC
Pushed to autobuild-v4-1-test.
Comment 5 Karolin Seeger 2014-04-07 08:09:07 UTC
(In reply to comment #4)
> Pushed to autobuild-v4-1-test.

Pushed to v4-1-test.
Closing out bug report.