Bug 10521 - rpcclient FSRVP request UNCs should include a trailing backslash
Summary: rpcclient FSRVP request UNCs should include a trailing backslash
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DCE-RPCs and pipes (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 18:00 UTC by David Disseldorp
Modified: 2021-02-11 14:06 UTC (History)
0 users

See Also:


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

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 3.1.4.6: Windows servers expose the shadow copy
    of the share by invoking the NetrShareAdd() method, as
    specified in [MS-SRVS] section 3.1.4.7.
    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
    \\<any>\thisshare$@{ShadowCopy.ShadowCopyId}$

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

LGTM.
Comment 3 Jeremy Allison 2014-04-01 22:28:11 UTC
Re-assigning to Karolin for inclusion in 4.1.next.
Jeremy.
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.

Thanks!