--- sbbs/src/sbbs3/websrvr.h 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/websrvr.h 2018/04/24 16:43:12 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet Web Server */ -/* $Id: websrvr.h,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: websrvr.h,v 1.1.1.2 2018/04/24 16:43:12 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -55,8 +55,9 @@ typedef struct { void* cbdata; /* Private data passed to callbacks */ /* Callbacks (NULL if unused) */ - int (*lputs)(void*, int, char*); - void (*status)(void*, char*); + int (*lputs)(void*, int level, const char* msg); + void (*errormsg)(void*, int level, const char* msg); + void (*status)(void*, const char*); void (*started)(void*); void (*recycle)(void*); void (*terminated)(void*, int code); @@ -90,12 +91,20 @@ typedef struct { uint bind_retry_count; /* Number of times to retry bind() calls */ uint bind_retry_delay; /* Time to wait between each bind() retry */ char default_cgi_content[128]; + char default_auth_list[128]; WORD outbuf_highwater_mark; /* output block size control */ WORD outbuf_drain_timeout; /* JavaScript operating parameters */ js_startup_t js; + /* Login Attempt parameters */ + ulong login_attempt_delay; + ulong login_attempt_throttle; + ulong login_attempt_hack_threshold; + ulong login_attempt_filter_threshold; + link_list_t* login_attempt_list; + } web_startup_t; #if defined(STARTUP_INIT_FIELD_TABLES) @@ -120,7 +129,7 @@ static struct init_field web_init_fields #define WEB_OPT_HTTP_LOGGING (1<<6) /* Create/write-to HttpLogFile */ /* web_startup_t.options bits that require re-init/recycle when changed */ -#define WEB_INIT_OPTS (BBS_OPT_LOCAL_TIMEZONE|WEB_OPT_HTTP_LOGGING) +#define WEB_INIT_OPTS (WEB_OPT_HTTP_LOGGING) #if defined(STARTUP_INI_BITDESC_TABLES) static ini_bitdesc_t web_options[] = { @@ -137,7 +146,6 @@ static ini_bitdesc_t web_options[] = { { BBS_OPT_NO_RECYCLE ,"NO_RECYCLE" }, { BBS_OPT_GET_IDENT ,"GET_IDENT" }, { BBS_OPT_NO_JAVASCRIPT ,"NO_JAVASCRIPT" }, - { BBS_OPT_LOCAL_TIMEZONE ,"LOCAL_TIMEZONE" }, { BBS_OPT_MUTE ,"MUTE" }, /* terminator */ @@ -148,6 +156,7 @@ static ini_bitdesc_t web_options[] = { #define WEB_DEFAULT_ROOT_DIR "../web/root" #define WEB_DEFAULT_ERROR_DIR "error" #define WEB_DEFAULT_CGI_DIR "cgi-bin" +#define WEB_DEFAULT_AUTH_LIST "Basic,Digest" #define WEB_DEFAULT_CGI_CONTENT "text/plain" #ifdef DLLEXPORT