[PATCH] Fix getting quota on BSD

Jeremy Allison jra at samba.org
Mon May 23 20:00:04 UTC 2016


On Sat, May 21, 2016 at 10:37:07PM +0300, Uri Simchoni wrote:
> Hi,
> This patch fixes non-Darwin use of sysquotas_4B interface for getting
> user/group quota.
> 
> Please review.

LGTM thanks ! Looks like those fields got missed without
this alternate #else path.

Pushed.


> 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