[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu May 20 03:50:01 UTC 2021


The branch, master has been updated
       via  09fed102c58 s3:utils: Migrate tevent_glib_tracker to new cmdline option parser
       via  de159c40c5b s3:torture: Migrate pdbtest to new cmdline option parser
       via  a19b9a2d4b9 docs-xml: Update vfstest manpage for new cmdline opition parser
       via  279c95cebfe s3:torture: Migrate vfstest to new cmdline option parser
       via  f81fe73f531 s3:rpc_server: Migrate test_mdsparser_es to new cmdline option parser
       via  0f6c86b2013 s3:lib: Migrate smbconftort to new cmdline option parser
       via  b87c36cb783 s3:param: Migrate test_lp_load to new cmdline option parser
       via  9caa71efa96 lib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE
       via  0433896ee8a lib:cmdline: Add a debug only option
       via  7fa1ae04df6 testprogs: Add additional rpcclient tests for new cmdline options
       via  ba7c2cee9d0 testprogs: Rename test_rpc_getusername_legacy()
       via  75088fdba74 docs-xml: Update rpcclient manpage for new cmdline opition parser
       via  4fb4da396c6 s3:rpcclient: Migrate rpcclient to new cmdline option parser
       via  4f9c07c0212 s3:rpcclient: Pass cli_credentials to process_cmd()
       via  894b8b3cab6 s3:rpcclient: Pass cli_credentials to do_cmd()
       via  ff7d4a65cab testprogs: Add more smbclient kerberos tests for new cmdline options
       via  74b2a52eebc docs-xml: Update smbclient manpage for new cmdline opition parser
       via  7b70a72b15c s3:client: Use samba_popt_get_context()
       via  64b8a3abeeb s3:client: Remove duplicate name-resolv (R) options
       via  e4474ac0a54 s3:client: Migrate smbclient to new cmdline option parser
      from  c216e056b22 selftest: Rename offline logon env to ad_member_offlogon

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


- Log -----------------------------------------------------------------
commit 09fed102c584caa5587df7bebde317f0dc51fbb7
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 12 12:58:24 2021 +0100

    s3:utils: Migrate tevent_glib_tracker to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu May 20 03:49:30 UTC 2021 on sn-devel-184

commit de159c40c5be8862270ca07b40c522cd9bacf6f4
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 12 12:53:08 2021 +0100

    s3:torture: Migrate pdbtest to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit a19b9a2d4b975fc13b882bfa2d714791d922dfea
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 18 10:24:09 2021 +0100

    docs-xml: Update vfstest manpage for new cmdline opition parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 279c95cebfed3aa8adbad6edad57e5bdbad6abf2
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 12 12:08:18 2021 +0100

    s3:torture: Migrate vfstest to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit f81fe73f531798a2530efe6b01700135585510d6
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 13 13:53:55 2021 +0100

    s3:rpc_server: Migrate test_mdsparser_es to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 0f6c86b201367675e1181cb31bcf5ed249683f9a
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 12 11:59:58 2021 +0100

    s3:lib: Migrate smbconftort to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit b87c36cb7832910edbe2cff11cd7570b23f8013b
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jan 8 08:27:19 2021 +0100

    s3:param: Migrate test_lp_load to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 9caa71efa96b502b65ae59fb54397eb43b55e333
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 13 09:56:41 2021 +0100

    lib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE
    
    This will prevent loading a config file. This will be needed for
    testparm.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 0433896ee8a0184d7e17b94f2309b457c65fc72d
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 5 14:23:27 2021 +0100

    lib:cmdline: Add a debug only option
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7fa1ae04df6fb0a3dc48471c2a468b569e0231f7
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Dec 2 17:15:05 2020 +0100

    testprogs: Add additional rpcclient tests for new cmdline options
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit ba7c2cee9d04d2e8a1ff46eaf0332594ac5b89a8
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Dec 2 17:07:14 2020 +0100

    testprogs: Rename test_rpc_getusername_legacy()
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 75088fdba74e010a3f9673834eb1fc21add7caad
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 18 10:04:47 2021 +0100

    docs-xml: Update rpcclient manpage for new cmdline opition parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 4fb4da396c60992acf890305230b560c97320f2c
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Dec 1 13:48:03 2020 +0100

    s3:rpcclient: Migrate rpcclient to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 4f9c07c021280c41cc71abe8175ae35bcd5cd651
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Dec 1 13:50:16 2020 +0100

    s3:rpcclient: Pass cli_credentials to process_cmd()
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 894b8b3cab6cebc0955276087fa1a4d3dac5bf82
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Dec 1 13:49:16 2020 +0100

    s3:rpcclient: Pass cli_credentials to do_cmd()
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit ff7d4a65cab9c08b58a885a967f2363f896d00f3
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Sep 2 10:44:36 2020 +0200

    testprogs: Add more smbclient kerberos tests for new cmdline options
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 74b2a52eebc7be3b73904c5e2375c3b9dc99056d
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 18 09:35:51 2021 +0100

    docs-xml: Update smbclient manpage for new cmdline opition parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7b70a72b15c64347d00f5e081b1ce5c82c5c8bcb
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Nov 11 09:56:41 2020 +0100

    s3:client: Use samba_popt_get_context()
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 64b8a3abeeb7b5c2069eada23224a7913cefc498
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Nov 9 16:05:38 2020 +0100

    s3:client: Remove duplicate name-resolv (R) options
    
    Detected by samba_popt_get_context(), see next commit.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e4474ac0a540c56548b4d15e38f2e234455e19b6
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Aug 18 16:58:19 2020 +0200

    s3:client: Migrate smbclient to new cmdline option parser
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 docs-xml/manpages/rpcclient.1.xml                  |  47 +++--
 docs-xml/manpages/smbclient.1.xml                  | 197 +++++++++----------
 docs-xml/manpages/vfstest.1.xml                    |  32 ++--
 lib/cmdline/cmdline.c                              |  25 +++
 lib/cmdline/cmdline.h                              |  18 +-
 lib/cmdline/cmdline_s3.c                           |   2 +
 source3/client/client.c                            | 210 +++++++++------------
 source3/lib/smbconf/testsuite.c                    |  28 ++-
 source3/param/test_lp_load.c                       |  33 +++-
 source3/param/wscript_build                        |   2 +-
 source3/rpc_server/mdssvc/test_mdsparser_es.c      |  29 ++-
 source3/rpcclient/cmd_spoolss.c                    |   6 +-
 source3/rpcclient/rpcclient.c                      |  72 +++----
 source3/rpcclient/wscript_build                    |   3 +-
 .../script/tests/test_smbclient_encryption_off.sh  |  18 +-
 source3/script/tests/test_smbclient_ntlm.sh        |   6 +-
 source3/script/tests/test_smbclient_s3.sh          |   4 +-
 source3/script/tests/vfstest-catia/run.sh          |   2 +-
 source3/selftest/tests.py                          |  20 +-
 source3/torture/pdbtest.c                          |  22 ++-
 source3/torture/vfstest.c                          |  24 ++-
 source3/utils/async-tracker.c                      |  24 ++-
 source3/wscript_build                              |  12 +-
 testprogs/blackbox/test_client_kerberos.sh         | 133 ++++++++++---
 24 files changed, 564 insertions(+), 405 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/rpcclient.1.xml b/docs-xml/manpages/rpcclient.1.xml
index 18f9c14b09e..5ea4f51b0cd 100644
--- a/docs-xml/manpages/rpcclient.1.xml
+++ b/docs-xml/manpages/rpcclient.1.xml
@@ -20,15 +20,37 @@
 <refsynopsisdiv>
 	<cmdsynopsis>
 		<command>rpcclient</command>
-		<arg choice="opt">-A authfile</arg>
-		<arg choice="opt">-c <command string></arg>
-		<arg choice="opt">-d debuglevel</arg>
-		<arg choice="opt">-l logdir</arg>
-		<arg choice="opt">-N</arg>
-		<arg choice="opt">-s <smb config file></arg>
-		<arg choice="opt">-U username[%password]</arg>
-		<arg choice="opt">-W workgroup</arg>
-		<arg choice="opt">-I destinationIP</arg>
+		<arg choice="opt">-c|--command=COMMANDS</arg>
+		<arg choice="opt">-I|--dest-ip=IP</arg>
+		<arg choice="opt">-p|--port=PORT</arg>
+		<arg choice="opt">-?|--help</arg>
+		<arg choice="opt">--usage</arg>
+		<arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
+		<arg choice="opt">--debug-stdout</arg>
+		<arg choice="opt">--configfile=CONFIGFILE</arg>
+		<arg choice="opt">--option=name=value</arg>
+		<arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
+		<arg choice="opt">--leak-report</arg>
+		<arg choice="opt">--leak-report-full</arg>
+		<arg choice="opt">-R|--name-resolve=NAME-RESOLVE-ORDER</arg>
+		<arg choice="opt">-O|--socket-options=SOCKETOPTIONS</arg>
+		<arg choice="opt">-m|--maxprotocol=MAXPROTOCOL</arg>
+		<arg choice="opt">-n|--netbiosname=NETBIOSNAME</arg>
+		<arg choice="opt">--netbios-scope=SCOPE</arg>
+		<arg choice="opt">-W|--workgroup=WORKGROUP</arg>
+		<arg choice="opt">--realm=REALM</arg>
+		<arg choice="opt">-U|--user=[DOMAIN/]USERNAME[%PASSWORD]</arg>
+		<arg choice="opt">-N|--no-pass</arg>
+		<arg choice="opt">--password=STRING</arg>
+		<arg choice="opt">--pw-nt-hash</arg>
+		<arg choice="opt">-A|--authentication-file=FILE</arg>
+		<arg choice="opt">-P|--machine-pass</arg>
+		<arg choice="opt">--simple-bind-dn=DN</arg>
+		<arg choice="opt">--use-kerberos=desired|required|off</arg>
+		<arg choice="opt">--use-krb5-ccache=CCACHE</arg>
+		<arg choice="opt">--use-winbind-ccache</arg>
+		<arg choice="opt">--client-protection=sign|encrypt|off</arg>
+		<arg choice="opt">-V|--version</arg>
 		<arg choice="req">BINDING-STRING|HOST</arg>
 	</cmdsynopsis>
 </refsynopsisdiv>
@@ -153,11 +175,10 @@
 		default. </para></listitem>
 		</varlistentry>
 
-		&stdarg.server.debug;
-		&popt.common.samba;
-		&popt.common.credentials;		
-		&popt.common.connection;
 		&popt.autohelp;
+		&cmdline.common.samba.client;
+		&cmdline.common.connection;
+		&cmdline.common.credentials;
 	</variablelist>
 </refsect1>
 
diff --git a/docs-xml/manpages/smbclient.1.xml b/docs-xml/manpages/smbclient.1.xml
index 64a3dc285bd..0de5b8a0e00 100644
--- a/docs-xml/manpages/smbclient.1.xml
+++ b/docs-xml/manpages/smbclient.1.xml
@@ -20,57 +20,94 @@
 <refsynopsisdiv>
 	<cmdsynopsis>
 		<command>smbclient</command>
-		<arg choice="opt">-b <buffer size></arg>
-		<arg choice="opt">-d debuglevel</arg>
-		<arg choice="opt">-e</arg>
-		<arg choice="opt">-L <netbios name></arg>
-		<arg choice="opt">-U username</arg>
-		<arg choice="opt">-I destinationIP</arg>
-		<arg choice="opt">-M <netbios name></arg>
-		<arg choice="opt">-m maxprotocol</arg>
-		<arg choice="opt">-A authfile</arg>
-		<arg choice="opt">-N</arg>
-		<arg choice="opt">-C</arg>
-		<arg choice="opt">-g</arg>
-		<arg choice="opt">-i scope</arg>
-		<arg choice="opt">-O <socket options></arg>
-		<arg choice="opt">-p port</arg>
-		<arg choice="opt">-R <name resolve order></arg>
-		<arg choice="opt">-s <smb config file></arg>
-		<arg choice="opt">-t <per-operation timeout in seconds></arg>
-		<arg choice="opt">-k</arg>
-		<arg choice="opt">-P</arg>
-		<arg choice="opt">-c <command></arg>
+		<arg choice="opt">-M|--message=HOST</arg>
+		<arg choice="opt">-I|--ip-address=IP</arg>
+		<arg choice="opt">-E|--stderr</arg>
+		<arg choice="opt">-L|--list=HOST</arg>
+		<arg choice="opt">-T|--tar=<c|x>IXFvgbNan</arg>
+		<arg choice="opt">-D|--directory=DIR</arg>
+		<arg choice="opt">-b|--send-buffer=BYTES</arg>
+		<arg choice="opt">-t|--timeout=SECONDS</arg>
+		<arg choice="opt">-p|--port=PORT</arg>
+		<arg choice="opt">-g|--grepable</arg>
+		<arg choice="opt">-q|--quiet</arg>
+		<arg choice="opt">-B|--browse</arg>
+		<arg choice="opt">-?|--help</arg>
+		<arg choice="opt">--usage</arg>
+		<arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
+		<arg choice="opt">--debug-stdout</arg>
+		<arg choice="opt">-s|--configfile=CONFIGFILE</arg>
+		<arg choice="opt">--option=name=value</arg>
+		<arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
+		<arg choice="opt">--leak-report</arg>
+		<arg choice="opt">--leak-report-full</arg>
+		<arg choice="opt">-R|--name-resolve=NAME-RESOLVE-ORDER</arg>
+		<arg choice="opt">-O|--socket-options=SOCKETOPTIONS</arg>
+		<arg choice="opt">-m|--maxprotocol=MAXPROTOCOL</arg>
+		<arg choice="opt">-n|--netbiosname=NETBIOSNAME</arg>
+		<arg choice="opt">--netbios-scope=SCOPE</arg>
+		<arg choice="opt">-W|--workgroup=WORKGROUP</arg>
+		<arg choice="opt">--realm=REALM</arg>
+		<arg choice="opt">-U|--user=[DOMAIN/]USERNAME%[PASSWORD]</arg>
+		<arg choice="opt">-N|--no-pass</arg>
+		<arg choice="opt">--password=STRING</arg>
+		<arg choice="opt">--pw-nt-hash</arg>
+		<arg choice="opt">-A|--authentication-file=FILE</arg>
+		<arg choice="opt">-P|--machine-pass</arg>
+		<arg choice="opt">--simple-bind-dn=DN</arg>
+		<arg choice="opt">--use-kerberos=desired|required|off</arg>
+		<arg choice="opt">--use-krb5-ccache=CCACHE</arg>
+		<arg choice="opt">--use-winbind-ccache</arg>
+		<arg choice="opt">--client-protection=sign|encrypt|off</arg>
+		<arg choice="opt">-V|--version</arg>
+		<arg choice="opt">-c|--command=STRING</arg>
 	</cmdsynopsis>
 
 	<cmdsynopsis>
 		<command>smbclient</command>
 		<arg choice="req">servicename</arg>
 		<arg choice="opt">password</arg>
-		<arg choice="opt">-b <buffer size></arg>
-		<arg choice="opt">-d debuglevel</arg>
-		<arg choice="opt">-e</arg>
-		<arg choice="opt">-D Directory</arg>
-		<arg choice="opt">-U username</arg>
-		<arg choice="opt">-W workgroup</arg>
-		<arg choice="opt">-M <netbios name></arg>
-		<arg choice="opt">-m maxprotocol</arg>
-		<arg choice="opt">-A authfile</arg>
-		<arg choice="opt">-N</arg>
-		<arg choice="opt">-C</arg>
-		<arg choice="opt">-g</arg>
-		<arg choice="opt">-l log-basename</arg>
-		<arg choice="opt">-I destinationIP</arg>
-		<arg choice="opt">-E</arg>
-		<arg choice="opt">-c <command string></arg>
-		<arg choice="opt">-i scope</arg>
-		<arg choice="opt">-O <socket options></arg>
-		<arg choice="opt">-p port</arg>
-		<arg choice="opt">-R <name resolve order></arg>
-		<arg choice="opt">-s <smb config file></arg>
-		<arg choice="opt">-t <per-operation timeout in seconds></arg>
-		<arg choice="opt">-T<c|x>IXFvgbNan</arg>
-		<arg choice="opt">-k</arg>
+		<arg choice="opt">-?|--help</arg>
+		<arg choice="opt">--usage</arg>
+		<arg choice="opt">-M|--message=HOST</arg>
+		<arg choice="opt">-I|--ip-address=IP</arg>
+		<arg choice="opt">-E|--stderr</arg>
+		<arg choice="opt">-L|--list=HOST</arg>
+		<arg choice="opt">-T|--tar=<c|x>IXFvgbNan</arg>
+		<arg choice="opt">-D|--directory=DIR</arg>
+		<arg choice="opt">-b|--send-buffer=BYTES</arg>
+		<arg choice="opt">-t|--timeout=SECONDS</arg>
+		<arg choice="opt">-p|--port=PORT</arg>
+		<arg choice="opt">-g|--grepable</arg>
+		<arg choice="opt">-q|--quiet</arg>
+		<arg choice="opt">-B|--browse</arg>
+		<arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
+		<arg choice="opt">--debug-stdout</arg>
+		<arg choice="opt">-s|--configfile=CONFIGFILE</arg>
+		<arg choice="opt">--option=name=value</arg>
+		<arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
+		<arg choice="opt">--leak-report</arg>
+		<arg choice="opt">--leak-report-full</arg>
+		<arg choice="opt">-R|--name-resolve=NAME-RESOLVE-ORDER</arg>
+		<arg choice="opt">-O|--socket-options=SOCKETOPTIONS</arg>
+		<arg choice="opt">-n|--netbiosname=NETBIOSNAME</arg>
+		<arg choice="opt">-W|--workgroup=WORKGROUP</arg>
+		<arg choice="opt">--realm=REALM</arg>
+		<arg choice="opt">--netbios-scope=SCOPE</arg>
+		<arg choice="opt">-m|--maxprotocol=MAXPROTOCOL</arg>
+		<arg choice="opt">-U|--user=[DOMAIN/]USERNAME%[PASSWORD]</arg>
+		<arg choice="opt">-N|--no-pass</arg>
+		<arg choice="opt">--password=STRING</arg>
+		<arg choice="opt">--pw-nt-hash</arg>
+		<arg choice="opt">-A|--authentication-file=FILE</arg>
+		<arg choice="opt">-P|--machine-pass</arg>
+		<arg choice="opt">--simple-bind-dn=DN</arg>
+		<arg choice="opt">--use-kerberos=desired|required|off</arg>
+		<arg choice="opt">--use-krb5-ccache=CCACHE</arg>
+		<arg choice="opt">--use-winbind-ccache</arg>
+		<arg choice="opt">--client-protection=sign|encrypt|off</arg>
+		<arg choice="opt">-V|--version</arg>
+		<arg choice="opt">-k|--kerberos=STRING</arg>
 	</cmdsynopsis>
 </refsynopsisdiv>
 
@@ -114,7 +151,7 @@
 		</para>
 
 		<para>The server name is looked up according to either
-		the <parameter>-R</parameter> parameter to <command>smbclient</command> or
+		the <parameter>-R|--name-resolve</parameter> parameter to <command>smbclient</command> or
 		using the name resolve order parameter in
 		the <citerefentry><refentrytitle>smb.conf</refentrytitle>
 		<manvolnum>5</manvolnum></citerefentry> file,
@@ -147,63 +184,6 @@
 		</para></listitem>
 		</varlistentry>
 
-		<varlistentry>
-		<term>-R|--name-resolve <name resolve order></term>
-		<listitem><para>This option is used by the programs in the Samba
-		suite to determine what naming services and in what order to resolve
-		host names to IP addresses. The option takes a space-separated
-		string of different name resolution options.</para>
-
-		<para>The options are :"lmhosts", "host", "wins" and "bcast". They
-		cause names to be resolved as follows:</para>
-
-		<itemizedlist>
-			<listitem><para><constant>lmhosts</constant>: Lookup an IP
-			address in the Samba lmhosts file. If the line in lmhosts has
-			no name type attached to the NetBIOS name (see
-			the <citerefentry><refentrytitle>lmhosts</refentrytitle>
-			<manvolnum>5</manvolnum></citerefentry> for details) then
-			any name type matches for lookup.</para>
-			</listitem>
-
-			<listitem><para><constant>host</constant>: Do a standard host
-			name to IP address resolution, using the system <filename>/etc/hosts
-			</filename>, NIS, or DNS lookups. This method of name resolution
-			is operating system dependent, for instance on IRIX or Solaris this
-			may be controlled by the <filename>/etc/nsswitch.conf</filename>
-			file).	Note that this method is only used if the NetBIOS name
-			type being queried is the 0x20 (server) name type, otherwise
-			it is ignored.</para>
-			</listitem>
-
-			<listitem><para><constant>wins</constant>: Query a name with
-			the IP address listed in the <parameter>wins server</parameter>
-			parameter.	If no WINS server has
-			been specified this method will be ignored.</para>
-			</listitem>
-
-			<listitem><para><constant>bcast</constant>: Do a broadcast on
-			each of the known local interfaces listed in the
-			<parameter>interfaces</parameter>
-			parameter. This is the least reliable of the name resolution
-			methods as it depends on the target host being on a locally
-			connected subnet.</para>
-			</listitem>
-		</itemizedlist>
-
-		<para>If this parameter is not set then the name resolve order
-		defined in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
-		<manvolnum>5</manvolnum></citerefentry> file parameter
-		(name resolve order) will be used. </para>
-
-		<para>The default order is lmhosts, host, wins, bcast and without
-		this parameter or any entry in the <parameter>name resolve order
-		</parameter> parameter of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
-		<manvolnum>5</manvolnum></citerefentry> file the name resolution
-		methods will be attempted in this order. </para></listitem>
-		</varlistentry>
-
-
 		<varlistentry>
 		<term>-M|--message NetBIOS name</term>
 		<listitem><para>This options allows you to send messages, using
