summaryrefslogtreecommitdiffstats
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2014-03-29 02:18:19 +0100
committerJeremy Allison <jra@samba.org>2014-03-31 22:52:14 +0200
commitcbc6082ec75ee97ae28d94ccfb92c3d93705798a (patch)
treed305aced0315560a59fe535335f918493f57670a /source4/torture/rpc
parentd9bc82d90d6c4425028e225cf470283dd3a98049 (diff)
downloadsamba-cbc6082ec75ee97ae28d94ccfb92c3d93705798a.tar.gz
samba-cbc6082ec75ee97ae28d94ccfb92c3d93705798a.tar.xz
samba-cbc6082ec75ee97ae28d94ccfb92c3d93705798a.zip
torture: test FSRVP UNCs with and without trailing slashes
The trailing slash should not make a difference, unless the target share is hidden. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/fsrvp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c
index f853ecf8939..3a98837db25 100644
--- a/source4/torture/rpc/fsrvp.c
+++ b/source4/torture/rpc/fsrvp.c
@@ -61,7 +61,7 @@ static bool test_fsrvp_is_path_supported(struct torture_context *tctx,
NTSTATUS status;
ZERO_STRUCT(r);
- r.in.ShareName = talloc_asprintf(tctx,"\\\\%s\\%s",
+ r.in.ShareName = talloc_asprintf(tctx,"\\\\%s\\%s\\",
dcerpc_server_name(p),
FSHARE);
/* win8 beta sends this */
@@ -71,7 +71,7 @@ static bool test_fsrvp_is_path_supported(struct torture_context *tctx,
"IsPathSupported failed");
ZERO_STRUCT(r);
- r.in.ShareName = talloc_asprintf(tctx,"\\\\%s\\%s",
+ r.in.ShareName = talloc_asprintf(tctx,"\\\\%s\\%s\\",
dcerpc_server_name(p),
FSHARE);
/* also works without magic */
@@ -318,6 +318,7 @@ static bool test_fsrvp_sc_create_simple(struct torture_context *tctx,
struct dcerpc_pipe *p)
{
struct fssagent_share_mapping_1 *sc_map;
+ /* no trailing backslash - should work. See note in cmd_fss.c */
char *share_unc = talloc_asprintf(tctx, "\\\\%s\\%s",
dcerpc_server_name(p), FSHARE);
@@ -332,7 +333,7 @@ static bool test_fsrvp_sc_create_simple(struct torture_context *tctx,
static bool test_fsrvp_sc_set_abort(struct torture_context *tctx,
struct dcerpc_pipe *p)
{
- char *share_unc = talloc_asprintf(tctx, "\\\\%s\\%s",
+ char *share_unc = talloc_asprintf(tctx, "\\\\%s\\%s\\",
dcerpc_server_name(p), FSHARE);
struct dcerpc_binding_handle *b = p->binding_handle;
struct fss_IsPathSupported r_pathsupport_get;
@@ -400,7 +401,7 @@ static bool test_fsrvp_bad_id(struct torture_context *tctx,
struct fss_DeleteShareMapping r_sharemap_del;
NTSTATUS status;
TALLOC_CTX *tmp_ctx = talloc_new(tctx);
- char *share_unc = talloc_asprintf(tmp_ctx, "\\\\%s\\%s",
+ char *share_unc = talloc_asprintf(tmp_ctx, "\\\\%s\\%s\\",
dcerpc_server_name(p), FSHARE);
torture_assert(tctx, test_fsrvp_sc_create(tctx, p, share_unc, &sc_map),
@@ -558,7 +559,7 @@ static bool test_fsrvp_enum_created(struct torture_context *tctx,
struct fssagent_share_mapping_1 *sc_map;
NTSTATUS status;
TALLOC_CTX *tmp_ctx = talloc_new(tctx);
- char *share_unc = talloc_asprintf(tmp_ctx, "\\\\%s\\%s",
+ char *share_unc = talloc_asprintf(tmp_ctx, "\\\\%s\\%s\\",
dcerpc_server_name(p), FSHARE);
extern struct cli_credentials *cmdline_credentials;
struct smb2_tree *tree_base;