CVSROOT:        /cvs
Module name:    src
Changes by:     mill...@cvs.openbsd.org 2022/05/23 09:17:11

Modified files:
        lib/libc/sys   : truncate.2 
        sys/kern       : vfs_syscalls.c 

Log message:
Respect RLIMIT_FSIZE when extending a file via truncat(2)/ftruncate(2).
This refactors the commin parts of sys_truncate() and sys_ftruncate()
into dotruncate().  If the new size of the file is larger than the
RLIMIT_FSIZE limit _and_ the file is being extended, not truncated,
return EFBIG.  Adapted from a diff by Piotr Durlej.
With help from and OK by deraadt@ guenther@.

Reply via email to