@@ -335,12 +315,6 @@
 		</listitem>
 		</varlistentry>
 
-		&stdarg.client.debug;
-		&popt.common.samba;
-		&popt.common.credentials;
-		&popt.common.connection;
-		&popt.autohelp;
-
 		<varlistentry>
 		<term>-t|--timeout <timeout-seconds></term>
 		<listitem><para>This allows the user to tune the default
@@ -432,6 +406,7 @@
 			archive bit to be reset when a file is backed up. Useful with the
 			<parameter>g</parameter> and <parameter>c</parameter> flags.
 			</para></listitem>
+
 		</itemizedlist>
 
 		<para><emphasis>Tar Long File Names</emphasis></para>
@@ -504,6 +479,10 @@
 		to the server, e.g. <command>-c 'print -'</command>. </para></listitem>
 		</varlistentry>
 
+		&popt.autohelp;
+		&cmdline.common.samba.client;
+		&cmdline.common.connection;
+		&cmdline.common.credentials;
 	</variablelist>
 </refsect1>
 
diff --git a/docs-xml/manpages/vfstest.1.xml b/docs-xml/manpages/vfstest.1.xml
index dc6acd06f87..005eed267ff 100644
--- a/docs-xml/manpages/vfstest.1.xml
+++ b/docs-xml/manpages/vfstest.1.xml
@@ -19,10 +19,19 @@
 <refsynopsisdiv>
 	<cmdsynopsis>
 		<command>vfstest</command>
