mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
90ad42d814
Use the file descriptor opened in zg_open() before to obtain information about the file. Theoretically, there is a tiny window for a race condition between opening a file and obtaining its information with stat(). A malicious user could use it to entice incorrect behavior from zgetdump. Using the same file descriptor for both operations prevents such situations. Suggested-by: Peter Jin <pjin@linux.ibm.com> Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Marc Hartmayer <marc@linux.ibm.com> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
8.5 KiB
8.5 KiB