mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-30 17:15:30 +02:00
For now, make game config files (and other files) created by dgl a+rw
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@430 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
7dfa5ca681
commit
4eb5ec3c68
2
TODO
2
TODO
@ -1,3 +1,5 @@
|
|||||||
|
-make default_fmode configurable, and add config
|
||||||
|
file command "chmod file mode"
|
||||||
-allow setting the new rcfile access rights.
|
-allow setting the new rcfile access rights.
|
||||||
-allow configuring the ttyrec dir location & file format.
|
-allow configuring the ttyrec dir location & file format.
|
||||||
|
|
||||||
|
@ -1417,6 +1417,7 @@ write_canned_rcfile (int game, char *target)
|
|||||||
|
|
||||||
fclose (canned);
|
fclose (canned);
|
||||||
fclose (newfile);
|
fclose (newfile);
|
||||||
|
chmod (target, default_fmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifndef ARRAY_SIZE
|
#ifndef ARRAY_SIZE
|
||||||
@ -140,6 +141,8 @@ extern struct dg_globalconfig globalconfig;
|
|||||||
|
|
||||||
extern int num_games;
|
extern int num_games;
|
||||||
|
|
||||||
|
extern mode_t default_fmode;
|
||||||
|
|
||||||
/* dgamelaunch.c */
|
/* dgamelaunch.c */
|
||||||
extern void create_config(void);
|
extern void create_config(void);
|
||||||
extern void ttyrec_getmaster(void);
|
extern void ttyrec_getmaster(void);
|
||||||
|
@ -52,6 +52,8 @@ int loggedin = 0;
|
|||||||
char *chosen_name;
|
char *chosen_name;
|
||||||
int num_games = 0;
|
int num_games = 0;
|
||||||
|
|
||||||
|
mode_t default_fmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
|
||||||
|
|
||||||
struct dg_globalconfig globalconfig;
|
struct dg_globalconfig globalconfig;
|
||||||
|
|
||||||
|
|
||||||
@ -180,6 +182,7 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
|
|||||||
}
|
}
|
||||||
fclose (cannedf);
|
fclose (cannedf);
|
||||||
fclose (newfile);
|
fclose (newfile);
|
||||||
|
chmod (p2, default_fmode);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DGLCMD_EXEC:
|
case DGLCMD_EXEC:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user