From: reyk Date: Fri, 1 Aug 2014 21:59:56 +0000 (+0000) Subject: remove the global "log updates/all" option that came from relayd. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=346191df36e1723b8159d8ae9900023ae230707e;p=openbsd remove the global "log updates/all" option that came from relayd. --- diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c index 520ae5e7797..884d6d7569f 100644 --- a/usr.sbin/httpd/httpd.c +++ b/usr.sbin/httpd/httpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.c,v 1.10 2014/07/26 09:59:14 reyk Exp $ */ +/* $OpenBSD: httpd.c,v 1.11 2014/08/01 21:59:56 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -194,9 +194,6 @@ main(int argc, char *argv[]) if (parse_config(env->sc_conffile, env) == -1) exit(1); - if (debug) - env->sc_opts |= HTTPD_OPT_LOGUPDATE; - if (geteuid()) errx(1, "need root privileges"); diff --git a/usr.sbin/httpd/httpd.conf.5 b/usr.sbin/httpd/httpd.conf.5 index c171b208381..181951ba247 100644 --- a/usr.sbin/httpd/httpd.conf.5 +++ b/usr.sbin/httpd/httpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: httpd.conf.5,v 1.13 2014/08/01 21:51:02 doug Exp $ +.\" $OpenBSD: httpd.conf.5,v 1.14 2014/08/01 21:59:56 reyk Exp $ .\" .\" Copyright (c) 2014 Reyk Floeter .\" @@ -97,10 +97,6 @@ server "default" { Here are the settings that can be set globally: .Bl -tag -width Ds .It Xo -.Ic log -.Pq Ic updates Ns | Ns Ic all -.Xc -Set logging verbosity. .It Ic prefork Ar number Run the specified number of server processes. This increases the performance and prevents delays when connecting diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h index ad467b4b4f9..c5a24c3aebf 100644 --- a/usr.sbin/httpd/httpd.h +++ b/usr.sbin/httpd/httpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.h,v 1.28 2014/08/01 21:51:02 doug Exp $ */ +/* $OpenBSD: httpd.h,v 1.29 2014/08/01 21:59:56 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -380,9 +380,6 @@ struct httpd { #define HTTPD_OPT_VERBOSE 0x01 #define HTTPD_OPT_NOACTION 0x04 -#define HTTPD_OPT_LOGUPDATE 0x08 -#define HTTPD_OPT_LOGNOTIFY 0x10 -#define HTTPD_OPT_LOGALL 0x18 /* control.c */ int control_init(struct privsep *, struct control_sock *); diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 2ec30bdb753..067b603d8e4 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.14 2014/08/01 21:51:02 doug Exp $ */ +/* $OpenBSD: parse.y,v 1.15 2014/08/01 21:59:56 reyk Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -126,12 +126,11 @@ typedef struct { %} -%token ALL AUTO DIRECTORY FCGI INDEX LISTEN LOCATION LOG NO ON PORT -%token PREFORK ROOT SERVER SOCKET TYPES UPDATES VERBOSE +%token AUTO DIRECTORY FCGI INDEX LISTEN LOCATION LOG NO ON PORT +%token PREFORK ROOT SERVER SOCKET TYPES %token ERROR INCLUDE COMMON COMBINED %token STRING %token NUMBER -%type loglevel %type port %% @@ -169,12 +168,7 @@ varset : STRING '=' STRING { } ; -main : LOG loglevel { - if (loadcfg) - break; - conf->sc_opts |= $2; - } - | PREFORK NUMBER { +main : PREFORK NUMBER { if (loadcfg) break; if ($2 <= 0 || $2 > SERVER_MAXPROC) { @@ -535,10 +529,6 @@ port : PORT STRING { } ; -loglevel : UPDATES { $$ = HTTPD_OPT_LOGUPDATE; } - | ALL { $$ = HTTPD_OPT_LOGALL; } - ; - comma : ',' | nl | /* empty */ @@ -585,7 +575,6 @@ lookup(char *s) { /* this has to be sorted always */ static const struct keywords keywords[] = { - { "all", ALL }, { "auto", AUTO }, { "combined", COMBINED }, { "common", COMMON }, @@ -603,8 +592,7 @@ lookup(char *s) { "root", ROOT }, { "server", SERVER }, { "socket", SOCKET }, - { "types", TYPES }, - { "updates", UPDATES } + { "types", TYPES } }; const struct keywords *p; diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index 2e4cbaa0e07..ebbc07d2d17 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.19 2014/08/01 08:34:46 florian Exp $ */ +/* $OpenBSD: server.c,v 1.20 2014/08/01 21:59:56 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -603,7 +603,7 @@ server_close(struct client *clt, const char *msg) if (clt->clt_srvbev != NULL) bufferevent_disable(clt->clt_srvbev, EV_READ|EV_WRITE); - if ((env->sc_opts & HTTPD_OPT_LOGUPDATE) && msg != NULL) { + if (msg != NULL) { memset(&ibuf, 0, sizeof(ibuf)); memset(&obuf, 0, sizeof(obuf)); (void)print_host(&clt->clt_ss, ibuf, sizeof(ibuf));