[sudo-commits] sudo changeset 12925:650b3108c32c

Todd C. Miller Todd.Miller at sudo.ws
Tue Feb 9 13:53:08 MST 2021


changeset:	12925:650b3108c32c in /raid/repos/sudo
details:	https://www.sudo.ws/repos/sudo/rev/650b3108c32c
user:		Todd C. Miller <Todd.Miller at sudo.ws>
date:		Fri Apr 17 19:08:56 2020 -0600

Log Message:
	Extend the original file before to the new size before updating it.
	Instead of opening the original file for writing w/ tuncation, we
	first extend the file with zeroes (by writing, not seeking), then
	overwrite it.  This should allow sudo to fail early if the disk is
	out of space before it overwrites the original file.

diffstat:

 src/sudo_edit.c |  93 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 77 insertions(+), 16 deletions(-)



More information about the sudo-commits mailing list