summaryrefslogtreecommitdiff
path: root/source3/smbd/quotas.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-04-10 21:02:45 +0000
committerJeremy Allison <jra@samba.org>2000-04-10 21:02:45 +0000
commit4379d359a8cdcc5b2d4ebf713a0ac32b1c7df4d2 (patch)
tree727228c32275871423c9a8d467d963420abcee7b /source3/smbd/quotas.c
parent2733f5352a384561b4df7ea14c5962f3cd079166 (diff)
downloadsamba-4379d359a8cdcc5b2d4ebf713a0ac32b1c7df4d2.tar.gz
samba-4379d359a8cdcc5b2d4ebf713a0ac32b1c7df4d2.tar.bz2
samba-4379d359a8cdcc5b2d4ebf713a0ac32b1c7df4d2.zip
Fix for soft quotas not being set from
Norbert Püschel <Pueschel.Norbert@Walzbarren-VAW.ne.uunet.de> Jeremy. (This used to be commit 5480ecf24bc7c97f25a5a6aee7e24eba7e87a458)
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r--source3/smbd/quotas.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 329f261f27..1e81443c5e 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -363,6 +363,11 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U
#endif
}
+ /* If softlimit is zero, set it equal to hardlimit.
+ */
+
+ if (D.dqb_bsoftlimit==0)
+ D.dqb_bsoftlimit = D.dqb_bhardlimit;
/* Use softlimit to determine disk space. A user exceeding the quota is told
* that there's no space left. Writes might actually work for a bit if the
@@ -432,6 +437,12 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U
return (False);
}
+ /* If softlimit is zero, set it equal to hardlimit.
+ */
+
+ if (D.dqb_bsoftlimit==0)
+ D.dqb_bsoftlimit = D.dqb_bhardlimit;
+
/* Use softlimit to determine disk space, except when it has been exceeded */
if (D.dqb_bsoftlimit==0)
@@ -662,6 +673,13 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U
}
else return(False);
}
+
+ /* If softlimit is zero, set it equal to hardlimit.
+ */
+
+ if (D.dqb_bsoftlimit==0)
+ D.dqb_bsoftlimit = D.dqb_bhardlimit;
+
if (D.dqb_bsoftlimit==0)
return(False);
/* Use softlimit to determine disk space, except when it has been exceeded */
@@ -773,6 +791,12 @@ BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_B
return(False);
}
+ /* If softlimit is zero, set it equal to hardlimit.
+ */
+
+ if (D.dqb_bsoftlimit==0)
+ D.dqb_bsoftlimit = D.dqb_bhardlimit;
+
/* Use softlimit to determine disk space. A user exceeding the quota is told
* that there's no space left. Writes might actually work for a bit if the
* hardlimit is set higher than softlimit. Effectively the disk becomes