diff options
author | Jaroslav Kysela <perex@perex.cz> | 2021-12-12 19:57:38 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2021-12-12 19:58:54 +0100 |
commit | 8e71fba810b87c48600191f4e2e13d0e351f73bc (patch) | |
tree | fa7ebd95cd5d58f7f8252f054d2a506987a3e152 | |
parent | c8c348e28a258f17e3872eed2c810ee67d12921b (diff) | |
download | alsa-utils-8e71fba810b87c48600191f4e2e13d0e351f73bc.tar.gz |
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 <perex@perex.cz>
-rw-r--r-- | topology/topology.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |