From 78a6c38dffdea58155dc57222140b6d235f68daf Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Wed, 30 Mar 2016 14:20:44 +0300 Subject: [PATCH] smbcquotas: print "NO LIMIT" only if returned quota value is 0. If the user being queried has no quota, the server returns 0 as its quota. This is the observed smbd and Windows behavior, which is also documented in [MS-FSA] 2.5.1.20. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11815 Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison (cherry picked from commit 9d6d62010be2a54b6828cc4cc9c13b5657c8b4a0) --- source3/utils/smbcquotas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 9e64319..e6f1dfb 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -236,7 +236,7 @@ static const char *quota_str_static(uint64_t val, bool special, bool _numeric) { const char *result; - if (!_numeric&&special&&(val == SMB_NTQUOTAS_NO_LIMIT)) { + if (!_numeric && special && val == 0) { return "NO LIMIT"; } result = talloc_asprintf(talloc_tos(), "%"PRIu64, val); -- 2.5.5