One minor disadvantage to this approach is that, since tempnam can be used insecurely, various compilers and security scanners may give you spurious warnings about its use.
这种方法有一个小的缺点,由于可能无法安全使用tempnam,所以各种编译器和安全扫描器可能都会向您发出使用不合逻辑的警告。
Note that, although the insecure function tempnam (3) is being used, it is wrapped inside a loop using O_CREAT and O_EXCL to counteract its security weaknesses, so this use is OK.
注意,尽管使用了不安全的tempnam(3)函数,但是它被包装在循环中,并使用了O_CREAT和O_EXCL选项,从而抵消了它的安全弱点,所以这样做是可以的。
应用推荐