diff mbox

topology: fix file permissions for output file to 0600

Message ID 1439299559-5051-2-git-send-email-liam.r.girdwood@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liam Girdwood Aug. 11, 2015, 1:25 p.m. UTC
File was incorrectly world rwx.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 src/topology/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai Aug. 11, 2015, 1:36 p.m. UTC | #1
On Tue, 11 Aug 2015 15:25:59 +0200,
Liam Girdwood wrote:
> 
> File was incorrectly world rwx.
> 
> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

Because of the problems I reported in the previous mail, I applied
only the first patch (renaming OBJECT_TYPE_*) in v2 series, so far.

So, it's better to fold these two fixes into the last patch.  Then
submit v3 after fixing other reported issues.


thanks,

Takashi

> ---
>  src/topology/parser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/topology/parser.c b/src/topology/parser.c
> index 5544517..993f70d 100644
> --- a/src/topology/parser.c
> +++ b/src/topology/parser.c
> @@ -267,7 +267,7 @@ int snd_tplg_build_file(snd_tplg_t *tplg, const char *infile,
>  	int err = 0;
>  
>  	tplg->out_fd =
> -		open(outfile, O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
> +		open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
>  	if (tplg->out_fd < 0) {
>  		SNDERR("error: failed to open %s err %d\n",
>  			outfile, -errno);
> -- 
> 2.1.4
>
diff mbox

Patch

diff --git a/src/topology/parser.c b/src/topology/parser.c
index 5544517..993f70d 100644
--- a/src/topology/parser.c
+++ b/src/topology/parser.c
@@ -267,7 +267,7 @@  int snd_tplg_build_file(snd_tplg_t *tplg, const char *infile,
 	int err = 0;
 
 	tplg->out_fd =
-		open(outfile, O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
+		open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (tplg->out_fd < 0) {
 		SNDERR("error: failed to open %s err %d\n",
 			outfile, -errno);