From 22dbeae441f3f28808ebe124dd20fe6ccfe8e64e Mon Sep 17 00:00:00 2001 From: solar Date: Wed, 23 Jun 2010 05:17:46 +0000 Subject: [PATCH] New file permissions. --- platform/example/functions/_PDCLIB/open.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 { -- 2.40.0