Files
s390-tools/zdev/src
Vineeth Vijayan 09c01e580a zdev: use rename-file to avoid any symlinks created
During the boot, the ZDEV_SITE_ID is derived with the help
of loadparm and will be saved in ZDEV_SITE_ID_FILE, which
will be the used by the udev-rules.

ZDEV_SITE_ID_FILE creation can have a surface of symlink attack
as we are directly using the fopen and fprintf on it. To avoid
this, make sure that we are writing the ZDEV_SITE_ID to a temporary
file, which will then be renamed to ZDEV_SITE_ID_FILE, which will
remove all the existing symlinks associated with the target file.

Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-07-04 15:41:02 +02:00
..
2022-05-17 13:20:27 +02:00
2017-08-21 10:55:40 +02:00
2022-05-17 13:20:27 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2022-05-17 13:20:27 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2018-11-16 15:01:41 +01:00
2022-05-17 13:20:27 +02:00
2022-05-17 13:20:27 +02:00