smbcquotas: add -m option
authorUri Simchoni <uri@samba.org>
Tue, 20 Sep 2016 15:51:00 +0000 (18:51 +0300)
committerJeremy Allison <jra@samba.org>
Tue, 4 Oct 2016 00:00:23 +0000 (02:00 +0200)
Add the "standard" -m command line option that controls max
client protocol.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
docs-xml/manpages/smbcquotas.1.xml
source3/utils/smbcquotas.c

index bbdb9fdbb516bfe1b6ff8c4dcecfa46932b0ff66..bff24a4a2b8750664324be5817f4ee2d0b22d2f5 100644 (file)
@@ -34,6 +34,7 @@
                <arg choice="opt">-V</arg>
 
                <arg choice="opt">-U username</arg>
+               <arg choice="opt">-m|--max-protocol LEVEL</arg>
                <arg choice="opt">-N</arg>
                <arg choice="opt">-k</arg>
                <arg choice="opt">-A</arg>
                to a readable string format.</para></listitem>
                </varlistentry>
 
+               <varlistentry>
+               <term>-m|--max-protocol PROTOCOL_NAME</term>
+               <listitem><para>This allows the user to select the
+               highest SMB protocol level that smbcquotas will use to
+               connect to the server. By default this is set to
+               NT1, which is the highest available SMB1 protocol.
+               To connect using SMB2 or SMB3 protocol, use the
+               strings SMB2 or SMB3 respectively.
+               </para></listitem>
+               </varlistentry>
+
                <varlistentry>
                <term>-t|--test-args</term>
                <listitem><para>
index c12245735415a71adb239eae96d8b91c5f00fae5..06ecea156613c53318a06f2b84559737bba7e66b 100644 (file)
@@ -598,6 +598,8 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
                { "numeric", 'n', POPT_ARG_NONE, NULL, 'n', "Don't resolve sids or limits to names" },
                { "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "be verbose" },
                { "test-args", 't', POPT_ARG_NONE, NULL, 't', "Test arguments"},
+               {"max-protocol", 'm', POPT_ARG_STRING, NULL, 'm',
+                "Set the max protocol level", "LEVEL"},
                POPT_COMMON_SAMBA
                POPT_COMMON_CREDENTIALS
                { NULL }
@@ -679,6 +681,10 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
                        }
                        todo = SET_QUOTA;
                        break;
+               case 'm':
+                       lp_set_cmdline("client max protocol",
+                                      poptGetOptArg(pc));
+                       break;
                }
        }