-# $OpenBSD: Makefile,v 1.1 2022/06/28 16:11:30 claudio Exp $
+# $OpenBSD: Makefile,v 1.2 2024/01/26 18:11:49 job Exp $
PROG= bgplgd
SRCS= bgplgd.c slowcgi.c qs.c
CLFAGS+= -Wmissing-declarations -Wredundant-decls
CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
CFLAGS+= -Wsign-compare
+CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../bgpd
LDADD= -levent
DPADD= ${LIBEVENT}
MAN= bgplgd.8
-.\" $OpenBSD: bgplgd.8,v 1.7 2023/03/13 17:31:28 claudio Exp $
+.\" $OpenBSD: bgplgd.8,v 1.8 2024/01/26 18:11:49 job Exp $
.\"
.\" Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 13 2023 $
+.Dd $Mdocdate: January 26 2024 $
.Dt BGPLGD 8
.Os
.Sh NAME
.Op Fl S Ar socket
.Op Fl s Ar socket
.Op Fl U Ar user
+.Op Fl V
.Sh DESCRIPTION
.Nm
is a server which implements the FastCGI Protocol to execute
to
.Ar user
and its primary group instead of the default www:www.
+.It Fl V
+Show the version and exit.
.El
.Pp
.Nm
-/* $OpenBSD: slowcgi.c,v 1.6 2023/03/31 09:55:39 claudio Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.7 2024/01/26 18:11:49 job Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
#include "slowcgi.h"
#include "bgplgd.h"
#include "http.h"
+#include "version.h"
#define TIMEOUT_DEFAULT 30
#define WWW_USER "www"
}
}
- while ((c = getopt(argc, argv, "dp:S:s:U:u:")) != -1) {
+ while ((c = getopt(argc, argv, "dp:S:s:U:u:V")) != -1) {
switch (c) {
case 'd':
debug++;
case 'U':
sock_user = optarg;
break;
+ case 'V':
+ fprintf(stderr, "OpenBGPD %s\n", BGPD_VERSION);
+ return 0;
default:
usage();
/* NOTREACHED */