2021-01-10 19:30:35 +11:00
|
|
|
#include <limits.h> /* PATH_MAX */
|
|
|
|
|
2021-03-23 07:44:23 +11:00
|
|
|
/* Defaults values */
|
2021-01-10 19:30:35 +11:00
|
|
|
#define DEFAULT_MIME "application/octet-stream"
|
|
|
|
#define DEFAULT_LANG ""
|
|
|
|
#define DEFAULT_CHROOT "/var/gemini"
|
2021-03-23 07:44:23 +11:00
|
|
|
#define DEFAULT_INDEX "index.gmi"
|
2021-01-10 19:30:35 +11:00
|
|
|
#define DEFAULT_AUTOIDX 0
|
|
|
|
|
2021-03-23 07:44:23 +11:00
|
|
|
/*
|
|
|
|
* Options used later
|
|
|
|
*/
|
|
|
|
/* longest hardcoded mimetype is 56 long so 64 should be enough */
|
2021-01-14 23:31:51 +11:00
|
|
|
static char default_mime[64] = DEFAULT_MIME;
|
|
|
|
static char lang[16] = DEFAULT_LANG;
|
|
|
|
static unsigned int doautoidx = DEFAULT_AUTOIDX;
|
2021-03-23 07:44:23 +11:00
|
|
|
static char cgidir[PATH_MAX] = {'\0'};
|
|
|
|
static int chrooted = 0;
|