]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbcquotas: print "NO LIMIT" only if returned quota value is 0.
authorUri Simchoni <uri@samba.org>
Wed, 30 Mar 2016 11:20:44 +0000 (14:20 +0300)
committerJeremy Allison <jra@samba.org>
Thu, 31 Mar 2016 18:30:11 +0000 (20:30 +0200)
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 <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/smbcquotas.c

index 9e6431917d811bda8cbe7dc53fb91c771b488faa..e6f1dfb6d4670398a47c5263fdade5f1a2c83bca 100644 (file)
@@ -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);