[SCM] Samba Shared Repository - branch master updated
Björn Jacke
bjacke at samba.org
Fri Sep 7 19:14:02 MDT 2012
The branch, master has been updated
via c853b68 s3:quota: don't add the string '"' into the argument list
via 869b677 doc: improve quotacommand man page docu
from 4abccf0 s3: Fix a panic when shutting down
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c853b68229d8c8eaa6f4ae1828621fad533bb8e3
Author: Björn Jacke <bj at sernet.de>
Date: Sat Sep 8 00:30:59 2012 +0200
s3:quota: don't add the string '"' into the argument list
this is not used to quote or anything else. This is mainly
causing work for the script writer who has to remove the
quote stings again :-)
Autobuild-User(master): Björn Jacke <bj at sernet.de>
Autobuild-Date(master): Sat Sep 8 03:13:13 CEST 2012 on sn-devel-104
commit 869b67764d06995e232a97118737be6779ad4929
Author: Björn Jacke <bj at sernet.de>
Date: Fri Sep 7 23:41:12 2012 +0200
doc: improve quotacommand man page docu
-----------------------------------------------------------------------
Summary of changes:
docs-xml/smbdotconf/vfs/getquotacommand.xml | 30 ++++++++++++++------------
docs-xml/smbdotconf/vfs/setquotacommand.xml | 24 +++++++++++---------
source3/lib/sysquotas.c | 4 +-
3 files changed, 31 insertions(+), 27 deletions(-)
Changeset truncated at 500 lines:
diff --git a/docs-xml/smbdotconf/vfs/getquotacommand.xml b/docs-xml/smbdotconf/vfs/getquotacommand.xml
index 04f3034..eacd19c 100644
--- a/docs-xml/smbdotconf/vfs/getquotacommand.xml
+++ b/docs-xml/smbdotconf/vfs/getquotacommand.xml
@@ -8,17 +8,15 @@
whenever there is no operating system API available from the OS that
samba can use.</para>
- <para>This option is only available you have compiled Samba with the
- <command moreinfo="none">--with-sys-quotas</command> option or on Linux with
- <command moreinfo="none">--with-quotas</command> and a working quota api
- was found in the system.</para>
+ <para>This option is only available Samba was compiled with
+ quotas support.</para>
<para>This parameter should specify the path to a script that
queries the quota information for the specified
user/group for the partition that
the specified directory is on.</para>
- <para>Such a script should take 3 arguments:</para>
+ <para>Such a script is being given 3 arguments:</para>
<itemizedlist>
<listitem><para>directory</para></listitem>
@@ -26,6 +24,10 @@
<listitem><para>uid of user or gid of group</para></listitem>
</itemizedlist>
+ <para>The directory is actually mostly just "." - It needs to be
+ treated relatively to the current working directory that the script can
+ also query.</para>
+
<para>The type of query can be one of:</para>
<itemizedlist>
@@ -35,18 +37,18 @@
<listitem><para>4 - group default quotas (gid = -1)</para></listitem>
</itemizedlist>
- <para>This script should print one line as output with spaces between the arguments. The arguments are:
+ <para>This script should print one line as output with spaces between the columns. The printed columns should be:
</para>
<itemizedlist>
- <listitem><para>Arg 1 - quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)</para></listitem>
- <listitem><para>Arg 2 - number of currently used blocks</para></listitem>
- <listitem><para>Arg 3 - the softlimit number of blocks</para></listitem>
- <listitem><para>Arg 4 - the hardlimit number of blocks</para></listitem>
- <listitem><para>Arg 5 - currently used number of inodes</para></listitem>
- <listitem><para>Arg 6 - the softlimit number of inodes</para></listitem>
- <listitem><para>Arg 7 - the hardlimit number of inodes</para></listitem>
- <listitem><para>Arg 8(optional) - the number of bytes in a block(default is 1024)</para></listitem>
+ <listitem><para>1 - quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)</para></listitem>
+ <listitem><para>2 - number of currently used blocks</para></listitem>
+ <listitem><para>3 - the softlimit number of blocks</para></listitem>
+ <listitem><para>4 - the hardlimit number of blocks</para></listitem>
+ <listitem><para>5 - currently used number of inodes</para></listitem>
+ <listitem><para>6 - the softlimit number of inodes</para></listitem>
+ <listitem><para>7 - the hardlimit number of inodes</para></listitem>
+ <listitem><para>8 (optional) - the number of bytes in a block(default is 1024)</para></listitem>
</itemizedlist>
</description>
diff --git a/docs-xml/smbdotconf/vfs/setquotacommand.xml b/docs-xml/smbdotconf/vfs/setquotacommand.xml
index 03e40a9..cf62715 100644
--- a/docs-xml/smbdotconf/vfs/setquotacommand.xml
+++ b/docs-xml/smbdotconf/vfs/setquotacommand.xml
@@ -8,9 +8,8 @@
whenever there is no operating system API available from the OS that
samba can use.</para>
- <para>This option is only available if Samba was configured with the argument <command>--with-sys-quotas</command> or
- on Linux when <command>./configure --with-quotas</command> was used and a working quota api
- was found in the system. Most packages are configured with these options already.</para>
+ <para>This option is only available if Samba was compiled with
+ quota support.</para>
<para>This parameter should specify the path to a script that
can set quota for the specified arguments.</para>
@@ -18,20 +17,23 @@
<para>The specified script should take the following arguments:</para>
<itemizedlist>
- <listitem><para>1 - quota type
+ <listitem><para>1 - path to where the quota needs to be set.
+ This needs to be interpreted relative to the current working
+ directory that the script may also check for.</para></listitem>
+ <listitem><para>2 - quota type
<itemizedlist>
<listitem><para>1 - user quotas</para></listitem>
<listitem><para>2 - user default quotas (uid = -1)</para></listitem>
<listitem><para>3 - group quotas</para></listitem>
<listitem><para>4 - group default quotas (gid = -1)</para></listitem>
</itemizedlist></para></listitem>
- <listitem><para>2 - id (uid for user, gid for group, -1 if N/A)</para></listitem>
- <listitem><para>3 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)</para></listitem>
- <listitem><para>4 - block softlimit</para></listitem>
- <listitem><para>5 - block hardlimit</para></listitem>
- <listitem><para>6 - inode softlimit</para></listitem>
- <listitem><para>7 - inode hardlimit</para></listitem>
- <listitem><para>8(optional) - block size, defaults to 1024</para></listitem>
+ <listitem><para>3 - id (uid for user, gid for group, -1 if N/A)</para></listitem>
+ <listitem><para>4 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)</para></listitem>
+ <listitem><para>5 - block softlimit</para></listitem>
+ <listitem><para>6 - block hardlimit</para></listitem>
+ <listitem><para>7 - inode softlimit</para></listitem>
+ <listitem><para>8 - inode hardlimit</para></listitem>
+ <listitem><para>9(optional) - block size, defaults to 1024</para></listitem>
</itemizedlist>
<para>The script should output at least one line of data on success. And nothing on failure.</para>
diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 76f66a7..c531666 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -208,7 +208,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
return -1;
}
- if (asprintf(&syscmd, "%s \"%s\" %d %d",
+ if (asprintf(&syscmd, "%s %s %d %d",
get_quota_command, path, qtype, _id) < 0) {
return -1;
}
@@ -351,7 +351,7 @@ static int command_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
}
if (asprintf(&syscmd,
- "%s \"%s\" %d %d "
+ "%s %s %d %d "
"%u %llu %llu "
"%llu %llu %llu ",
set_quota_command, path, qtype, _id, dp->qflags,
--
Samba Shared Repository
More information about the samba-cvs
mailing list