alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Permissions of alsatplg -o output are hardcoded to S_IRUSR | S_IWUSR (600)
       [not found] <1639185626577805042-webhooks-bot@alsa-project.org>
@ 2021-12-11  1:20 ` GitHub issues - opened
  0 siblings, 0 replies; only message in thread
From: GitHub issues - opened @ 2021-12-11  1:20 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-utils issue #126 was opened from marc-hb:

>From https://github.com/alsa-project/alsa-utils/blob/c8c348e28a258f17e3/topology/topology.c#L172

```C
static int save(const char *output_file, void *buf, size_t size)
{

               fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);

```

When using alsatplg in a build system (e.g.: https://github.com/thesofproject/sof/blob/3e1c160e5053eae/tools/topology/topology1/CMakeLists.txt#L243), all other artefacts follow the process's umask **except** alsatplg output. This causes subtle and time-consuming errors when trying to share artefacts across different processes.


git blame finds: 

commit cbabe7a3f0cc84ecd352d4cbf85148946fa6c0d5
Author: Jaroslav Kysela <perex@perex.cz>
Date:   Thu Dec 19 15:36:05 2019 +0100

    alsatplg: rewrite to use the new libatopology functions


Before cbabe7a3f0, opening the output file was delegated to library function `snd_tplg_build_file()`. Not sure what permissions were used then.

Workaround:
```shell
alsatplg -c intput.conf -o - > output.tplg
```

Issue URL     : https://github.com/alsa-project/alsa-utils/issues/126
Repository URL: https://github.com/alsa-project/alsa-utils

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-11  1:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1639185626577805042-webhooks-bot@alsa-project.org>
2021-12-11  1:20 ` Permissions of alsatplg -o output are hardcoded to S_IRUSR | S_IWUSR (600) GitHub issues - opened

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).