From: Uri Simchoni Date: Wed, 30 Mar 2016 11:20:44 +0000 (+0300) Subject: smbcquotas: print "NO LIMIT" only if returned quota value is 0. X-Git-Tag: tdb-1.3.9~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d6d62010be2a54b6828cc4cc9c13b5657c8b4a0;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 9e6431917d8..e6f1dfb6d46 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);