summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-22 17:24:38 +0100
committerGünther Deschner <gd@samba.org>2010-03-24 12:48:29 +0100
commit5e87e8576caddfb6e46b6c7d42428b79d2056569 (patch)
tree102fb24a3b6805d99ac262e3792bd7e73fca1eaf
parent7d89c7c17bcedd33dae7d3200104dc0643a753f6 (diff)
downloadsamba-5e87e8576caddfb6e46b6c7d42428b79d2056569.tar.gz
samba-5e87e8576caddfb6e46b6c7d42428b79d2056569.tar.bz2
samba-5e87e8576caddfb6e46b6c7d42428b79d2056569.zip
s4-smbtorture: add rap_get_servername to RPC-SAMBA3 family of tests.
Guenther
-rw-r--r--source4/torture/rpc/samba3rpc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 7b94de9c93..349c146826 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -2567,6 +2567,24 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
return NT_STATUS_OK;
}
+static bool rap_get_servername(struct torture_context *tctx,
+ char **servername)
+{
+ struct smbcli_state *cli;
+
+ torture_assert(tctx,
+ torture_open_connection_share(tctx, &cli, tctx, torture_setting_string(tctx, "host", NULL),
+ "IPC$", tctx->ev),
+ "IPC$ connection failed");
+
+ torture_assert_ntstatus_ok(tctx,
+ get_servername(tctx, cli->tree, lp_iconv_convenience(tctx->lp_ctx), servername),
+ "get_servername failed");
+
+ talloc_free(cli);
+
+ return true;
+}
static NTSTATUS find_printers(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
struct smbcli_tree *tree,