mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
Added chmod on ~/.weeechat/weechat.rc file (only onwer can read/write)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user