The branch, v3-4-test has been updated via 97c30f557aab49f199df07f2a48ba94ad9cc81c5 (commit) via 0e845cd6009c8a01eb3d53f558e9872ec4a3ab9f (commit) from 1de41bb8d6b9cbf287bad4152e38402201f966d3 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log ----------------------------------------------------------------- commit 97c30f557aab49f199df07f2a48ba94ad9cc81c5 Author: Günther Deschner <g...@samba.org> Date: Thu Mar 26 10:26:59 2009 +0100 s3-libnetapi: fix creds in libnetapi_open_ipc_connection(). Jeremy, this broke with 8dd1faaa2992851f6852ba7ea4498445af5faadd. Not sure if other users broke as well with that change. Guenther (cherry picked from commit 56d74b62126083dd7e2a60d1b48b03e1b1798c90) commit 0e845cd6009c8a01eb3d53f558e9872ec4a3ab9f Author: Günther Deschner <g...@samba.org> Date: Wed Mar 25 23:23:06 2009 +0100 s3:rpc_parse: remove unused init_unistr(). Guenther (cherry picked from commit fe340eb92fd2e5dfef977dc391d2a43ce970e0ea) ----------------------------------------------------------------------- Summary of changes: source3/include/proto.h | 1 - source3/lib/netapi/cm.c | 5 +++++ source3/rpc_parse/parse_misc.c | 19 ------------------- source3/utils/net_rpc_printer.c | 9 ++++----- 4 files changed, 9 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index bb5e472..44c6e0f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5684,7 +5684,6 @@ bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime); bool smb_io_uuid(const char *desc, struct GUID *uuid, prs_struct *ps, int depth); -void init_unistr(UNISTR *str, const char *buf); void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags); /* The following definitions come from rpc_parse/parse_prs.c */ diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index b676ae6..d28b2b2 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -57,6 +57,11 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, false, false, PROTOCOL_NT1, 0, 0x20); + if (cli_ipc) { + cli_set_username(cli_ipc, ctx->username); + cli_set_password(cli_ipc, ctx->password); + cli_set_domain(cli_ipc, ctx->workgroup); + } TALLOC_FREE(auth_info); if (!cli_ipc) { diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index ffbd67b..1ea4ecf 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -129,25 +129,6 @@ bool smb_io_uuid(const char *desc, struct GUID *uuid, } /******************************************************************* - Inits a UNISTR structure. -********************************************************************/ - -void init_unistr(UNISTR *str, const char *buf) -{ - size_t len; - - if (buf == NULL) { - str->buffer = NULL; - return; - } - - len = rpcstr_push_talloc(talloc_tos(), &str->buffer, buf); - if (len == (size_t)-1) { - str->buffer = NULL; - } -} - -/******************************************************************* Inits a UNISTR2 structure. ********************************************************************/ diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 1d0e9a3..9721628 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -2260,14 +2260,13 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c, info_dst.info2.secdesc = NULL; #if 0 - if (asprintf(&devicename, "\\\\%s\\%s", longname, - printername) < 0) { + info_dst.info2.devmode.devicename = + talloc_asprintf(mem_ctx, "\\\\%s\\%s", + longname, printername); + if (!info_dst.info2.devmode.devicename) { nt_status = NT_STATUS_NO_MEMORY; goto done; } - - init_unistr(&ctr_dst.printers_2->devmode->devicename, - devicename); #endif if (!net_spoolss_setprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, level, &info_dst)) -- Samba Shared Repository