summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/weeconfig.c3
-rw-r--r--weechat/src/common/weeconfig.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c
index ea88d11b7..0d156d1d5 100644
--- a/src/common/weeconfig.c
+++ b/src/common/weeconfig.c
@@ -33,6 +33,7 @@
#include <time.h>
#include <pwd.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include "weechat.h"
#include "weeconfig.h"
@@ -1272,6 +1273,7 @@ config_create_default ()
fprintf (file, "server_autorejoin=on\n");
fclose (file);
+ chmod (filename, 0600);
free (filename);
return 0;
}
@@ -1418,6 +1420,7 @@ config_write (char *config_name)
}
fclose (file);
+ chmod (filename, 0600);
free (filename);
return 0;
}
diff --git a/weechat/src/common/weeconfig.c b/weechat/src/common/weeconfig.c
index ea88d11b7..0d156d1d5 100644
--- a/weechat/src/common/weeconfig.c
+++ b/weechat/src/common/weeconfig.c
@@ -33,6 +33,7 @@
#include <time.h>
#include <pwd.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include "weechat.h"
#include "weeconfig.h"
@@ -1272,6 +1273,7 @@ config_create_default ()
fprintf (file, "server_autorejoin=on\n");
fclose (file);
+ chmod (filename, 0600);
free (filename);
return 0;
}
@@ -1418,6 +1420,7 @@ config_write (char *config_name)
}
fclose (file);
+ chmod (filename, 0600);
free (filename);
return 0;
}