The branch, master has been updated
       via  cf5c28d replace: Fix check for gettimeofday()
       via  36830db net: reformat usage text for 'net ads join'
       via  d7a617f docs: mention new --no-dns-updates parameter in manpage of 
net.
       via  ae81a40 net: add option --no-dns-updates for net ads join
      from  a44a0c4 libsmb: Fix CID 1034606 Incorrect pointer comparison

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cf5c28da00d46467bb4333e0f91822d37328cc20
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Sep 9 13:47:42 2015 +0200

    replace: Fix check for gettimeofday()
    
    The check does not include <sys/time.h> the test might fail with a
    implicit function declaration error.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Thu Sep 10 00:36:16 CEST 2015 on sn-devel-104

commit 36830db46aba8b5875666e684e00178245e49816
Author: Michael Adam <ob...@samba.org>
Date:   Wed Sep 9 08:58:43 2015 +0200

    net: reformat usage text for 'net ads join'
    
    Make the items nicely aligned again and do not exceed 80 columns.
    A few typos are fixed along the way.
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit d7a617f2f00c4a2b5294523fa651915c85de0d8b
Author: Michael Adam <ob...@samba.org>
Date:   Wed Sep 9 08:40:31 2015 +0200

    docs: mention new --no-dns-updates parameter in manpage of net.
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit ae81a40b1193ef93add61666ace6fff1a1e0676a
Author: Michael Adam <ob...@samba.org>
Date:   Wed Sep 9 08:28:43 2015 +0200

    net: add option --no-dns-updates for net ads join
    
    If called with this option, 'net ads join' will not attempt
    to perform dns updates.
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/net.8.xml | 12 ++++++++++--
 lib/replace/wscript         |  4 +++-
 source3/utils/net.c         |  2 ++
 source3/utils/net.h         |  1 +
 source3/utils/net_ads.c     | 48 +++++++++++++++++++++++++--------------------
 5 files changed, 43 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml
index a2bca95..f459bf4 100644
--- a/docs-xml/manpages/net.8.xml
+++ b/docs-xml/manpages/net.8.xml
@@ -371,6 +371,13 @@
                </para></listitem>
                </varlistentry>
 
+               <varlistentry>
+               <term>--no-dns-updates</term>
+               <listitem><para>Do not perform DNS updates as part of
+               "net ads join".
+               </para></listitem>
+               </varlistentry>
+
                &stdarg.encrypt;
                &popt.common.samba.client;
 
@@ -439,8 +446,9 @@ The remote server must be specified with the -S option.
 </refsect2>
 
 <refsect2>
-<title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
-[createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] 
[options]</title>
+<title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
+[createupn=UPN] [createcomputer=OU] [machinepass=PASS]
+[osName=string osVer=string] [options]</title>
 
 <para>
 Join a domain.  If the account already exists on the server, and 
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 30eede2..9a8b7f7 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -502,7 +502,9 @@ removeea setea
                        addmain=False,
                        msg='Checking for working strptime')
 
