Skip to content

Commit c026642

Browse files
refactor: Updated calls to exfile_open to use the new inflags parameter with the previous default O_RDWR | O_CREAT option
Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
1 parent 3d1f72c commit c026642

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/modules/rlm_detail/rlm_detail.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static unlang_action_t CC_HINT(nonnull) detail_do(unlang_result_t *p_result, mod
319319

320320
RDEBUG2("%s expands to %pV", env->filename_tmpl->name, &env->filename);
321321

322-
outfd = exfile_open(inst->ef, env->filename.vb_strvalue, inst->perm, NULL);
322+
outfd = exfile_open(inst->ef, env->filename.vb_strvalue, inst->perm, O_RDWR | O_CREAT, NULL);
323323
if (outfd < 0) {
324324
RPERROR("Couldn't open file %pV", &env->filename);
325325

src/modules/rlm_linelog/rlm_linelog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static int linelog_write(rlm_linelog_t const *inst, linelog_call_env_t const *ca
405405
*p = '/';
406406
}
407407

408-
fd = exfile_open(inst->file.ef, path, inst->file.permissions, &offset);
408+
fd = exfile_open(inst->file.ef, path, inst->file.permissions, O_RDWR | O_CREAT, &offset);
409409
if (fd < 0) {
410410
RERROR("Failed to open %pV: %s", call_env->filename, fr_syserror(errno));
411411

src/modules/rlm_sql/sql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void rlm_sql_query_log(rlm_sql_t const *inst, char const *filename, char const *
389389
size_t len;
390390
bool failed = false; /* Write the log message outside of the critical region */
391391

392-
fd = exfile_open(inst->ef, filename, 0640, NULL);
392+
fd = exfile_open(inst->ef, filename, 0640, O_RDWR | O_CREAT, NULL);
393393
if (fd < 0) {
394394
ERROR("Couldn't open logfile '%s': %s", filename, fr_syserror(errno));
395395

0 commit comments

Comments
 (0)