Enable libnetjoin debugging for now but avoid printing passwords.
authorGünther Deschner <gd@samba.org>
Fri, 7 Mar 2008 17:18:35 +0000 (18:18 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 7 Mar 2008 17:31:13 +0000 (18:31 +0100)
The gen_ndr needs proper fixing still.

Guenther
(This used to be commit 966d7244d7765d285a7026b97e6093fd1f8d83ce)

source3/lib/netapi/joindomain.c
source3/librpc/gen_ndr/ndr_libnet_join.c
source3/utils/net_ads.c

index 405f96a87ec09ebfbe94043f31329d5ab53e028a..9c0e8aaaf82b774012b418a2ac2012a92262ce64 100644 (file)
@@ -81,6 +81,7 @@ static WERROR NetJoinDomainLocal(struct libnetapi_ctx *mem_ctx,
 
        r->in.join_flags = join_flags;
        r->in.modify_config = true;
+       r->in.debug = true;
 
        werr = libnet_Join(mem_ctx, r);
        if (!W_ERROR_IS_OK(werr) && r->out.error_string) {
index ac8f7ee71d7ecfdd791375b7ed18f088f8473d25..753859f0ed7c6793dbe86a95bab9cab06e83b7db 100644 (file)
@@ -23,8 +23,13 @@ _PUBLIC_ void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name,
                ndr->depth--;
                ndr_print_string(ndr, "account_ou", r->in.account_ou);
                ndr_print_string(ndr, "admin_account", r->in.admin_account);
+#ifdef DEBUG_PASSWORD
                ndr_print_string(ndr, "admin_password", r->in.admin_password);
                ndr_print_string(ndr, "machine_password", r->in.machine_password);
+#else
+               ndr_print_ptr(ndr, "admin_password", r->in.admin_password);
+               ndr_print_ptr(ndr, "machine_password", r->in.machine_password);
+#endif
                ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags);
                ndr_print_string(ndr, "os_version", r->in.os_version);
                ndr_print_string(ndr, "os_name", r->in.os_name);
@@ -74,8 +79,13 @@ _PUBLIC_ void ndr_print_libnet_UnjoinCtx(struct ndr_print *ndr, const char *name
                ndr_print_string(ndr, "domain_name", r->in.domain_name);
                ndr_print_string(ndr, "account_ou", r->in.account_ou);
                ndr_print_string(ndr, "admin_account", r->in.admin_account);
+#ifdef DEBUG_PASSWORD
                ndr_print_string(ndr, "admin_password", r->in.admin_password);
                ndr_print_string(ndr, "machine_password", r->in.machine_password);
+#else
+               ndr_print_ptr(ndr, "admin_password", r->in.admin_password);
+               ndr_print_ptr(ndr, "machine_password", r->in.machine_password);
+#endif
                ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
                ndr_print_uint8(ndr, "modify_config", r->in.modify_config);
                ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
index 46e0a2591bb9adc8d30aaec5f035f8f3fa31f1e1..e9750db83a12f07165d02c28a20acf229f163b19 100644 (file)
@@ -829,7 +829,7 @@ static int net_ads_leave(int argc, const char **argv)
                return -1;
        }
 
-       r->in.debug             = opt_verbose;
+       r->in.debug             = true;
        r->in.dc_name           = opt_host;
        r->in.domain_name       = lp_realm();
        r->in.admin_account     = opt_user_name;
@@ -1178,7 +1178,7 @@ int net_ads_join(int argc, const char **argv)
        r->in.dc_name           = opt_host;
        r->in.admin_account     = opt_user_name;
        r->in.admin_password    = net_prompt_pass(opt_user_name);
-       r->in.debug             = opt_verbose;
+       r->in.debug             = true;
        r->in.join_flags        = WKSSVC_JOIN_FLAGS_JOIN_TYPE |
                                  WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE |
                                  WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED;