]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Pass mode when creating output files
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 22 Oct 2022 07:34:52 +0000 (03:34 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 22 Oct 2022 07:34:52 +0000 (03:34 -0400)
src/bin/unit_test_attribute.c

index 0ee98b03a06364ae51c8b21ee35407fe053bc87e..1b6a2bbcfe4aef8372ec24bc63f0e777a01f07a7 100644 (file)
@@ -2779,7 +2779,7 @@ static size_t command_write(command_result_t *result, command_file_ctx_t *cc,
 
        path = talloc_bstrndup(cc->tmp_ctx, in, inlen);
 
-       fd = open(path, O_CREAT | O_WRONLY);
+       fd = open(path, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
        if (fd < 0) {
                fr_strerror_printf("Failed opening \"%s\": %s", path, fr_syserror(errno));
        error: