[PATCH] Fix getting quota on BSD
Uri Simchoni
uri at samba.org
Sat May 21 19:37:07 UTC 2016
Hi,
This patch fixes non-Darwin use of sysquotas_4B interface for getting
user/group quota.
Please review.
Thanks,
Uri.
-------------- next part --------------
From 5bc1b21d5f20b852f53431eee227f8cad6247d67 Mon Sep 17 00:00:00 2001
From: Uri Simchoni <uri at samba.org>
Date: Sat, 21 May 2016 22:25:32 +0300
Subject: [PATCH] s3-quotas: fix sysquotas_4B quota fetching for BSD
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 at samba.org>
---
source3/lib/sysquotas_4B.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/source3/lib/sysquotas_4B.c b/source3/lib/sysquotas_4B.c
index e3adc35..ee56432 100644
--- a/source3/lib/sysquotas_4B.c
+++ b/source3/lib/sysquotas_4B.c
@@ -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;
--
2.5.5
More information about the samba-technical
mailing list