From 9b54c7ca214194469b263aebaeca74d67c50f7ff Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 25 Aug 2004 12:11:28 +0000 Subject: r2065: add libnet_RemoteTOD() call with levels GENERIC and SRVSVC metze (This used to be commit 72e3b351d0169366aa88c5445ffa555da6efd1d0) --- source4/libnet/libnet_time.c | 121 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 source4/libnet/libnet_time.c (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c new file mode 100644 index 0000000000..f56e6480e9 --- /dev/null +++ b/source4/libnet/libnet_time.c @@ -0,0 +1,121 @@ +/* + Unix SMB/CIFS implementation. + + Copyright (C) Stefan Metzmacher 2004 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +/* + * get the remote time of a server via srvsvc_NetRemoteTOD + */ +static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r) +{ + NTSTATUS status; + union libnet_rpc_connect c; + struct srvsvc_NetRemoteTOD tod; + struct tm tm; + + /* prepare connect to the SRVSVC pipe of a timeserver */ + c.standard.level = LIBNET_RPC_CONNECT_STANDARD; + c.standard.in.server_name = r->srvsvc.in.server_name; + c.standard.in.dcerpc_iface_name = DCERPC_SRVSVC_NAME; + c.standard.in.dcerpc_iface_uuid = DCERPC_SRVSVC_UUID; + c.standard.in.dcerpc_iface_version = DCERPC_SRVSVC_VERSION; + + /* 1. connect to the SRVSVC pipe of a timeserver */ + status = libnet_rpc_connect(ctx, mem_ctx, &c); + if (!NT_STATUS_IS_OK(status)) { + r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, + "Connection to SRVSVC pipe of server '%s' failed: %s\n", + r->srvsvc.in.server_name, nt_errstr(status)); + return status; + } + + /* prepare srvsvc_NetrRemoteTOD */ + tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.standard.in.server_name); + + /* 2. try srvsvc_NetRemoteTOD */ + status = dcerpc_srvsvc_NetRemoteTOD(c.pdc.out.dcerpc_pipe, mem_ctx, &tod); + if (!NT_STATUS_IS_OK(status)) { + r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, + "srvsvc_NetrRemoteTOD on server '%s' failed: %s\n", + r->srvsvc.in.server_name, nt_errstr(status)); + goto disconnect; + } + + /* check result of srvsvc_NetrRemoteTOD */ + if (!W_ERROR_IS_OK(tod.out.result)) { + r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, + "srvsvc_NetrRemoteTOD on server '%s' failed: %s\n", + r->srvsvc.in.server_name, win_errstr(tod.out.result)); + status = werror_to_ntstatus(tod.out.result); + goto disconnect; + } + + /* need to set the out parameters */ + tm.tm_sec = (int)tod.out.info->secs; + tm.tm_min = (int)tod.out.info->mins; + tm.tm_hour = (int)tod.out.info->hours; + tm.tm_mday = (int)tod.out.info->day; + tm.tm_mon = (int)tod.out.info->month -1; + tm.tm_year = (int)tod.out.info->year - 1900; + tm.tm_wday = -1; + tm.tm_yday = -1; + tm.tm_isdst = -1; + + r->srvsvc.out.time = timegm(&tm); + r->srvsvc.out.time_zone = ((int32_t)tod.out.info->timezone) * 60; + + goto disconnect; + +disconnect: + /* close connection */ + dcerpc_pipe_close(c.standard.out.dcerpc_pipe); + + return status; +} + +static NTSTATUS libnet_RemoteTOD_generic(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r) +{ + NTSTATUS status; + union libnet_RemoteTOD r2; + + r2.srvsvc.level = LIBNET_REMOTE_TOD_SRVSVC; + r2.srvsvc.in.server_name = r->generic.in.server_name; + + status = libnet_RemoteTOD(ctx, mem_ctx, &r2); + + r->generic.out.time = r2.srvsvc.out.time; + r->generic.out.time_zone = r2.srvsvc.out.time_zone; + + r->generic.out.error_string = r2.srvsvc.out.error_string; + + return status; +} + +NTSTATUS libnet_RemoteTOD(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r) +{ + switch (r->generic.level) { + case LIBNET_REMOTE_TOD_GENERIC: + return libnet_RemoteTOD_generic(ctx, mem_ctx, r); + case LIBNET_REMOTE_TOD_SRVSVC: + return libnet_RemoteTOD_srvsvc(ctx, mem_ctx, r); + } + + return NT_STATUS_INVALID_LEVEL; +} -- cgit From 90067934cd3195df80f8b1e614629d51fffcb38b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 10:30:34 +0000 Subject: r3428: switched to using minimal includes for the auto-generated RPC code. The thing that finally convinced me that minimal includes was worth pursuing for rpc was a compiler (tcc) that failed to build Samba due to reaching internal limits of the size of include files. Also the fact that includes.h.gch was 16MB, which really seems excessive. This patch brings it back to 12M, which is still too large, but better. Note that this patch speeds up compile times for both the pch and non-pch case. This change also includes the addition iof a "depends()" option in our IDL files, allowing you to specify that one IDL file depends on another. This capability was needed for the auto-includes generation. (This used to be commit b8f5fa8ac8e8725f3d321004f0aedf4246fc6b49) --- source4/libnet/libnet_time.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index f56e6480e9..6a5eec7c26 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "librpc/gen_ndr/ndr_srvsvc.h" /* * get the remote time of a server via srvsvc_NetRemoteTOD -- cgit From ead3508ac81ff3ed2a48753f3b5e23537ba6ec73 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 00:24:21 +0000 Subject: r3447: more include/system/XXX.h include files (This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105) --- source4/libnet/libnet_time.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 6a5eec7c26..fefddce39b 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -20,6 +20,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_srvsvc.h" +#include "system/time.h" /* * get the remote time of a server via srvsvc_NetRemoteTOD -- cgit From 6bd02aa5046b606171a680e6f8aefba31b744af1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 11:42:35 +0000 Subject: r3478: split out some more pieces of includes.h (This used to be commit 8e9212ecfc61c509f686363d8ec412ce54bc1c8d) --- source4/libnet/libnet_time.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index fefddce39b..b0d304ffcc 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "libnet/libnet.h" #include "librpc/gen_ndr/ndr_srvsvc.h" #include "system/time.h" -- cgit From c62615f2686a048bbb470801b146d589b17eece4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 6 Dec 2004 11:10:15 +0000 Subject: r4075: implement RemoteTOD server function metze (This used to be commit 0c6d4246a45f649e7373606f12db74c2acd0f538) --- source4/libnet/libnet_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index b0d304ffcc..ddf26876b9 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -82,7 +82,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * tm.tm_isdst = -1; r->srvsvc.out.time = timegm(&tm); - r->srvsvc.out.time_zone = ((int32_t)tod.out.info->timezone) * 60; + r->srvsvc.out.time_zone = tod.out.info->timezone * 60; goto disconnect; -- cgit From 645711c602313940dcf80ec786557920ecfbf884 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 22 Mar 2005 08:00:45 +0000 Subject: r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree... The main volume of this patch was what I started working on today: - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context. - Uses sepereate inner loops for some of the DCE/RPC tests The other and more important part of this patch fixes issues surrounding the new credentials framwork: This makes the struct cli_credentials always a talloc() structure, rather than on the stack. Parts of the cli_credentials code already assumed this. There were other issues, particularly in the DCERPC over SMB handling, as well as little things that had to be tidied up before test_w2k3.sh would start to pass. Andrew Bartlett (This used to be commit 0453f9d05d2e336fba1f85dbf2718d01fa2bf778) --- source4/libnet/libnet_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index ddf26876b9..b8f4cb7a86 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -88,7 +88,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * disconnect: /* close connection */ - dcerpc_pipe_close(c.standard.out.dcerpc_pipe); + talloc_free(c.standard.out.dcerpc_pipe); return status; } -- cgit From 4fa6a156bc087c5d8a9c796b9e93939273006404 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sat, 2 Jul 2005 14:33:55 +0000 Subject: r8077: Propagate changes in rpc connect routine to functions using it (it's quite common). rafal (This used to be commit 798b00c24ae30a08ac81342d13130a6a2f9d3a08) --- source4/libnet/libnet_time.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index b8f4cb7a86..63d63e104f 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -29,19 +29,19 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r) { NTSTATUS status; - union libnet_rpc_connect c; + struct libnet_RpcConnect c; struct srvsvc_NetRemoteTOD tod; struct tm tm; /* prepare connect to the SRVSVC pipe of a timeserver */ - c.standard.level = LIBNET_RPC_CONNECT_STANDARD; - c.standard.in.server_name = r->srvsvc.in.server_name; - c.standard.in.dcerpc_iface_name = DCERPC_SRVSVC_NAME; - c.standard.in.dcerpc_iface_uuid = DCERPC_SRVSVC_UUID; - c.standard.in.dcerpc_iface_version = DCERPC_SRVSVC_VERSION; + c.level = LIBNET_RPC_CONNECT_SERVER; + c.in.domain_name = r->srvsvc.in.server_name; + c.in.dcerpc_iface_name = DCERPC_SRVSVC_NAME; + c.in.dcerpc_iface_uuid = DCERPC_SRVSVC_UUID; + c.in.dcerpc_iface_version = DCERPC_SRVSVC_VERSION; /* 1. connect to the SRVSVC pipe of a timeserver */ - status = libnet_rpc_connect(ctx, mem_ctx, &c); + status = libnet_RpcConnect(ctx, mem_ctx, &c); if (!NT_STATUS_IS_OK(status)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, "Connection to SRVSVC pipe of server '%s' failed: %s\n", @@ -50,10 +50,10 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * } /* prepare srvsvc_NetrRemoteTOD */ - tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.standard.in.server_name); + tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.in.domain_name); /* 2. try srvsvc_NetRemoteTOD */ - status = dcerpc_srvsvc_NetRemoteTOD(c.pdc.out.dcerpc_pipe, mem_ctx, &tod); + status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, &tod); if (!NT_STATUS_IS_OK(status)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, "srvsvc_NetrRemoteTOD on server '%s' failed: %s\n", @@ -88,7 +88,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * disconnect: /* close connection */ - talloc_free(c.standard.out.dcerpc_pipe); + talloc_free(c.out.dcerpc_pipe); return status; } -- cgit From acd6a086b341096fcbea1775ce748587fcc8020a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 14:28:01 +0000 Subject: r12510: Change the DCE/RPC interfaces to take a pointer to a dcerpc_interface_table struct rather then a tuple of interface name, UUID and version. This removes the requirement for having a global list of DCE/RPC interfaces, except for these parts of the code that use that list explicitly (ndrdump and the scanner torture test). This should also allow us to remove the hack that put the authservice parameter in the dcerpc_binding struct as it can now be read directly from dcerpc_interface_table. I will now modify some of these functions to take a dcerpc_syntax_id structure rather then a full dcerpc_interface_table. (This used to be commit 8aae0f168e54c01d0866ad6e0da141dbd828574f) --- source4/libnet/libnet_time.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 63d63e104f..655a475503 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -36,9 +36,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * /* prepare connect to the SRVSVC pipe of a timeserver */ c.level = LIBNET_RPC_CONNECT_SERVER; c.in.domain_name = r->srvsvc.in.server_name; - c.in.dcerpc_iface_name = DCERPC_SRVSVC_NAME; - c.in.dcerpc_iface_uuid = DCERPC_SRVSVC_UUID; - c.in.dcerpc_iface_version = DCERPC_SRVSVC_VERSION; + c.in.dcerpc_iface = &dcerpc_table_srvsvc; /* 1. connect to the SRVSVC pipe of a timeserver */ status = libnet_RpcConnect(ctx, mem_ctx, &c); -- cgit From d4de4c2d210d2e8c9b5aedf70695594809ad6a0b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Dec 2005 13:16:54 +0000 Subject: r12608: Remove some unused #include lines. (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981) --- source4/libnet/libnet_time.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 655a475503..7d480a5348 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -20,7 +20,6 @@ #include "includes.h" #include "libnet/libnet.h" -#include "librpc/gen_ndr/ndr_srvsvc.h" #include "system/time.h" /* -- cgit From b135f4467f8413f6ac44df54b8430305f6c26c0c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 12 Jan 2006 03:02:00 +0000 Subject: r12858: This moves the libnet_LookupPdc code to use a GetDC request to find the remote server's name, or in the absence of a local nbt_server to communicate with (or without root access), a node status request. The result is that we are in a better position to use kerberos, as well as to remove the 'password server' mandatory parameter for the samsync and samdump commands. (I need this to put these into SWAT). The only problem I have is that I must create a messaging context, which requires a server ID. As a client process, I don't expect to get messages, but it is currently required for replies, so I generate a random() number. We probably need the servers to accept connections on streamed sockets too, for client-only tasks that want IRPC. Because I wanted to test this code, I have put the NET-API-* tests into our test scripts, to ensure they pass and keep passing. They are good frontends onto the libnet system, and I see no reason not to test them. In doing so the NET-API-RPCCONNECT test was simplified to take a binding string on the command line, removing duplicate code, and testing the combinations in the scripts instead. (I have done a bit of work on the list shares code in libnet_share.c to make it pass 'make test') In the future, I would like to extend the libcli/findds.c code (based off volker's winbind/wb_async_helpers.c, which is why it shows up a bit odd in the patch) to handle getting multiple name replies, sending a getdc request to each in turn. (posted to samba-technical for review, and I'll happily update with any comments) Andrew Bartlett (This used to be commit 7ccddfd3515fc2c0d6f447c768ccbf7a220c3380) --- source4/libnet/libnet_time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 7d480a5348..c7f8c79db5 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -33,9 +33,9 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * struct tm tm; /* prepare connect to the SRVSVC pipe of a timeserver */ - c.level = LIBNET_RPC_CONNECT_SERVER; - c.in.domain_name = r->srvsvc.in.server_name; - c.in.dcerpc_iface = &dcerpc_table_srvsvc; + c.level = LIBNET_RPC_CONNECT_SERVER; + c.in.name = r->srvsvc.in.server_name; + c.in.dcerpc_iface = &dcerpc_table_srvsvc; /* 1. connect to the SRVSVC pipe of a timeserver */ status = libnet_RpcConnect(ctx, mem_ctx, &c); @@ -47,7 +47,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * } /* prepare srvsvc_NetrRemoteTOD */ - tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.in.domain_name); + tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.in.name); /* 2. try srvsvc_NetRemoteTOD */ status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, &tod); -- cgit From 1060f6b3f621cb70b075a879f129e57f10fdbf8a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 23:35:30 +0000 Subject: r14402: Generate seperate headers for RPC client functions. (This used to be commit 7054ebf0249930843a2baf4d023ae8f62cedb109) --- source4/libnet/libnet_time.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index c7f8c79db5..d1d8298e3c 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -21,6 +21,7 @@ #include "includes.h" #include "libnet/libnet.h" #include "system/time.h" +#include "librpc/gen_ndr/ndr_srvsvc_c.h" /* * get the remote time of a server via srvsvc_NetRemoteTOD -- cgit From 8528016978b084213ef53d66e1b6e831b1a01acc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 00:23:11 +0000 Subject: r14464: Don't include ndr_BASENAME.h files unless strictly required, instead try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd) --- source4/libnet/libnet_time.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index d1d8298e3c..211cbc9e7f 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -21,6 +21,7 @@ #include "includes.h" #include "libnet/libnet.h" #include "system/time.h" +#include "librpc/gen_ndr/ndr_srvsvc.h" #include "librpc/gen_ndr/ndr_srvsvc_c.h" /* -- cgit From 4f1c8daa36a7a0372c5fd9eab51f3c16ee81c49d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 12:43:28 +0000 Subject: r14470: Remove some unnecessary headers. (This used to be commit f7312dab3b9aba2b2b82e8a6e0c483a32a03a63a) --- source4/libnet/libnet_time.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 211cbc9e7f..d1d8298e3c 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -21,7 +21,6 @@ #include "includes.h" #include "libnet/libnet.h" #include "system/time.h" -#include "librpc/gen_ndr/ndr_srvsvc.h" #include "librpc/gen_ndr/ndr_srvsvc_c.h" /* -- cgit From e7ede84c331b112efa5232d0f7dcc6732b95aebe Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Sep 2006 09:54:44 +0000 Subject: r18609: error_string should not contain newlines. Guenther (This used to be commit 556666756418ad50c533199c736fe3696a7e20cb) --- source4/libnet/libnet_time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index d1d8298e3c..810cebedfd 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -42,7 +42,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * status = libnet_RpcConnect(ctx, mem_ctx, &c); if (!NT_STATUS_IS_OK(status)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, - "Connection to SRVSVC pipe of server '%s' failed: %s\n", + "Connection to SRVSVC pipe of server '%s' failed: %s", r->srvsvc.in.server_name, nt_errstr(status)); return status; } @@ -54,7 +54,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, &tod); if (!NT_STATUS_IS_OK(status)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, - "srvsvc_NetrRemoteTOD on server '%s' failed: %s\n", + "srvsvc_NetrRemoteTOD on server '%s' failed: %n", r->srvsvc.in.server_name, nt_errstr(status)); goto disconnect; } @@ -62,7 +62,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * /* check result of srvsvc_NetrRemoteTOD */ if (!W_ERROR_IS_OK(tod.out.result)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, - "srvsvc_NetrRemoteTOD on server '%s' failed: %s\n", + "srvsvc_NetrRemoteTOD on server '%s' failed: %s", r->srvsvc.in.server_name, win_errstr(tod.out.result)); status = werror_to_ntstatus(tod.out.result); goto disconnect; -- cgit From 28c9c212bc49cef7e5d67f8e93f1991f93e560cc Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Sep 2006 09:58:53 +0000 Subject: r18610: Fix typo. Guenther (This used to be commit 759914a07e1f85617c82ee5f4a6f3193fb9cc111) --- source4/libnet/libnet_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 810cebedfd..2631b16782 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -54,7 +54,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, &tod); if (!NT_STATUS_IS_OK(status)) { r->srvsvc.out.error_string = talloc_asprintf(mem_ctx, - "srvsvc_NetrRemoteTOD on server '%s' failed: %n", + "srvsvc_NetrRemoteTOD on server '%s' failed: %s", r->srvsvc.in.server_name, nt_errstr(status)); goto disconnect; } -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libnet/libnet_time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index 2631b16782..ef06577c21 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From f14bd1a90ab47a418c0ec2492990a417a0bb3bf6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 21:23:03 +0000 Subject: r24557: rename 'dcerpc_table_' -> 'ndr_table_' metze (This used to be commit 84651aee81aaabbebf52ffc3fbcbabb2eec6eed5) --- source4/libnet/libnet_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/libnet_time.c') diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index ef06577c21..e1e53fb947 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -35,7 +35,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * /* prepare connect to the SRVSVC pipe of a timeserver */ c.level = LIBNET_RPC_CONNECT_SERVER; c.in.name = r->srvsvc.in.server_name; - c.in.dcerpc_iface = &dcerpc_table_srvsvc; + c.in.dcerpc_iface = &ndr_table_srvsvc; /* 1. connect to the SRVSVC pipe of a timeserver */ status = libnet_RpcConnect(ctx, mem_ctx, &c); -- cgit