get quota command bugs?

Stefan Metzmacher stefan.metzmacher at metzemix.de
Wed Oct 1 07:51:04 GMT 2003


René Nieuwenhuizen wrote:

> First of all: Thanks Samba-Team for a job well-done on Samba-3.0.0 (nice
> new features)
>
> Now some problems:
>
> 1. We're use Veritas filesystem on our RedHat AS 2.1 server and quota
> don't seem to work at this moment (/usr/include/sys/fs/vx_quota.h is
> missing). So I thought that using "get quota command" would do the trick
> (just call vxquota and parse output). But nothing happend!!! Script was
> OK. After poking around in lib/sysquotas.c I found that "get quota
> command" was only called if HAVE_SYS_QUOTA is defined. I expect
> "get quota command" should always be called upon when it is defined in
> smb.conf.

have you used ./configure --with-sys-quotas

>
> 2. The man page of smb.conf seems to imply that the output of the "get
> quota command" should be returned as one result per line. This is
> wrong: all results must be returned on one line comma seperated.

they should be space seperated...

> Also
> the "set quota command" has some docu bug (some nroff tags are shown).

Here're some updates to the docs...
Jelmer, can you commit them?

> 3. In the Samba-HOWTO-Docu... it says on page 141 that mapping domadm
> group to the "Domain Admins" group is done with a "net groupmap add"
> command. I think this should be "net groupmap modify" command. I ended
> up with a new "Domain Admins"-group having another RID which lead to
> some confusion (I am a domain admin but not).

-------------- next part --------------
Index: docs/docbook/smbdotconf/vfs/getquotacommand.xml
===================================================================
RCS file: /cvsroot/samba/docs/docbook/smbdotconf/vfs/getquotacommand.xml,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 getquotacommand.xml
--- docs/docbook/smbdotconf/vfs/getquotacommand.xml	15 Aug 2003 16:22:18 -0000	1.1.2.2
+++ docs/docbook/smbdotconf/vfs/getquotacommand.xml	1 Oct 2003 07:44:48 -0000
@@ -29,17 +29,18 @@
 		<listitem><para>4 - group default quotas (gid = -1)</para></listitem>
 	</itemizedlist>
 
-	<para>This script should print its output according to the following format:</para>
+	<para>This script should print its output according to the following format
+	      (on one line with space seperation):</para>
 
 	<itemizedlist>
-		<listitem><para>Line 1 - quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)</para></listitem>
-		<listitem><para>Line 2 - number of currently used blocks</para></listitem>
-		<listitem><para>Line 3 - the softlimit number of blocks</para></listitem>
-		<listitem><para>Line 4 - the hardlimit number of blocks</para></listitem>
-		<listitem><para>Line 5 - currently used number of inodes</para></listitem>
-		<listitem><para>Line 6 - the softlimit number of inodes</para></listitem>
-		<listitem><para>Line 7 - the hardlimit number of inodes</para></listitem>
-		<listitem><para>Line 8(optional) - the number of bytes in a block(default is 1024)</para></listitem>
+		<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>
 	</itemizedlist>
 
 	<para>See also the <link linkend="SETQUOTACOMMAND"><parameter moreinfo="none">set quota command</parameter></link> parameter.
Index: docs/docbook/smbdotconf/vfs/setquotacommand.xml
===================================================================
RCS file: /cvsroot/samba/docs/docbook/smbdotconf/vfs/setquotacommand.xml,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 setquotacommand.xml
--- docs/docbook/smbdotconf/vfs/setquotacommand.xml	15 Aug 2003 16:31:06 -0000	1.1.2.1
+++ docs/docbook/smbdotconf/vfs/setquotacommand.xml	1 Oct 2003 07:44:48 -0000
@@ -30,7 +30,7 @@
 		<listitem><para>8(optional) - block size, defaults to 1024</para></listitem>
 	</itemizedlist>
 
-	<para>The script should output at least one line of data.</para>
+	<para>The script should output at least one line of data on success. And nothing on failure.</para>
 
 	<para>See also the <link linkend="GETQUOTACOMMAND"><parameter moreinfo="none">get quota command</parameter></link> parameter.
 	</para>
Index: source/lib/sysquotas.c
===================================================================
RCS file: /cvsroot/samba/source/lib/sysquotas.c,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 sysquotas.c
--- source/lib/sysquotas.c	31 Jul 2003 17:08:38 -0000	1.1.2.4
+++ source/lib/sysquotas.c	1 Oct 2003 07:45:14 -0000
@@ -742,7 +742,7 @@
 		if (lines) {
 			char *line = lines[0];
 
-			DEBUG (3, ("Read output from get_quota, \"r%s\"\n", line));
+			DEBUG (3, ("Read output from get_quota, \"%s\"\n", line));
 
 			/* we need to deal with long long unsigned here, if supported */
 


More information about the samba-technical mailing list