s3-quotas: fix sysquotas_4B quota fetching for BSD
authorUri Simchoni <uri@samba.org>
Sat, 21 May 2016 19:25:32 +0000 (22:25 +0300)
committerJeremy Allison <jra@samba.org>
Mon, 23 May 2016 21:28:12 +0000 (23:28 +0200)
Correctly copy block hard/soft limits from the OS-specific structure
to samba structure.

BUG:https://bugzilla.samba.org/show_bug.cgi?id=11931

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/sysquotas_4B.c

index e3adc35015eba28bedc6f04a746703b4aa7e9fc3..ee56432211e96f5357d4e43f31f3d43eeb4b1777 100644 (file)
@@ -81,6 +81,12 @@ static void xlate_qblk_to_smb(const struct dqblk * const qblk,
        dp->hardlimit = XLATE_TO_BLOCKS(qblk->dqb_bhardlimit);
        dp->curblocks = XLATE_TO_BLOCKS(qblk->dqb_curbytes);
 #undef XLATE_TO_BLOCKS
+#else
+       dp->bsize = DEV_BSIZE;
+
+       dp->softlimit = qblk->dqb_bsoftlimit;
+       dp->hardlimit = qblk->dqb_bhardlimit;
+       dp->curblocks = qblk->dqb_curblocks;
 #endif
 
        dp->ihardlimit = qblk->dqb_ihardlimit;