svn commit: samba r5924 - in branches/SAMBA_4_0/source: libnet
utils/net
jelmer at samba.org
jelmer at samba.org
Mon Mar 21 18:42:32 GMT 2005
Author: jelmer
Date: 2005-03-21 18:42:32 +0000 (Mon, 21 Mar 2005)
New Revision: 5924
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5924
Log:
Use cli_credentials in libnet/.
Modified:
branches/SAMBA_4_0/source/libnet/libnet.h
branches/SAMBA_4_0/source/libnet/libnet_rpc.c
branches/SAMBA_4_0/source/utils/net/net_join.c
branches/SAMBA_4_0/source/utils/net/net_password.c
branches/SAMBA_4_0/source/utils/net/net_time.c
branches/SAMBA_4_0/source/utils/net/net_user.c
Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet.h
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet.h 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/libnet/libnet.h 2005-03-21 18:42:32 UTC (rev 5924)
@@ -25,11 +25,7 @@
* a client env context
* a user env context
*/
- struct {
- const char *account_name;
- const char *domain_name;
- const char *password;
- } user;
+ struct cli_credentials *credentials;
};
#include "libnet/libnet_passwd.h"
Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2005-03-21 18:42:32 UTC (rev 5924)
@@ -102,9 +102,9 @@
r->standard.in.dcerpc_iface_uuid,
r->standard.in.dcerpc_iface_version,
lp_netbios_name(),
- ctx->user.domain_name,
- ctx->user.account_name,
- ctx->user.password);
+ cli_credentials_get_domain(ctx->credentials),
+ cli_credentials_get_username(ctx->credentials),
+ cli_credentials_get_password(ctx->credentials));
if (!NT_STATUS_IS_OK(status)) {
r->standard.out.error_string = talloc_asprintf(mem_ctx,
"dcerpc_pipe_connect to pipe %s failed with %s\n",
Modified: branches/SAMBA_4_0/source/utils/net/net_join.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_join.c 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/utils/net/net_join.c 2005-03-21 18:42:32 UTC (rev 5924)
@@ -61,9 +61,7 @@
if (!libnetctx) {
return -1;
}
- libnetctx->user.account_name= cli_credentials_get_username(ctx->credentials);
- libnetctx->user.domain_name = cli_credentials_get_domain(ctx->credentials);
- libnetctx->user.password = cli_credentials_get_password(ctx->credentials);
+ libnetctx->credentials = ctx->credentials;
/* prepare password change */
r.generic.level = LIBNET_JOIN_GENERIC;
Modified: branches/SAMBA_4_0/source/utils/net/net_password.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_password.c 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/utils/net/net_password.c 2005-03-21 18:42:32 UTC (rev 5924)
@@ -57,9 +57,7 @@
if (!libnetctx) {
return -1;
}
- libnetctx->user.account_name= cli_credentials_get_username(ctx->credentials);
- libnetctx->user.domain_name = cli_credentials_get_domain(ctx->credentials);
- libnetctx->user.password = cli_credentials_get_password(ctx->credentials);
+ libnetctx->credentials = ctx->credentials;
/* prepare password change */
r.generic.level = LIBNET_CHANGE_PASSWORD_GENERIC;
@@ -134,9 +132,7 @@
if (!libnetctx) {
return -1;
}
- libnetctx->user.account_name= cli_credentials_get_username(ctx->credentials);
- libnetctx->user.domain_name = cli_credentials_get_domain(ctx->credentials);
- libnetctx->user.password = cli_credentials_get_password(ctx->credentials);
+ libnetctx->credentials = ctx->credentials;
/* prepare password change */
r.generic.level = LIBNET_SET_PASSWORD_GENERIC;
Modified: branches/SAMBA_4_0/source/utils/net/net_time.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_time.c 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/utils/net/net_time.c 2005-03-21 18:42:32 UTC (rev 5924)
@@ -47,9 +47,7 @@
if (!libnetctx) {
return -1;
}
- libnetctx->user.account_name= cli_credentials_get_username(ctx->credentials);
- libnetctx->user.domain_name = cli_credentials_get_domain(ctx->credentials);
- libnetctx->user.password = cli_credentials_get_password(ctx->credentials);
+ libnetctx->credentials = ctx->credentials;
/* prepare to get the time */
r.generic.level = LIBNET_REMOTE_TOD_GENERIC;
Modified: branches/SAMBA_4_0/source/utils/net/net_user.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_user.c 2005-03-21 18:10:21 UTC (rev 5923)
+++ branches/SAMBA_4_0/source/utils/net/net_user.c 2005-03-21 18:42:32 UTC (rev 5924)
@@ -47,14 +47,12 @@
lnet_ctx = libnet_context_init();
if (!lnet_ctx) return -1;
- lnet_ctx->user.domain_name = cli_credentials_get_domain(ctx->credentials);
- lnet_ctx->user.account_name = cli_credentials_get_username(ctx->credentials);
- lnet_ctx->user.password = cli_credentials_get_password(ctx->credentials);
+ lnet_ctx->credentials = ctx->credentials;
/* calling CreateUser function */
r.generic.level = LIBNET_CREATE_USER_GENERIC;
r.generic.in.user_name = user_name;
- r.generic.in.domain_name = lnet_ctx->user.domain_name;
+ r.generic.in.domain_name = cli_credentials_get_domain(lnet_ctx->credentials);
status = libnet_CreateUser(lnet_ctx, ctx->mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
More information about the samba-cvs
mailing list