The branch, master has been updated via b4b43fc... s4-netlogon: fixed dc_unc and dc_address_type via 5e69259... build: added uname display and SYSTEM_UNAME define via a9f5bfb... util-runcmd: ignore spurious ECHILD errors from 4f5298c... s4-smbtorture: add test for csetprinter field behaviour in printer info level 0.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit b4b43fcb4c3e8b046489ea03b70f7c0a77bc5065 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Apr 20 23:42:28 2010 +1000 s4-netlogon: fixed dc_unc and dc_address_type These are needed for dcpromo from w2k8r2 commit 5e69259671d317aebaae54ec9adc30e58f70076f Author: Andrew Tridgell <tri...@samba.org> Date: Tue Apr 20 23:17:32 2010 +1000 build: added uname display and SYSTEM_UNAME define suggestion from Metze commit a9f5bfb3a5324f09a07657a8bb28bb4510485d31 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Apr 20 21:45:33 2010 +1000 util-runcmd: ignore spurious ECHILD errors when we get ECHILD in samba_runcmd it is because the parent has set SIGCHLD to SIG_IGN. In that case the child status information is lost. We then have to fallback on the logging of child error messages for any useful information on what happened to the child. A longer term fix is to stop using SIG_IGN for SIGCHLD in the standard process model of s4. ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_conftests.py | 19 +++++++++++++++++++ buildtools/wafsamba/wscript | 3 +++ lib/util/util_runcmd.c | 14 ++++++++++++++ source4/rpc_server/netlogon/dcerpc_netlogon.c | 4 +++- 4 files changed, 39 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index e86f939..1794758 100644 --- a/buildtools/wafsamba/samba_conftests.py +++ b/buildtools/wafsamba/samba_conftests.py @@ -237,3 +237,22 @@ WriteMakefile( conf.check_message_2('ok') return True + + +...@conf +def CHECK_UNAME(conf, flags=None, msg=None, define=None): + '''return uname result''' + cmd = ['uname'] + if flags is not None: + cmd.append(flags) + if msg is None: + msg = 'Checking uname' + conf.COMPOUND_START(msg) + ret = Utils.cmd_output(cmd) + ret = ret.strip() + conf.COMPOUND_END(ret) + if define: + conf.DEFINE(define, ret, quote=True) + return ret + + diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index a49e5e7..66e1ae5 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -130,6 +130,9 @@ def configure(conf): conf.check_tool('gnu_dirs') conf.check_tool('wafsamba') + conf.CHECK_UNAME(msg='Checking system type', define='SYSTEM_UNAME') + conf.CHECK_UNAME(flags='-a') + conf.CHECK_CC_ENV() conf.check_tool('compiler_cc') diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c index d81a0ac..aa2a3e6 100644 --- a/lib/util/util_runcmd.c +++ b/lib/util/util_runcmd.c @@ -241,6 +241,20 @@ static void samba_runcmd_io_handler(struct tevent_context *ev, * stderr, assume its dead */ pid_t pid = waitpid(state->pid, &status, 0); if (pid != state->pid) { + if (errno == ECHILD) { + /* this happens when the + parent has set SIGCHLD to + SIG_IGN. In that case we + can only get error + information for the child + via its logging. We should + stop using SIG_IGN on + SIGCHLD in the standard + process model. + */ + tevent_req_done(req); + return; + } DEBUG(0,("Error in waitpid() for child %s - %s \n", state->arg0, strerror(errno))); if (errno == 0) { diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index b920c13..d7aa425 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1521,9 +1521,11 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, info = talloc(mem_ctx, struct netr_DsRGetDCNameInfo); W_ERROR_HAVE_NO_MEMORY(info); - info->dc_unc = response.data.nt5_ex.pdc_dns_name; + info->dc_unc = talloc_asprintf(mem_ctx, "\\\\%s", + response.data.nt5_ex.pdc_dns_name); info->dc_address = talloc_asprintf(mem_ctx, "\\\\%s", response.data.nt5_ex.sockaddr.pdc_ip); + info->dc_address_type = DS_ADDRESS_TYPE_INET; W_ERROR_HAVE_NO_MEMORY(info->dc_address); info->domain_guid = response.data.nt5_ex.domain_uuid; info->domain_name = response.data.nt5_ex.dns_domain; -- Samba Shared Repository