From 76d90a50d251282d9b5f12cb3946f33da4e33835 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 20 Aug 2014 17:11:32 -0400 Subject: [PATCH] Give open a mode if we give it O_CREAT Signed-off-by: Peter Jones --- src/dbxtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbxtool.c b/src/dbxtool.c index 67ad860..a5b7832 100644 --- a/src/dbxtool.c +++ b/src/dbxtool.c @@ -541,7 +541,7 @@ main(int argc, char *argv[]) uint32_t attributes = 0; if (ctx.dbx_file != NULL) { vprintf("Loading dbx from \"%s\"\n", ctx.dbx_file); - int fd = open(ctx.dbx_file, O_RDWR|O_CREAT); + int fd = open(ctx.dbx_file, O_RDWR|O_CREAT, 0600); if (fd < 0) err(1, "Could not open file \"%s\"", ctx.dbx_file);