From 8e71fba810b87c48600191f4e2e13d0e351f73bc Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sun, 12 Dec 2021 19:57:38 +0100 Subject: topology: fix the file permissions for the generated files The owner r/w file permissions are too restrictive. Let umask do it's work and set the r/w permissions to any. Fixes: https://github.com/alsa-project/alsa-utils/issues/126 Signed-off-by: Jaroslav Kysela --- topology/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topology/topology.c b/topology/topology.c index 962e2e8..e172dd6 100644 --- a/topology/topology.c +++ b/topology/topology.c @@ -169,7 +169,7 @@ static int save(const char *output_file, void *buf, size_t size) fname = alloca(strlen(output_file) + 5); strcpy(fname, output_file); strcat(fname, ".new"); - fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (fd < 0) { fprintf(stderr, _("Unable to open output file '%s': %s\n"), fname, strerror(-errno)); -- cgit v1.2.1