From: Alan T. DeKok Date: Wed, 22 Nov 2023 18:21:42 +0000 (-0500) Subject: add creation flags for file open X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bcce04ee823154d37d622f8638bac4dfe22b6de;p=thirdparty%2Ffreeradius-server.git add creation flags for file open --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 07b0445d5b8..33b2a2116f0 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1209,7 +1209,7 @@ static xlat_action_t xlat_func_log_dst(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor */ dbg->dst = L_DST_FILES; dbg->file = talloc_strdup(dbg, file->vb_strvalue); - dbg->fd = open(dbg->file, O_WRONLY | O_CREAT | O_CLOEXEC); + dbg->fd = open(dbg->file, O_WRONLY | O_CREAT | O_CLOEXEC, 0600); if (!dbg->fd) { REDEBUG("Failed opening %s - %s", dbg->file, fr_syserror(errno)); talloc_free(dbg);