"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "config.c" between
Pound-2.7.tgz and Pound-2.8.tgz

About: Pound is a reverse proxy, load balancer and HTTPS front-end for Web server(s).

config.c  (Pound-2.7.tgz):config.c  (Pound-2.8.tgz)
skipping to change at line 80 skipping to change at line 80
{ "local6", LOG_LOCAL6 }, { "local6", LOG_LOCAL6 },
{ "local7", LOG_LOCAL7 }, { "local7", LOG_LOCAL7 },
{ NULL, -1 } { NULL, -1 }
}; };
#endif #endif
static regex_t Empty, Comment, User, Group, RootJail, Daemon, LogFacility, LogL evel, Alive, SSLEngine, Control; static regex_t Empty, Comment, User, Group, RootJail, Daemon, LogFacility, LogL evel, Alive, SSLEngine, Control;
static regex_t ListenHTTP, ListenHTTPS, End, Address, Port, Cert, xHTTP, Client , CheckURL; static regex_t ListenHTTP, ListenHTTPS, End, Address, Port, Cert, xHTTP, Client , CheckURL;
static regex_t Err414, Err500, Err501, Err503, MaxRequest, HeadRemove, RewriteL ocation, RewriteDestination; static regex_t Err414, Err500, Err501, Err503, MaxRequest, HeadRemove, RewriteL ocation, RewriteDestination;
static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emerg ency, Priority, HAport, HAportAddr; static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emerg ency, Priority, HAport, HAportAddr;
static regex_t Redirect, RedirectN, TimeOut, Session, Type, TTL, ID, DynScale; static regex_t Redirect, RedirectN, TimeOut, Session, Type, TTL, ID;
static regex_t ClientCert, AddHeader, DisableProto, SSLAllowClientRenegotiation , SSLHonorCipherOrder, Ciphers; static regex_t ClientCert, AddHeader, DisableProto, SSLAllowClientRenegotiation , SSLHonorCipherOrder, Ciphers;
static regex_t CAlist, VerifyList, CRLlist, NoHTTPS11, Grace, Include, ConnTO, IgnoreCase, HTTPS; static regex_t CAlist, VerifyList, CRLlist, NoHTTPS11, Grace, Include, ConnTO, IgnoreCase, HTTPS;
static regex_t Disabled, Threads, CNName, Anonymise, ECDHCurve; static regex_t Disabled, Threads, CNName, Anonymise, ECDHCurve;
static regmatch_t matches[5]; static regmatch_t matches[5];
static char *xhttp[] = { static char *xhttp[] = {
"^(GET|POST|HEAD) ([^ ]+) HTTP/1.[01]$", "^(GET|POST|HEAD) ([^ ]+) HTTP/1.[01]$",
"^(GET|POST|HEAD|PUT|PATCH|DELETE) ([^ ]+) HTTP/1.[01]$", "^(GET|POST|HEAD|PUT|PATCH|DELETE) ([^ ]+) HTTP/1.[01]$",
"^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT) ([^ ]+) HTTP/1.[01]$ ", "^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT) ([^ ]+) HTTP/1.[01]$ ",
"^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT|SUBSCRIBE|UNSUBSCRIBE |BPROPPATCH|POLL|BMOVE|BCOPY|BDELETE|BPROPFIND|NOTIFY|CONNECT) ([^ ]+) HTTP/1.[0 1]$", "^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT|SUBSCRIBE|UNSUBSCRIBE |BPROPPATCH|POLL|BMOVE|BCOPY|BDELETE|BPROPFIND|NOTIFY|CONNECT) ([^ ]+) HTTP/1.[0 1]$",
"^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT|SUBSCRIBE|UNSUBSCRIBE |BPROPPATCH|POLL|BMOVE|BCOPY|BDELETE|BPROPFIND|NOTIFY|CONNECT|RPC_IN_DATA|RPC_OU T_DATA) ([^ ]+) HTTP/1.[01]$", "^(GET|POST|HEAD|PUT|PATCH|DELETE|LOCK|UNLOCK|PROPFIND|PROPPATCH|SEARCH|MKCO L|MOVE|COPY|OPTIONS|TRACE|MKACTIVITY|CHECKOUT|MERGE|REPORT|SUBSCRIBE|UNSUBSCRIBE |BPROPPATCH|POLL|BMOVE|BCOPY|BDELETE|BPROPFIND|NOTIFY|CONNECT|RPC_IN_DATA|RPC_OU T_DATA) ([^ ]+) HTTP/1.[01]$",
}; };
static int log_level = 1; static int log_level = 1;
static int def_facility = LOG_DAEMON; static int def_facility = LOG_DAEMON;
static int clnt_to = 10; static int clnt_to = 10;
static int be_to = 15; static int be_to = 15;
static int be_connto = 15; static int be_connto = 15;
static int dynscale = 0;
static int ignore_case = 0; static int ignore_case = 0;
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
#ifndef OPENSSL_NO_ECDH #ifndef OPENSSL_NO_ECDH
static int EC_nid = NID_X9_62_prime256v1; static int EC_nid = NID_X9_62_prime256v1;
#endif #endif
#endif #endif
#define MAX_FIN 8 #define MAX_FIN 8
static FILE *f_in[MAX_FIN]; static FILE *f_in[MAX_FIN];
skipping to change at line 565 skipping to change at line 564
char lin[MAXBUF]; char lin[MAXBUF];
SERVICE *res; SERVICE *res;
BACKEND *be; BACKEND *be;
MATCHER *m; MATCHER *m;
int ign_case; int ign_case;
if((res = (SERVICE *)malloc(sizeof(SERVICE))) == NULL) if((res = (SERVICE *)malloc(sizeof(SERVICE))) == NULL)
conf_err("Service config: out of memory - aborted"); conf_err("Service config: out of memory - aborted");
memset(res, 0, sizeof(SERVICE)); memset(res, 0, sizeof(SERVICE));
res->sess_type = SESS_NONE; res->sess_type = SESS_NONE;
res->dynscale = dynscale;
pthread_mutex_init(&res->mut, NULL); pthread_mutex_init(&res->mut, NULL);
if(svc_name) if(svc_name)
strncpy(res->name, svc_name, KEY_SIZE); strncpy(res->name, svc_name, KEY_SIZE);
#if OPENSSL_VERSION_NUMBER >= 0x10000000L #if OPENSSL_VERSION_NUMBER >= 0x10000000L
if((res->sessions = LHM_lh_new(TABNODE, t)) == NULL) if((res->sessions = LHM_lh_new(TABNODE, t)) == NULL)
#else #else
if((res->sessions = lh_new(LHASH_HASH_FN(t_hash), LHASH_COMP_FN(t_cmp))) == NULL) if((res->sessions = lh_new(LHASH_HASH_FN(t_hash), LHASH_COMP_FN(t_cmp))) == NULL)
#endif #endif
conf_err("lh_new failed - aborted"); conf_err("lh_new failed - aborted");
ign_case = ignore_case; ign_case = ignore_case;
skipping to change at line 690 skipping to change at line 688
if(res->backends) { if(res->backends) {
for(be = res->backends; be->next; be = be->next) for(be = res->backends; be->next; be = be->next)
; ;
be->next = parse_be(0); be->next = parse_be(0);
} else } else
res->backends = parse_be(0); res->backends = parse_be(0);
} else if(!regexec(&Emergency, lin, 4, matches, 0)) { } else if(!regexec(&Emergency, lin, 4, matches, 0)) {
res->emergency = parse_be(1); res->emergency = parse_be(1);
} else if(!regexec(&Session, lin, 4, matches, 0)) { } else if(!regexec(&Session, lin, 4, matches, 0)) {
parse_sess(res); parse_sess(res);
} else if(!regexec(&DynScale, lin, 4, matches, 0)) {
res->dynscale = atoi(lin + matches[1].rm_so);
} else if(!regexec(&IgnoreCase, lin, 4, matches, 0)) { } else if(!regexec(&IgnoreCase, lin, 4, matches, 0)) {
ign_case = atoi(lin + matches[1].rm_so); ign_case = atoi(lin + matches[1].rm_so);
} else if(!regexec(&Disabled, lin, 4, matches, 0)) { } else if(!regexec(&Disabled, lin, 4, matches, 0)) {
res->disabled = atoi(lin + matches[1].rm_so); res->disabled = atoi(lin + matches[1].rm_so);
} else if(!regexec(&End, lin, 4, matches, 0)) { } else if(!regexec(&End, lin, 4, matches, 0)) {
for(be = res->backends; be; be = be->next) { for(be = res->backends; be; be = be->next) {
if(!be->disabled) if(!be->disabled)
res->tot_pri += be->priority; res->tot_pri += be->priority;
res->abs_pri += be->priority; res->abs_pri += be->priority;
} }
skipping to change at line 1344 skipping to change at line 1340
break; break;
} }
} else if(!regexec(&Grace, lin, 4, matches, 0)) { } else if(!regexec(&Grace, lin, 4, matches, 0)) {
grace = atoi(lin + matches[1].rm_so); grace = atoi(lin + matches[1].rm_so);
} else if(!regexec(&LogLevel, lin, 4, matches, 0)) { } else if(!regexec(&LogLevel, lin, 4, matches, 0)) {
log_level = atoi(lin + matches[1].rm_so); log_level = atoi(lin + matches[1].rm_so);
} else if(!regexec(&Client, lin, 4, matches, 0)) { } else if(!regexec(&Client, lin, 4, matches, 0)) {
clnt_to = atoi(lin + matches[1].rm_so); clnt_to = atoi(lin + matches[1].rm_so);
} else if(!regexec(&Alive, lin, 4, matches, 0)) { } else if(!regexec(&Alive, lin, 4, matches, 0)) {
alive_to = atoi(lin + matches[1].rm_so); alive_to = atoi(lin + matches[1].rm_so);
} else if(!regexec(&DynScale, lin, 4, matches, 0)) {
dynscale = atoi(lin + matches[1].rm_so);
} else if(!regexec(&TimeOut, lin, 4, matches, 0)) { } else if(!regexec(&TimeOut, lin, 4, matches, 0)) {
be_to = atoi(lin + matches[1].rm_so); be_to = atoi(lin + matches[1].rm_so);
} else if(!regexec(&ConnTO, lin, 4, matches, 0)) { } else if(!regexec(&ConnTO, lin, 4, matches, 0)) {
be_connto = atoi(lin + matches[1].rm_so); be_connto = atoi(lin + matches[1].rm_so);
} else if(!regexec(&IgnoreCase, lin, 4, matches, 0)) { } else if(!regexec(&IgnoreCase, lin, 4, matches, 0)) {
ignore_case = atoi(lin + matches[1].rm_so); ignore_case = atoi(lin + matches[1].rm_so);
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
#ifndef OPENSSL_NO_ECDH #ifndef OPENSSL_NO_ECDH
} else if(!regexec(&ECDHCurve, lin, 4, matches, 0)) { } else if(!regexec(&ECDHCurve, lin, 4, matches, 0)) {
lin[matches[1].rm_eo] = '\0'; lin[matches[1].rm_eo] = '\0';
skipping to change at line 1483 skipping to change at line 1477
|| regcomp(&Priority, "^[ \t]*Priority[ \t]+([1-9])[ \t]*$", REG_ICASE | REG _NEWLINE | REG_EXTENDED) || regcomp(&Priority, "^[ \t]*Priority[ \t]+([1-9])[ \t]*$", REG_ICASE | REG _NEWLINE | REG_EXTENDED)
|| regcomp(&TimeOut, "^[ \t]*TimeOut[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&TimeOut, "^[ \t]*TimeOut[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&HAport, "^[ \t]*HAport[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | R EG_NEWLINE | REG_EXTENDED) || regcomp(&HAport, "^[ \t]*HAport[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | R EG_NEWLINE | REG_EXTENDED)
|| regcomp(&HAportAddr, "^[ \t]*HAport[ \t]+([^ \t]+)[ \t]+([1-9][0-9]*)[ \t ]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&HAportAddr, "^[ \t]*HAport[ \t]+([^ \t]+)[ \t]+([1-9][0-9]*)[ \t ]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Redirect, "^[ \t]*Redirect[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | RE G_NEWLINE | REG_EXTENDED) || regcomp(&Redirect, "^[ \t]*Redirect[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | RE G_NEWLINE | REG_EXTENDED)
|| regcomp(&RedirectN, "^[ \t]*Redirect[ \t]+(30[127])[ \t]+\"(.+)\"[ \t]*$" , REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&RedirectN, "^[ \t]*Redirect[ \t]+(30[127])[ \t]+\"(.+)\"[ \t]*$" , REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Session, "^[ \t]*Session[ \t]*$", REG_ICASE | REG_NEWLINE | REG_ EXTENDED) || regcomp(&Session, "^[ \t]*Session[ \t]*$", REG_ICASE | REG_NEWLINE | REG_ EXTENDED)
|| regcomp(&Type, "^[ \t]*Type[ \t]+([^ \t]+)[ \t]*$", REG_ICASE | REG_NEWLI NE | REG_EXTENDED) || regcomp(&Type, "^[ \t]*Type[ \t]+([^ \t]+)[ \t]*$", REG_ICASE | REG_NEWLI NE | REG_EXTENDED)
|| regcomp(&TTL, "^[ \t]*TTL[ \t]+([1-9-][0-9]*)[ \t]*$", REG_ICASE | REG_NE WLINE | REG_EXTENDED) || regcomp(&TTL, "^[ \t]*TTL[ \t]+([1-9-][0-9]*)[ \t]*$", REG_ICASE | REG_NE WLINE | REG_EXTENDED)
|| regcomp(&ID, "^[ \t]*ID[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&ID, "^[ \t]*ID[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&DynScale, "^[ \t]*DynScale[ \t]+([01])[ \t]*$", REG_ICASE | REG_ NEWLINE | REG_EXTENDED)
|| regcomp(&ClientCert, "^[ \t]*ClientCert[ \t]+([0-3])[ \t]+([1-9])[ \t]*$" , REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&ClientCert, "^[ \t]*ClientCert[ \t]+([0-3])[ \t]+([1-9])[ \t]*$" , REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&AddHeader, "^[ \t]*AddHeader[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&AddHeader, "^[ \t]*AddHeader[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&SSLAllowClientRenegotiation, "^[ \t]*SSLAllowClientRenegotiation [ \t]+([012])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&SSLAllowClientRenegotiation, "^[ \t]*SSLAllowClientRenegotiation [ \t]+([012])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&DisableProto, "^[ \t]*Disable[ \t]+(SSLv2|SSLv3|TLSv1|TLSv1_1|TL Sv1_2)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&DisableProto, "^[ \t]*Disable[ \t]+(SSLv2|SSLv3|TLSv1|TLSv1_1|TL Sv1_2)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&SSLHonorCipherOrder, "^[ \t]*SSLHonorCipherOrder[ \t]+([01])[ \t ]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&SSLHonorCipherOrder, "^[ \t]*SSLHonorCipherOrder[ \t]+([01])[ \t ]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Ciphers, "^[ \t]*Ciphers[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_ NEWLINE | REG_EXTENDED) || regcomp(&Ciphers, "^[ \t]*Ciphers[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_ NEWLINE | REG_EXTENDED)
|| regcomp(&CAlist, "^[ \t]*CAlist[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NE WLINE | REG_EXTENDED) || regcomp(&CAlist, "^[ \t]*CAlist[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NE WLINE | REG_EXTENDED)
|| regcomp(&VerifyList, "^[ \t]*VerifyList[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED) || regcomp(&VerifyList, "^[ \t]*VerifyList[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&CRLlist, "^[ \t]*CRLlist[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_ NEWLINE | REG_EXTENDED) || regcomp(&CRLlist, "^[ \t]*CRLlist[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_ NEWLINE | REG_EXTENDED)
|| regcomp(&NoHTTPS11, "^[ \t]*NoHTTPS11[ \t]+([0-2])[ \t]*$", REG_ICASE | R EG_NEWLINE | REG_EXTENDED) || regcomp(&NoHTTPS11, "^[ \t]*NoHTTPS11[ \t]+([0-2])[ \t]*$", REG_ICASE | R EG_NEWLINE | REG_EXTENDED)
skipping to change at line 1538 skipping to change at line 1531
print_log = 1; print_log = 1;
break; break;
case 'V': case 'V':
print_log = 1; print_log = 1;
logmsg(LOG_DEBUG, "Version %s", VERSION); logmsg(LOG_DEBUG, "Version %s", VERSION);
logmsg(LOG_DEBUG, " Configuration switches:"); logmsg(LOG_DEBUG, " Configuration switches:");
#ifdef C_SUPER #ifdef C_SUPER
if(strcmp(C_SUPER, "0")) if(strcmp(C_SUPER, "0"))
logmsg(LOG_DEBUG, " --disable-super"); logmsg(LOG_DEBUG, " --disable-super");
#endif #endif
#ifdef C_CERT1L
if(strcmp(C_CERT1L, "1"))
logmsg(LOG_DEBUG, " --enable-cert1l");
#endif
#ifdef C_SSL #ifdef C_SSL
if(strcmp(C_SSL, "")) if(strcmp(C_SSL, ""))
logmsg(LOG_DEBUG, " --with-ssl=%s", C_SSL); logmsg(LOG_DEBUG, " --with-ssl=%s", C_SSL);
#endif #endif
#ifdef C_T_RSA #ifdef C_T_RSA
if(strcmp(C_T_RSA, "0")) if(strcmp(C_T_RSA, "0"))
logmsg(LOG_DEBUG, " --with-t_rsa=%s", C_T_RSA); logmsg(LOG_DEBUG, " --with-t_rsa=%s", C_T_RSA);
#endif #endif
#ifdef C_MAXBUF #ifdef C_MAXBUF
if(strcmp(C_MAXBUF, "0")) if(strcmp(C_MAXBUF, "0"))
skipping to change at line 1653 skipping to change at line 1642
regfree(&Priority); regfree(&Priority);
regfree(&TimeOut); regfree(&TimeOut);
regfree(&HAport); regfree(&HAport);
regfree(&HAportAddr); regfree(&HAportAddr);
regfree(&Redirect); regfree(&Redirect);
regfree(&RedirectN); regfree(&RedirectN);
regfree(&Session); regfree(&Session);
regfree(&Type); regfree(&Type);
regfree(&TTL); regfree(&TTL);
regfree(&ID); regfree(&ID);
regfree(&DynScale);
regfree(&ClientCert); regfree(&ClientCert);
regfree(&AddHeader); regfree(&AddHeader);
regfree(&SSLAllowClientRenegotiation); regfree(&SSLAllowClientRenegotiation);
regfree(&DisableProto); regfree(&DisableProto);
regfree(&SSLHonorCipherOrder); regfree(&SSLHonorCipherOrder);
regfree(&Ciphers); regfree(&Ciphers);
regfree(&CAlist); regfree(&CAlist);
regfree(&VerifyList); regfree(&VerifyList);
regfree(&CRLlist); regfree(&CRLlist);
regfree(&NoHTTPS11); regfree(&NoHTTPS11);
 End of changes. 8 change blocks. 
13 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)