Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
settings: don't use exacutable flag for config files
  • Loading branch information
perexg committed Sep 29, 2015
1 parent e32dea8 commit 0d15556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/settings.c
Expand Up @@ -150,7 +150,7 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...)

/* Create tmp file */
snprintf(tmppath, sizeof(tmppath), "%s.tmp", path);
if((fd = tvh_open(tmppath, O_CREAT | O_TRUNC | O_RDWR, S_IRWXU)) < 0) {
if((fd = tvh_open(tmppath, O_CREAT | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR)) < 0) {
tvhlog(LOG_ALERT, "settings", "Unable to create \"%s\" - %s",
tmppath, strerror(errno));
return;
Expand Down Expand Up @@ -361,7 +361,7 @@ hts_settings_open_file(int for_write, const char *pathfmt, ...)
/* Open file */
int flags = for_write ? O_CREAT | O_TRUNC | O_WRONLY : O_RDONLY;

return tvh_open(path, flags, S_IRWXU);
return tvh_open(path, flags, S_IRUSR | S_IWUSR);
}

/*
Expand Down

0 comments on commit 0d15556

Please sign in to comment.