commit - 50a969b7ac35bc33a78d07ae3aa7bc19a13b7378
commit + 82f1cb9aac57634234312b0968c832928b30af01
blob - dfe528e65dac856000ea4b081ef17ff405b05d53
blob + 9f192bc6d290409f9196be26577c9c715ffa2643
--- FICS/adminproc.c
+++ FICS/adminproc.c
#include "command.h"
#include "comproc.h"
#include "fics_getsalt.h"
+#include "ficsmain.h"
#include "gamedb.h"
#include "gameproc.h"
#include "maxxes-utils.h"
msnprintf(filename, sizeof filename, "%s/adminnews.%d",
news_dir,
param[0].val.integer);
- fd = open(filename, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(filename, g_open_flags[1], g_open_modes);
if (fd < 0)
return COM_FAILED;
else if ((fp = fdopen(fd, "w")) != NULL) {
msnprintf(filename, sizeof filename, "%s/news.%d",
news_dir,
param[0].val.integer);
- fd = open(filename, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(filename, g_open_flags[1], g_open_modes);
if (fd < 0)
return COM_FAILED;
else if ((fp = fdopen(fd, "w")) != NULL) {
msnprintf(tmp_file, sizeof tmp_file, "%s/.tmp.idx", news_dir);
- fd = open(tmp_file, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(tmp_file, g_open_flags[1], g_open_modes);
if (fd < 0)
return 0;
blob - 0d1e7d48d524db8a149421ae4e2737f33ae5920d
blob + 9919bfd1d0db6f1aa418fbb1f69b275eb7fecd78
--- FICS/playerdb.c
+++ FICS/playerdb.c
xrename(__func__, fname, fname2);
errno = 0;
- fd = open(fname2, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fname2, g_open_flags[0], g_open_modes);
if (fd < 0) {
warn("%s: open", __func__);
parray[p].login[0], parray[p].login);
errno = 0;
- fd = open(fname, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fname, g_open_flags[1], g_open_modes);
if (fd < 0) {
warn("%s: Problem opening file %s for write", __func__, fname);
int fd;
errno = 0;
- fd = open(file, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(file, g_open_flags[0], g_open_modes);
if (fd < 0) {
warn("%s: open", __func__);
return -1;
errno = 0;
- fd = open(fname, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fname, g_open_flags[0], g_open_modes);
if (fd < 0)
return -1;
GetMsgFile(p, fName, sizeof fName, __func__);
errno = 0;
- fd = open(fName, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fName, g_open_flags[1], g_open_modes);
if (fd < 0)
return 0;
parray[p_to].login[0], parray[p_to].login, "comments");
errno = 0;
- fd = open(fname, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fname, g_open_flags[0], g_open_modes);
if (fd < 0) {
warn("%s: open", __func__);
blob - e1306562c6c315a6d989cfca2369fc5529e0f690
blob + a85776d1f74f3377e1dc3fe83fb62f511fedb419
--- FICS/ratings.c
+++ FICS/ratings.c
#include "command.h"
#include "comproc.h"
#include "config.h"
+#include "ficsmain.h"
#include "gamedb.h"
#include "lists.h"
#include "playerdb.h"
STATS_VERSION);
errno = 0;
- fd = open(fname, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(fname, g_open_flags[1], g_open_modes);
if (fd < 0) {
warn("%s: can't write ratings data", __func__);
snprintf(TmpRankFile, sizeof TmpRankFile, "%s/tmpRank", sdir);
errno = 0;
- fd = open(TmpRankFile, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(TmpRankFile, g_open_flags[1], g_open_modes);
if (fd < 0) {
warn("%s: open", __func__);
blob - 4e47b8f0abc0fb4d2a080a627254e2dcda50585c
blob + 4da2411aa2fe510da444ce1cd81cad87efef780b
--- FICS/utils.c
+++ FICS/utils.c
#include <string.h>
#include "config.h"
+#include "ficsmain.h"
#include "network.h"
#include "playerdb.h"
#include "rmalloc.h"
int fd;
errno = 0;
- fd = open(file, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
+ fd = open(file, g_open_flags[1], g_open_modes);
if (fd < 0) {
warn("%s: open", __func__);