svn commit: samba r12423 - in branches/SAMBA_4_0/source: libnet
utils/net
abartlet at samba.org
abartlet at samba.org
Thu Dec 22 06:58:26 GMT 2005
Author: abartlet
Date: 2005-12-22 06:58:26 +0000 (Thu, 22 Dec 2005)
New Revision: 12423
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12423
Log:
Remove DEBUG(0) printouts in favor of more information to the caller.
I assume this works better with SWAT and the like anyway.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/libnet/libnet_join.c
branches/SAMBA_4_0/source/libnet/libnet_join.h
branches/SAMBA_4_0/source/utils/net/net_join.c
Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_join.c 2005-12-22 06:50:04 UTC (rev 12422)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c 2005-12-22 06:58:26 UTC (rev 12423)
@@ -745,8 +745,6 @@
}
}
- DEBUG(0, ("Joining domain %s\n", domain_name));
-
/*
establish a SAMR connection, on the same CIFS transport
*/
@@ -937,15 +935,13 @@
/* &cu filled in above */
status = dcerpc_samr_CreateUser2(samr_pipe, tmp_ctx, &cu);
- if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) {
+ if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"samr_CreateUser2 (recreate) for [%s] failed: %s\n",
r->in.domain_name, nt_errstr(status));
talloc_free(tmp_ctx);
return status;
}
- DEBUG(0, ("Recreated account in domain %s\n", domain_name));
-
}
}
@@ -1429,6 +1425,8 @@
talloc_steal(mem_ctx, r2->out.join_password);
r->out.domain_sid = r2->out.domain_sid;
talloc_steal(mem_ctx, r2->out.domain_sid);
+ r->out.domain_name = r2->out.domain_name;
+ talloc_steal(mem_ctx, r2->out.domain_name);
talloc_free(tmp_mem);
return NT_STATUS_OK;
}
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.h
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_join.h 2005-12-22 06:50:04 UTC (rev 12422)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.h 2005-12-22 06:58:26 UTC (rev 12423)
@@ -73,6 +73,7 @@
const char *error_string;
const char *join_password;
struct dom_sid *domain_sid;
+ const char *domain_name;
} out;
};
Modified: branches/SAMBA_4_0/source/utils/net/net_join.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_join.c 2005-12-22 06:50:04 UTC (rev 12422)
+++ branches/SAMBA_4_0/source/utils/net/net_join.c 2005-12-22 06:58:26 UTC (rev 12423)
@@ -66,7 +66,7 @@
if (!r) {
return -1;
}
- /* prepare password change */
+ /* prepare parameters for the join */
r->in.netbios_name = lp_netbios_name();
r->in.domain_name = domain_name;
r->in.secure_channel_type = secure_channel_type;
@@ -83,6 +83,8 @@
talloc_free(libnetctx);
return -1;
}
+ d_printf("Joined domain %s (%s)\n", r->out.domain_name, dom_sid_string(ctx->mem_ctx, r->out.domain_sid));
+
talloc_free(libnetctx);
return 0;
}
More information about the samba-cvs
mailing list