-		<arg choice="opt">-d debuglevel</arg>
-		<arg choice="opt">-c command</arg>
-		<arg choice="opt">-l logdir</arg>
-		<arg choice="opt">-h</arg>
+		<arg choice="opt">-?|--help</arg>
+		<arg choice="opt">--usage</arg>
+		<arg choice="opt">-f|--file=STRING</arg>
+		<arg choice="opt">-c|--command=STRING</arg>
+		<arg choice="opt">-m|--memreport=INT</arg>
+		<arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
+		<arg choice="opt">--debug-stdout</arg>
+		<arg choice="opt">--configfile=CONFIGFILE</arg>
+		<arg choice="opt">--option=name=value</arg>
+		<arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
+		<arg choice="opt">--leak-report</arg>
+		<arg choice="opt">--leak-report-full</arg>
+		<arg choice="opt">-V|--version</arg>
 	</cmdsynopsis>
 </refsynopsisdiv>
 
@@ -52,19 +61,8 @@
 		</para> </listitem>
 		</varlistentry>
 
-		&stdarg.help;
-
-		<varlistentry>
-		<term>-l|--logfile=logbasename</term>
-		<listitem><para>File name for log/debug files. The extension
-		<constant>'.client'</constant> will be appended. The log file is never removed
-		by the client.
-		</para></listitem>
-		</varlistentry>
-
-		&stdarg.server.debug;
-		&popt.common.samba;
-
+		&popt.autohelp;
+		&cmdline.common.samba.client;
 	</variablelist>
 </refsect1>
 
diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c
index e7e65ff13be..15be2e42ff4 100644
--- a/lib/cmdline/cmdline.c
+++ b/lib/cmdline/cmdline.c
@@ -437,6 +437,28 @@ static void popt_samba_callback(poptContext popt_ctx,
 	}
 }
 
+static struct poptOption popt_common_debug[] = {
+	{
+		.argInfo    = POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST,
+		.arg        = (void *)popt_samba_callback,
+	},
+	{
+		.longName   = "debuglevel",
+		.shortName  = 'd',
+		.argInfo    = POPT_ARG_STRING,
+		.val        = 'd',
+		.descrip    = "Set debug level",
+		.argDescrip = "DEBUGLEVEL",
+	},
+	{
+		.longName   = "debug-stdout",
+		.argInfo    = POPT_ARG_NONE,
+		.val        = OPT_DEBUG_STDOUT,
+		.descrip    = "Send debug output to standard output",
+	},
+	POPT_TABLEEND
+};
+
 static struct poptOption popt_common_samba[] = {
 	{
 		.argInfo    = POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST,
@@ -1193,6 +1215,9 @@ static struct poptOption popt_legacy_s4[] = {
 struct poptOption *samba_cmdline_get_popt(enum smb_cmdline_popt_options opt)
 {
 	switch (opt) {
+	case SAMBA_CMDLINE_POPT_OPT_DEBUG_ONLY:
+		return popt_common_debug;
+		break;
 	case SAMBA_CMDLINE_POPT_OPT_SAMBA:
 		return popt_common_samba;
 		break;
diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h
index 490d38216d0..8d8f3ebe5a7 100644
--- a/lib/cmdline/cmdline.h
+++ b/lib/cmdline/cmdline.h
@@ -33,12 +33,14 @@
 #endif
 
 enum samba_cmdline_config_type {
-	SAMBA_CMDLINE_CONFIG_CLIENT = 0,
+	SAMBA_CMDLINE_CONFIG_NONE = 0,
+	SAMBA_CMDLINE_CONFIG_CLIENT,
 	SAMBA_CMDLINE_CONFIG_SERVER,
 };
 
 enum smb_cmdline_popt_options {
-	SAMBA_CMDLINE_POPT_OPT_SAMBA = 1,
+	SAMBA_CMDLINE_POPT_OPT_DEBUG_ONLY = 1,
+	SAMBA_CMDLINE_POPT_OPT_SAMBA,
 	SAMBA_CMDLINE_POPT_OPT_CONNECTION,
 	SAMBA_CMDLINE_POPT_OPT_CREDENTIALS,
 	SAMBA_CMDLINE_POPT_OPT_VERSION,
@@ -139,6 +141,18 @@ poptContext samba_popt_get_context(const char * name,
 				   const struct poptOption * options,
 				   unsigned int flags);
 
+/**
+ * @brief A popt structure for common debug options only.
+ */
+#define POPT_COMMON_DEBUG_ONLY { \
+	.longName   = NULL, \
+	.shortName  = '\0', \
+	.argInfo    = POPT_ARG_INCLUDE_TABLE, \
+	.arg        = samba_cmdline_get_popt(SAMBA_CMDLINE_POPT_OPT_DEBUG_ONLY), \
+	.val        = 0, \
+	.descrip    = "Common debug options:", \
+	.argDescrip = NULL },
+
 /**
  * @brief A popt structure for common samba options.
  */
diff --git a/lib/cmdline/cmdline_s3.c b/lib/cmdline/cmdline_s3.c
index d9bda695203..31250b1996e 100644
--- a/lib/cmdline/cmdline_s3.c
+++ b/lib/cmdline/cmdline_s3.c
@@ -50,6 +50,8 @@ static bool _samba_cmdline_load_config_s3(void)
 	config_file = get_dyn_CONFIGFILE();
 
 	switch (_config_type) {
+	case SAMBA_CMDLINE_CONFIG_NONE:
+		return true;
 	case SAMBA_CMDLINE_CONFIG_CLIENT:
 		ok = lp_load_client(config_file);
 		break;
diff --git a/source3/client/client.c b/source3/client/client.c
index 7c0a3832a41..b20ac986dc9 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -23,7 +23,6 @@
 
 #include "includes.h"
 #include "system/filesys.h"
-#include "popt_common_cmdline.h"
 #include "rpc_client/cli_pipe.h"
 #include "client/client_proto.h"
 #include "client/clitar_proto.h"
@@ -41,6 +40,7 @@
 #include "../libcli/smb/smbXcli_base.h"
 #include "lib/util/time_basic.h"
 #include "lib/util/string_wrappers.h"
+#include "lib/cmdline/cmdline.h"
 
 #ifndef REGISTER
 #define REGISTER 0
@@ -296,8 +296,7 @@ static int do_dskattr(void)
 	struct cli_state *targetcli = NULL;
 	char *targetpath = NULL;
 	TALLOC_CTX *ctx = talloc_tos();
-	struct cli_credentials *creds =
-		get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
+	struct cli_credentials *creds = samba_cmdline_get_creds();
 	NTSTATUS status;
 
 	status = cli_resolve_path(ctx,
@@ -393,8 +392,7 @@ static int do_cd(const char *new_dir)
 	uint32_t attributes;
 	int ret = 1;
 	TALLOC_CTX *ctx = talloc_stackframe();
-	struct cli_credentials *creds =
-		get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
+	struct cli_credentials *creds = samba_cmdline_get_creds();
 	NTSTATUS status;
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list