diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-16 21:35:16 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-16 21:35:16 +0100 |
commit | 61a369b85e51e0d54e1651e4ff8c11fe4815a0c0 (patch) | |
tree | 37273e4881e917b7402b66d563acc2f1359b7a08 /config.h | |
parent | 968cee422ab1d61b4234127892d75f0497d8d8c2 (diff) |
Move default configuration file location to $HOME/.blabouncer/ and create a default file automatically if it doesn't exist.
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -4,6 +4,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <libgen.h> +#include <sys/stat.h> +#include <limits.h> #define MAXCHAR 1000 @@ -22,4 +25,8 @@ int getconfint(char *confname, char *filename); // Return 0 for password mismatch, or 1 for password match. int checkpassword(char *password, char *filename); +// Create the default configuration file. +// Return 1 on success, 0 on failure. +int createconfigfile(char *filename); + #endif |