[PATCH] support: Prevent multiple deletion of temporary files

Andreas Schwab schwab@suse.de
Mon May 8 14:18:00 GMT 2017


On Mai 08 2017, fweimer@redhat.com (Florian Weimer) wrote:

> 	Prevent multiple deletion of temporary files.
> 	* support/temp_file.c (struct temp_name_list): Add owner member.
> 	(add_temp_file): Record owner.
> 	(support_delete_temp_files): Delete file only if owner matches.
> 	* posix/tst-exec.c (temp_fd1, temp_fd2): Define.
> 	(do_prepare): Use create_temp_file instead of add_temp_file.
> 	Initialize temp_fd1, temp_fd2.
> 	(do_test): Use global temp_fd1, temp_fd2 variables.  Let the test
> 	framework remove the temporary files.
> 	* posix/tst-exec.c (temp_fd1, temp_fd2, temp_fd3): Define.
> 	(do_prepare): Use create_temp_file instead of add_temp_file.
> 	Initialize temp_fd1, temp_fd2, temp_fd3.
> 	(do_test): Use global temp_fd1, temp_fd2, temp_fd3 variables.  Let
> 	the test framework remove the temporary files.
> 	* posix/tst-vfork3.c (do_prepare): Adjust for LIFO order of file
> 	deletion.
> 	* posix/tst-pathconf.c (do_test): Do not call rmdir on the
> 	temporary directory.  It is removed by the test framework.
> 	* dirent/tst-scandir.c (do_test): Likewise.

Ok.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Libc-alpha mailing list