summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-21 13:23:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:07 -0500
commita95b108959e4abb7a5c9a175f96b21796a387b26 (patch)
treeb5fbada4b1c655c982e70e31fd67ed39309f8b6a /source4/torture
parent069cc571cd4bf3f418282c98d8eab16233cefaa0 (diff)
downloadsamba-a95b108959e4abb7a5c9a175f96b21796a387b26.tar.gz
samba-a95b108959e4abb7a5c9a175f96b21796a387b26.tar.bz2
samba-a95b108959e4abb7a5c9a175f96b21796a387b26.zip
r25291: add WINBIND-STRUCT-PRIV_PIPE_DIR test
this may needs --option="torture:winbindd private pipe dir=/var/lib/samba/winbindd_privileged" metze (This used to be commit f83062d10955115a55928c51d289a219c1442632)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/winbind/struct_based.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 51269b9d95..69bb71ff49 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -122,6 +122,35 @@ static bool torture_winbind_struct_info(struct torture_context *torture)
return true;
}
+static bool torture_winbind_struct_priv_pipe_dir(struct torture_context *torture)
+{
+ struct winbindd_response rep;
+ const char *default_dir;
+ const char *expected_dir;
+ const char *got_dir;
+
+ ZERO_STRUCT(rep);
+
+ torture_comment(torture, "Running WINBINDD_PRIV_PIPE_DIR (struct based)\n");
+
+ DO_STRUCT_REQ_REP(WINBINDD_PRIV_PIPE_DIR, NULL, &rep);
+
+ got_dir = (const char *)rep.extra_data.data;
+
+ torture_assert(torture, got_dir, "NULL WINBINDD_PRIV_PIPE_DIR\n");
+
+ default_dir = lock_path(torture, WINBINDD_PRIV_SOCKET_SUBDIR);
+ expected_dir = torture_setting_string(torture,
+ "winbindd private pipe dir",
+ default_dir);
+
+ torture_assert_str_equal(torture, got_dir, expected_dir,
+ "WINBINDD_PRIV_PIPE_DIR doesn't match");
+
+ SAFE_FREE(rep.extra_data.data);
+ return true;
+}
+
static bool torture_winbind_struct_netbios_name(struct torture_context *torture)
{
struct winbindd_request req;
@@ -421,6 +450,7 @@ struct torture_suite *torture_winbind_struct_init(void)
torture_suite_add_simple_test(suite, "INTERFACE_VERSION", torture_winbind_struct_interface_version);
torture_suite_add_simple_test(suite, "PING", torture_winbind_struct_ping);
torture_suite_add_simple_test(suite, "INFO", torture_winbind_struct_info);
+ torture_suite_add_simple_test(suite, "PRIV_PIPE_DIR", torture_winbind_struct_priv_pipe_dir);
torture_suite_add_simple_test(suite, "NETBIOS_NAME", torture_winbind_struct_netbios_name);
torture_suite_add_simple_test(suite, "DOMAIN_NAME", torture_winbind_struct_domain_name);
torture_suite_add_simple_test(suite, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom);