summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-03-30 13:59:39 +0300
committerJeremy Allison <jra@samba.org>2016-03-31 20:30:10 +0200
commit20a0d59d8c1d80b66a34611bffef1d43a9e1e2b4 (patch)
treef4817465b3ca596abd9d471bb63bcfa880de2d88
parent78ae852dd7b6491e131d3a26f490bbcef53aa3d6 (diff)
downloadsamba-20a0d59d8c1d80b66a34611bffef1d43a9e1e2b4.tar.gz
ntquotas - skip entry if the quota is zero
When listing user quotas, do not list the user if the driver returned success with zero quota - this signals that no quota is assigned for that user. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/ntquotas.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c
index b9fd2f13802..9b2e39a72bf 100644
--- a/source3/smbd/ntquotas.c
+++ b/source3/smbd/ntquotas.c
@@ -189,6 +189,11 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list)
status =
vfs_get_ntquota(fsp, SMB_USER_QUOTA_TYPE, &sid, &tmp_qt);
if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(5, ("failed getting quota for uid[%ld] - %s\n",
+ (long)usr->pw_uid, nt_errstr(status)));
+ continue;
+ }
+ if (tmp_qt.softlim == 0 && tmp_qt.hardlim == 0) {
DEBUG(5,("no quota entry for sid[%s] path[%s]\n",
sid_string_dbg(&sid),
fsp->conn->connectpath));