Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins/micron: Fix code scanning alert
Fix the time-of-check time-of-use filesystem race condition. To use setuid() described by the JPCERT CC document as below. <https://www.jpcert.or.jp/research/2009/6_File_IO_Part3.pdf> Page 53: TOCTUC race condition measure example. To check the permission as same with access() function, Set the real user ID as the effective user ID. Then the race window closed between checking and using. Note: The example for fopen() but the fix for mkdir() and rmdir(). Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
- Loading branch information