-    conf.CHECK_CODE('gettimeofday(NULL, NULL)', 'HAVE_GETTIMEOFDAY_TZ', 
execute=False)
+    conf.CHECK_C_PROTOTYPE('gettimeofday',
+                           'int gettimeofday(struct timeval *tv, struct 
timezone *tz)',
+                           define='HAVE_GETTIMEOFDAY_TZ', headers='sys/time.h')
 
     conf.CHECK_CODE('#include "test/snprintf.c"',
                     define="HAVE_C99_VSNPRINTF",
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 8182323..6bf719b 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -839,6 +839,8 @@ static struct functable net_func[] = {
                {"wipe", 0, POPT_ARG_NONE, &c->opt_wipe},
                /* Options for 'net registry import' */
                {"precheck", 0, POPT_ARG_STRING, &c->opt_precheck},
+               /* Options for 'net ads join' */
+               {"no-dns-updates", 0, POPT_ARG_NONE, &c->opt_no_dns_updates},
                POPT_COMMON_SAMBA
                { 0, 0, 0, 0}
        };
diff --git a/source3/utils/net.h b/source3/utils/net.h
index cded8e1..d6dfeb6 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -84,6 +84,7 @@ struct net_context {
        const char *opt_output;
        int opt_wipe;
        const char *opt_precheck;
+       int opt_no_dns_updates;
 
        int opt_have_ip;
        struct sockaddr_storage opt_dest_ip;
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index a0f59af..5cc07a0 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1318,26 +1318,29 @@ static NTSTATUS net_update_dns(struct net_context *c, 
TALLOC_CTX *mem_ctx, ADS_S
 
 static int net_ads_join_usage(struct net_context *c, int argc, const char 
**argv)
 {
-       d_printf(_("net ads join [options]\n"
+       d_printf(_("net ads join [--no-dns-updates] [options]\n"
                   "Valid options:\n"));
-       d_printf(_("   createupn[=UPN]    Set the userPrincipalName attribute 
during the join.\n"
-                  "                      The deault UPN is in the form 
host/netbiosname@REALM.\n"));
-       d_printf(_("   createcomputer=OU  Precreate the computer account in a 
specific OU.\n"
-                  "                      The OU string read from top to bottom 
without RDNs and delimited by a '/'.\n"
-                  "                      E.g. 
\"createcomputer=Computers/Servers/Unix\"\n"
-                  "                      NB: A backslash '\\' is used as 
escape at multiple levels and may\n"
-                  "                          need to be doubled or even 
quadrupled.  It is not used as a separator.\n"));
-       d_printf(_("   machinepass=PASS   Set the machine password to a 
specific value during the join.\n"
-                  "                      The deault password is random.\n"));
-       d_printf(_("   osName=string      Set the operatingSystem attribute 
during the join.\n"));
-       d_printf(_("   osVer=string       Set the operatingSystemVersion 
attribute during the join.\n"
-                  "                      NB: osName and osVer must be 
specified together for either to take effect.\n"
-                  "                          Also, the operatingSystemService 
attribute is also set when along with\n"
-                  "                          the two other attributes.\n"));
-
-       d_printf(_("   osServicePack=string Set the operatingSystemServicePack "
-                  "attribute during the join. Note: if not specified then by "
-                  "default the samba version string is used instead.\n"));
+       d_printf(_("   createupn[=UPN]       Set the userPrincipalName 
attribute during the join.\n"
+                  "                         The default UPN is in the form 
host/netbiosname@REALM.\n"));
+       d_printf(_("   createcomputer=OU     Precreate the computer account in 
a specific OU.\n"
+                  "                         The OU string read from top to 
bottom without RDNs\n"
+                  "                         and delimited by a '/'.\n"
+                  "                         E.g. 
\"createcomputer=Computers/Servers/Unix\"\n"
+                  "                         NB: A backslash '\\' is used as 
escape at multiple\n"
+                  "                             levels and may need to be 
doubled or even\n"
+                  "                             quadrupled. It is not used as 
a separator.\n"));
+       d_printf(_("   machinepass=PASS      Set the machine password to a 
specific value during\n"
+                  "                         the join. The default password is 
random.\n"));
+       d_printf(_("   osName=string         Set the operatingSystem attribute 
during the join.\n"));
+       d_printf(_("   osVer=string          Set the operatingSystemVersion 
attribute during join.\n"
+                  "                         NB: osName and osVer must be 
specified together for\n"
+                  "                             either to take effect. The 
operatingSystemService\n"
+                  "                             attribute is then also set 
along with the two\n"
+                  "                             other attributes.\n"));
+       d_printf(_("   osServicePack=string  Set the operatingSystemServicePack 
attribute\n"
+                  "                         during the join.\n"
+                  "                         NB: If not specified then by 
default the samba\n"
+                  "                             version string is used 
instead.\n"));
        return -1;
 }
 
@@ -1594,11 +1597,14 @@ int net_ads_join(struct net_context *c, int argc, const 
char **argv)
        }
 
        /*
-        * We try doing the dns update (if it was compiled in).
+        * We try doing the dns update (if it was compiled in
+        * and if it was not disabled on the command line).
         * If the dns update fails, we still consider the join
         * operation as succeeded if we came this far.
         */
-       _net_ads_join_dns_updates(c, ctx, r);
+       if (!c->opt_no_dns_updates) {
+               _net_ads_join_dns_updates(c, ctx, r);
+       }
 
        TALLOC_FREE(r);
        TALLOC_FREE( ctx );


-- 
Samba Shared Repository

Reply via email to