From a95b108959e4abb7a5c9a175f96b21796a387b26 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 21 Sep 2007 13:23:43 +0000 Subject: 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) --- source4/torture/winbind/struct_based.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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); -- cgit