Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 261099
Collapse All | Expand All

(-)marshal/t/float_format.c.orig (-1 / +2 lines)
Lines 93-99 ReadFile( const char *filename, void *p, Link Here
93
void 
93
void 
94
WriteFile( const char *filename, void *p, int size )
94
WriteFile( const char *filename, void *p, int size )
95
{
95
{
96
  int fd = open( filename, O_CREAT|O_TRUNC|O_WRONLY, 0666 );
96
  int fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY,
97
        S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
97
98
98
  if ( fd == -1 )
99
  if ( fd == -1 )
99
     {
100
     {
(-)src/alarm.c.orig (-1 / +1 lines)
Lines 685-691 SaErrorT oh_alarms_to_file(struct oh_dat Link Here
685
                return SA_ERR_HPI_INVALID_PARAMS;
685
                return SA_ERR_HPI_INVALID_PARAMS;
686
        }
686
        }
687
687
688
        file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0660 );
688
        file = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
689
        if (file < 0) {
689
        if (file < 0) {
690
                dbg("File '%s' could not be opened", filename);
690
                dbg("File '%s' could not be opened", filename);
691
                return SA_ERR_HPI_ERROR;
691
                return SA_ERR_HPI_ERROR;
(-)utils/uid_utils.c.orig (-2 / +2 lines)
Lines 400-406 SaErrorT oh_uid_map_to_file(void) Link Here
400
400
401
        uid_lock(&oh_uid_lock);
401
        uid_lock(&oh_uid_lock);
402
402
403
        file = open(uid_map_file, O_WRONLY|O_CREAT|O_TRUNC);
403
        file = open(uid_map_file, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP);
404
        if(file < 0) {
404
        if(file < 0) {
405
                dbg("Configuration file '%s' could not be opened", uid_map_file);
405
                dbg("Configuration file '%s' could not be opened", uid_map_file);
406
                uid_unlock(&oh_uid_lock);
406
                uid_unlock(&oh_uid_lock);
Lines 467-473 static gint uid_map_from_file() Link Here
467
                 dbg("Configuration file '%s' does not exist, initializing", uid_map_file);
467
                 dbg("Configuration file '%s' does not exist, initializing", uid_map_file);
468
                 file = open(uid_map_file,
468
                 file = open(uid_map_file,
469
                             O_RDWR | O_CREAT | O_TRUNC,
469
                             O_RDWR | O_CREAT | O_TRUNC,
470
                             S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH );
470
                             S_IRUSR | S_IWUSR | S_IRGRP);
471
                 if(file < 0) {
471
                 if(file < 0) {
472
                         dbg("Could not initialize uid map file, %s", uid_map_file );
472
                         dbg("Could not initialize uid map file, %s", uid_map_file );
473
                                         return -1;
473
                                         return -1;
(-)utils/el_utils.c.orig (-1 / +1 lines)
Lines 336-342 SaErrorT oh_el_map_to_file(oh_el *el, ch Link Here
336
                return SA_ERR_HPI_INVALID_PARAMS;
336
                return SA_ERR_HPI_INVALID_PARAMS;
337
        }
337
        }
338
338
339
        file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0660 );
339
        file = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP);
340
        if (file < 0) {
340
        if (file < 0) {
341
                dbg("EL file '%s' could not be opened", filename);
341
                dbg("EL file '%s' could not be opened", filename);
342
                return SA_ERR_HPI_ERROR;
342
                return SA_ERR_HPI_ERROR;
(-)openhpid/openhpid.cpp.orig (-2 / +2 lines)
Lines 215-221 int main (int argc, char *argv[]) Link Here
215
        }
215
        }
216
216
217
        // write the pid file
217
        // write the pid file
218
        pfile = open(pid_file, O_WRONLY | O_CREAT, 0640);
218
        pfile = open(pid_file, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP);
219
        if (pfile == -1) {
219
        if (pfile == -1) {
220
                // there is already a server running
220
                // there is already a server running
221
                dbg("Error: Cannot open PID file .\n");
221
                dbg("Error: Cannot open PID file .\n");
Lines 352-358 static bool morph2daemon(void) Link Here
352
352
353
       	// create the pid file (overwrite of old pid file is ok)
353
       	// create the pid file (overwrite of old pid file is ok)
354
        	unlink(pid_file);
354
        	unlink(pid_file);
355
        	pfile = open(pid_file, O_WRONLY | O_CREAT, 0640);
355
        	pfile = open(pid_file, O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP);
356
        	snprintf(pid_buf, sizeof(pid_buf), "%d\n", (int)getpid());
356
        	snprintf(pid_buf, sizeof(pid_buf), "%d\n", (int)getpid());
357
        	write(pfile, pid_buf, strlen(pid_buf));
357
        	write(pfile, pid_buf, strlen(pid_buf));
358
        	close(pfile);
358
        	close(pfile);

Return to bug 261099