mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Ffs_alloc allow users to write one block beyond the limit.
PR: 3398 Reviewed by: phk Submitted by: Wolfram Schneider <wosch@apfel.de>
This commit is contained in:
parent
466cf1dd58
commit
6772045776
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95
|
||||
* $Id: ffs_alloc.c,v 1.34 1997/08/04 07:30:43 phk Exp $
|
||||
* $Id: ffs_alloc.c,v 1.35 1997/09/02 20:06:44 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
|
|
@ -117,7 +117,7 @@ ffs_alloc(ip, lbn, bpref, size, cred, bnp)
|
|||
#endif /* DIAGNOSTIC */
|
||||
if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0)
|
||||
goto nospace;
|
||||
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0)
|
||||
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) - size < 0)
|
||||
goto nospace;
|
||||
#ifdef QUOTA
|
||||
error = chkdq(ip, (long)btodb(size), cred, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue