umask for open() call

git-svn-id: svn://code.dyne.org/veejay/trunk@1344 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2009-07-10 17:41:14 +00:00
parent 76491f5772
commit 069976212b
2 changed files with 4 additions and 4 deletions

View File

@@ -6359,7 +6359,7 @@ static void theme_response( gchar *string )
char theme_config[1024];
snprintf(theme_config,sizeof(theme_config), "%stheme.config", theme_dir );
snprintf(theme_file,sizeof(theme_file), "%s/%s/gveejay.rc", theme_dir, string );
int fd = open( theme_config , O_WRONLY | O_CREAT | O_TRUNC);
int fd = open( theme_config , O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
if(fd > 0)
{
write( fd, string, strlen(string));

View File

@@ -227,7 +227,7 @@ void vj_midi_save(void *vv, const char *filename)
vmidi_t *v = (vmidi_t*) vv;
if(!v->active) return;
int fd = open( filename, O_TRUNC|O_CREAT|O_WRONLY );
int fd = open( filename, O_TRUNC|O_CREAT|O_WRONLY,S_IRWXU );
if(!fd)
{
vj_msg(VEEJAY_MSG_ERROR, "Unable to save MIDI settings to %s",filename);
@@ -253,8 +253,8 @@ void vj_midi_save(void *vv, const char *filename)
d->extra,
(d->widget == NULL ? "none" : d->widget ),
d->msg );
write( fd, tmp, strlen( tmp ));
count ++;
if( write( fd, tmp, strlen( tmp )) >= 0 )
count ++;
}
free(items[i]);
}