--- marshal/t/float_format.c.orig 2007-10-30 16:43:34.000000000 +0100 +++ marshal/t/float_format.c.orig 2007-11-28 14:29:47.625238863 +0100 @@ -93,7 +93,8 @@ ReadFile( const char *filename, void *p, void WriteFile( const char *filename, void *p, int size ) { - int fd = open( filename, O_CREAT|O_TRUNC|O_WRONLY, 0666 ); + int fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY, + S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); if ( fd == -1 ) { --- src/alarm.c.orig 2007-10-30 16:43:36.000000000 +0100 +++ src/alarm.c.orig 2007-11-28 14:29:47.669241479 +0100 @@ -685,7 +685,7 @@ SaErrorT oh_alarms_to_file(struct oh_dat return SA_ERR_HPI_INVALID_PARAMS; } - file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0660 ); + file = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); if (file < 0) { dbg("File '%s' could not be opened", filename); return SA_ERR_HPI_ERROR; --- utils/uid_utils.c.orig 2007-10-30 16:44:00.000000000 +0100 +++ utils/uid_utils.c.orig 2007-11-28 14:29:47.777247901 +0100 @@ -400,7 +400,7 @@ SaErrorT oh_uid_map_to_file(void) uid_lock(&oh_uid_lock); - file = open(uid_map_file, O_WRONLY|O_CREAT|O_TRUNC); + file = open(uid_map_file, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP); if(file < 0) { dbg("Configuration file '%s' could not be opened", uid_map_file); uid_unlock(&oh_uid_lock); @@ -467,7 +467,7 @@ static gint uid_map_from_file() dbg("Configuration file '%s' does not exist, initializing", uid_map_file); file = open(uid_map_file, O_RDWR | O_CREAT | O_TRUNC, - S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ); + S_IRUSR | S_IWUSR | S_IRGRP); if(file < 0) { dbg("Could not initialize uid map file, %s", uid_map_file ); return -1; --- utils/el_utils.c.orig 2007-10-30 16:44:00.000000000 +0100 +++ utils/el_utils.c.orig 2007-11-28 14:29:47.833251231 +0100 @@ -336,7 +336,7 @@ SaErrorT oh_el_map_to_file(oh_el *el, ch return SA_ERR_HPI_INVALID_PARAMS; } - file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0660 ); + file = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP); if (file < 0) { dbg("EL file '%s' could not be opened", filename); return SA_ERR_HPI_ERROR; --- openhpid/openhpid.cpp.orig 2007-10-30 16:44:01.000000000 +0100 +++ openhpid/openhpid.cpp.orig 2007-11-28 14:30:55.601280729 +0100 @@ -215,7 +215,7 @@ int main (int argc, char *argv[]) } // write the pid file - pfile = open(pid_file, O_WRONLY | O_CREAT, 0640); + pfile = open(pid_file, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP); if (pfile == -1) { // there is already a server running dbg("Error: Cannot open PID file .\n"); @@ -352,7 +352,7 @@ static bool morph2daemon(void) // create the pid file (overwrite of old pid file is ok) unlink(pid_file); - pfile = open(pid_file, O_WRONLY | O_CREAT, 0640); + pfile = open(pid_file, O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP); snprintf(pid_buf, sizeof(pid_buf), "%d\n", (int)getpid()); write(pfile, pid_buf, strlen(pid_buf)); close(pfile);