mkstemp: permission 0666 to 0600

https://man7.org/linux/man-pages/man3/mkstemp.3.html
remove the read/write permission of other users for temp file

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-07-01 11:50:28 +08:00 committed by Xiang Xiao
parent 5cdd0230a8
commit b08d219849

View File

@ -66,7 +66,7 @@ int mkstemp(FAR char *path_template)
if (path)
{
ret = open(path, O_RDWR | O_CREAT | O_EXCL, 0666);
ret = open(path, O_RDWR | O_CREAT | O_EXCL, 0600);
}
return ret;