svn commit: samba r5958 - in branches/SAMBA_3_0/source/smbd: .
jerry at samba.org
jerry at samba.org
Tue Mar 22 17:31:24 GMT 2005
Author: jerry
Date: 2005-03-22 17:31:23 +0000 (Tue, 22 Mar 2005)
New Revision: 5958
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5958
Log:
BUG 1843: patch from james peach to fix quotas (with no soft limits) on IRIX
Modified:
branches/SAMBA_3_0/source/smbd/quotas.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/quotas.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/quotas.c 2005-03-22 17:08:09 UTC (rev 5957)
+++ branches/SAMBA_3_0/source/smbd/quotas.c 2005-03-22 17:31:23 UTC (rev 5958)
@@ -882,8 +882,17 @@
restore_re_uid();
if (r==-1)
+ {
+ DEBUG(5, ("quotactl for uid=%u: %s", euser_id, strerror(errno)));
return(False);
+ }
+ /* No quota for this user. */
+ if (F.d_blk_softlimit==0 && F.d_blk_hardlimit==0)
+ {
+ return(False);
+ }
+
/* Use softlimit to determine disk space, except when it has been exceeded */
if (
(F.d_blk_softlimit && F.d_bcount>=F.d_blk_softlimit) ||
@@ -895,14 +904,10 @@
*dfree = 0;
*dsize = F.d_bcount;
}
- else if (F.d_blk_softlimit==0 && F.d_blk_hardlimit==0)
- {
- return(False);
- }
else
{
*dfree = (F.d_blk_softlimit - F.d_bcount);
- *dsize = F.d_blk_softlimit;
+ *dsize = F.d_blk_softlimit ? F.d_blk_softlimit : F.d_blk_hardlimit;
}
}
More information about the samba-cvs
mailing list