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>
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));