commit bbb4bc87a43c8110fbae927347965e958c13af60
parent bf84274b70903f9ab65238c4615e291980270cc0
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Fri, 8 Nov 2024 07:00:58 +0100
-fix incorrect api usage
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/util/disk.c b/src/lib/util/disk.c
@@ -373,7 +373,8 @@ GNUNET_DISK_file_backup (const char *fil)
do
{
GNUNET_snprintf (target, slen, "%s.%u~", fil, num++);
- fd = open (target, O_CREAT | O_EXCL);
+ fd = open (target, O_CREAT | O_EXCL,
+ translate_unix_perms(GNUNET_DISK_PERM_USER_WRITE));
} while (-1 == fd);
if (0 != renameat2 (AT_FDCWD, fil, AT_FDCWD, target, RENAME_EXCHANGE))
{