From: solar Date: Wed, 23 Jun 2010 05:17:46 +0000 (+0000) Subject: New file permissions. X-Git-Tag: v0.5~74 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=22dbeae441f3f28808ebe124dd20fe6ccfe8e64e New file permissions. --- diff --git a/platform/example/functions/_PDCLIB/open.c b/platform/example/functions/_PDCLIB/open.c index f0379ba..133b729 100644 --- a/platform/example/functions/_PDCLIB/open.c +++ b/platform/example/functions/_PDCLIB/open.c @@ -26,8 +26,6 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) { /* This is an example implementation of _PDCLIB_open() fit for use with POSIX kernels. - FIXME: The permissions of newly created files should not be hardcoded - here. */ int osmode; switch ( mode & ( _PDCLIB_FREAD | _PDCLIB_FWRITE | _PDCLIB_FAPPEND | _PDCLIB_FRW ) ) @@ -56,7 +54,7 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) int rc; if ( osmode & O_CREAT ) { - rc = open( filename, osmode, S_IRUSR | S_IWUSR ); + rc = open( filename, osmode, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ); } else {