The branch, master has been updated via f44ad36 samba-tool domain provision: DNS forwarder is not a boolean. via 78cb9fd Remove compatibility code for setproctitle() now moved to libreplace. via fd8d4ec replace: Support setproctitle(). via 6641d76 samba-tool domain-provision: Avoid python2.5-isms. via 61ce3e8 samba-tool domain-provision: Fix docstring. from df48092 script/autobuild.py: set the default for --log-base to the current gitroot
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f44ad3671876802a42846597be901257633e8ca3 Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Sep 24 23:02:05 2012 +0200 samba-tool domain provision: DNS forwarder is not a boolean. Autobuild-User(master): Jelmer Vernooij <jel...@samba.org> Autobuild-Date(master): Tue Sep 25 00:48:43 CEST 2012 on sn-devel-104 commit 78cb9fd91bc1ac73ad1a1deb8c9423f88729b707 Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Sep 24 09:42:15 2012 +0200 Remove compatibility code for setproctitle() now moved to libreplace. commit fd8d4ec34785e71de3f8458222d196d454d0e723 Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Sep 24 09:20:46 2012 +0200 replace: Support setproctitle(). This uses the setproctitle() from libc, libsetproctitle or libbsd. If none is available it provides a dummy implementation. commit 6641d76562db10e6289c5e819b1296d8f6df37bf Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Sep 24 08:26:12 2012 +0200 samba-tool domain-provision: Avoid python2.5-isms. commit 61ce3e871a1fc1d16202d337d74c2e10f64b2c86 Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Sep 24 08:21:27 2012 +0200 samba-tool domain-provision: Fix docstring. ----------------------------------------------------------------------- Summary of changes: lib/replace/README | 1 + lib/replace/replace.c | 7 +++++++ lib/replace/replace.h | 9 +++++++++ lib/replace/wscript | 2 ++ source4/scripting/python/samba/netcmd/domain.py | 13 ++++++++----- source4/smbd/process_onefork.c | 13 ------------- source4/smbd/process_prefork.c | 13 ------------- source4/smbd/process_standard.c | 13 ------------- 8 files changed, 27 insertions(+), 44 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/README b/lib/replace/README index 5399971..e960dc8 100644 --- a/lib/replace/README +++ b/lib/replace/README @@ -73,6 +73,7 @@ readlink symlink realpath poll +setproctitle Types: bool diff --git a/lib/replace/replace.c b/lib/replace/replace.c index ebfe04d..a0aa788 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -894,3 +894,10 @@ int rep_usleep(useconds_t sec) return 0; } #endif /* HAVE_USLEEP */ + +#ifndef HAVE_SETPROCTITLE +void rep_setproctitle(const char *fmt, ...) +{ + return 0; +} +#endif diff --git a/lib/replace/replace.h b/lib/replace/replace.h index c7f9c71..bbea0fc 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -128,6 +128,10 @@ #include <sys/types.h> #endif +#ifdef HAVE_SETPROCTITLE_H +#include <setproctitle.h> +#endif + #if STDC_HEADERS #include <stdlib.h> #include <stddef.h> @@ -845,4 +849,9 @@ typedef long useconds_t; int usleep(useconds_t); #endif +#ifndef HAVE_SETPROCTITLE +#define setproctitle rep_setproctitle +void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); +#endif + #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/lib/replace/wscript b/lib/replace/wscript index d5b2631..f1f1cef 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -193,6 +193,8 @@ struct foo bar = { .y = 'X', .x = 1 }; checklibc=True) if not conf.CHECK_FUNCS('getpeereid'): conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') + if not conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h'): + conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h') conf.CHECK_CODE(''' struct ucred cred; diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 0954f63..4c76f0b 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -137,9 +137,9 @@ class cmd_domain_info(Command): class cmd_domain_provision(Command): - """Promotes an existing domain member or NT4 PDC to an AD DC""" + """Provision a domain.""" - synopsis = "%prog <dnsdomain> [DC|RODC] [options]" + synopsis = "%prog [options]" takes_optiongroups = { "sambaopts": options.SambaOptions, @@ -265,7 +265,10 @@ class cmd_domain_provision(Command): creds.set_kerberos_state(DONT_USE_KERBEROS) - suggested_forwarder = dns_forwarder is None and self._get_nameserver_ip() or dns_forwarder + if dns_forwarder is not None: + suggested_forwarder = dns_forwarder + else: + suggested_forwarder = self._get_nameserver_ip() if len(self.raw_argv) == 1: interactive = True @@ -392,8 +395,8 @@ class cmd_domain_provision(Command): serverrole=server_role, dom_for_fun_level=dom_for_fun_level, backend_type=ldap_backend_type, ldapadminpass=ldapadminpass, ol_mmr_urls=ol_mmr_urls, - useeadb=eadb, next_rid=next_rid, lp=lp, use_ntvfs=(use_ntvfs), - use_rfc2307=(use_rfc2307)) + useeadb=eadb, next_rid=next_rid, lp=lp, use_ntvfs=use_ntvfs, + use_rfc2307=use_rfc2307) except ProvisioningError, e: raise CommandError("Provision failed", e) diff --git a/source4/smbd/process_onefork.c b/source4/smbd/process_onefork.c index 251e507..b5e93d9 100644 --- a/source4/smbd/process_onefork.c +++ b/source4/smbd/process_onefork.c @@ -32,19 +32,6 @@ #include "param/param.h" #include "ldb_wrap.h" -#ifdef HAVE_SETPROCTITLE -#ifdef HAVE_SETPROCTITLE_H -#include <setproctitle.h> -#endif -#else -#define setproctitle none_setproctitle -static int none_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); -static int none_setproctitle(const char *fmt, ...) -{ - return 0; -} -#endif - NTSTATUS process_model_onefork_init(void); /* diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c index e4a519a..24ae4cf 100644 --- a/source4/smbd/process_prefork.c +++ b/source4/smbd/process_prefork.c @@ -32,19 +32,6 @@ #include "param/param.h" #include "ldb_wrap.h" -#ifdef HAVE_SETPROCTITLE -#ifdef HAVE_SETPROCTITLE_H -#include <setproctitle.h> -#endif -#else -#define setproctitle none_setproctitle -static int none_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); -static int none_setproctitle(const char *fmt, ...) -{ - return 0; -} -#endif - NTSTATUS process_model_prefork_init(void); /* diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index dd5f958..c5377b3 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -29,19 +29,6 @@ #include "param/param.h" #include "ldb_wrap.h" -#ifdef HAVE_SETPROCTITLE -#ifdef HAVE_SETPROCTITLE_H -#include <setproctitle.h> -#endif -#else -#define setproctitle none_setproctitle -static int none_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); -static int none_setproctitle(const char *fmt, ...) -{ - return 0; -} -#endif - NTSTATUS process_model_standard_init(void); /* we hold a pipe open in the parent, and the any child -- Samba Shared Repository