diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-05-08 14:57:59 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-05-08 16:20:40 +0200 |
commit | c22553effb151532eb95fc1f7bb17a3aebe63202 (patch) | |
tree | 6064f0d1bf34b0ec8aaebd04cd1758c81f4666ce /ChangeLog | |
parent | 706256afb6c844a0e6aaab2b60f4326b91aca2e9 (diff) | |
download | glibc-c22553effb151532eb95fc1f7bb17a3aebe63202.tar.gz |
support: Prevent multiple deletion of temporary files
Otherwise, another user might recreate these files after the first
deletion. Particularly with temporary directories, this could result
in the removal of unintended files through symbol link attacks.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -1,5 +1,27 @@ 2017-05-08 Florian Weimer <fweimer@redhat.com> + 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. + +2017-05-08 Florian Weimer <fweimer@redhat.com> + Delete temporary files in LIFO order. * support/temp_file.c (struct temp_name_list): Replace q member with next. |