summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/daemon/settings.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/daemon/settings.c b/src/daemon/settings.c
index 855d4bb..e5941cc 100644
--- a/src/daemon/settings.c
+++ b/src/daemon/settings.c
@@ -39,7 +39,11 @@ void settings_init(void)
unset_flag(flag_daemonize);
settings.port = 6996;
settings.verboselevel = USURP_VERBOSITY;
- setting_readconf("./usurpation.conf");
+#define macro2str(a) _macro2str(a)
+#define _macro2str(a) #a
+ setting_readconf("/" macro2str(SYSCONFDIR) "/usurpation.conf");
+#undef macro2str
+#undef _macro2str
}
int setting_detach(void)
@@ -91,7 +95,7 @@ static int setting_readconf(const char * const path)
int fd;
- if ((fd = open(path, O_RDONLY | O_NOATIME)) == -1) {
+ if ((fd = open(path, O_RDONLY)) == -1) {
if (USURP_VERBOSITY >= 2) {
perror("error while opening the configuration file");
return 1;