summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-09-20 18:51:00 +0300
committerJeremy Allison <jra@samba.org>2016-10-04 02:00:23 +0200
commit1dacc09b256e942776967a5bfecd2fdf77ea972b (patch)
treeb7f9925f09de73e0d2d7f1901a4e85c69f5791fc
parentf596bbff3046a38aa9cd9ce77072ba3542dfc403 (diff)
downloadsamba-1dacc09b256e942776967a5bfecd2fdf77ea972b.tar.gz
smbcquotas: add -m option
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>
-rw-r--r--docs-xml/manpages/smbcquotas.1.xml12
-rw-r--r--source3/utils/smbcquotas.c6
2 files changed, 18 insertions, 0 deletions
diff --git a/docs-xml/manpages/smbcquotas.1.xml b/docs-xml/manpages/smbcquotas.1.xml
index bbdb9fdbb51..bff24a4a2b8 100644
--- a/docs-xml/manpages/smbcquotas.1.xml
+++ b/docs-xml/manpages/smbcquotas.1.xml
@@ -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>
@@ -96,6 +97,17 @@
</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>
Don't actually do anything, only validate the correctness of the arguments.
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index c1224573541..06ecea15661 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -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;
}
}