File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ lock_sc(void)
430430 * open lock file if not already open
431431 */
432432 if (lock_fd < 0 ) {
433- lock_fd = open (lock_path , O_RDWR |O_CREAT );
433+ lock_fd = open (lock_path , O_RDWR |O_CREAT , S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); /* more 0644 */
434434 if (lock_fd < 0 ) {
435435 /* failed to open and/or create the lock file */
436436 fprintf (stderr , "\nERROR: failed to open lock file: %s\n" , lock_path );
Original file line number Diff line number Diff line change 1313#include <signal.h>
1414#include <time.h>
1515#include <ncurses.h>
16+ #include <sys/stat.h>
1617#include "rogue.h"
1718#include "score.h"
1819
@@ -28,6 +29,11 @@ main(int argc, char **argv)
2829 char * env ;
2930 time_t lowtime ;
3031
32+ /*
33+ * set mode for write access for the owner only
34+ */
35+ (void ) umask (S_IWGRP | S_IWOTH );
36+
3137 md_init ();
3238
3339#ifdef MASTER
You can’t perform that action at this time.
0 commit comments