summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-01-19 21:18:47 +0000
committerguenther <guenther@openbsd.org>2015-01-19 21:18:47 +0000
commitcdf4d38d89f7a8fce13582210985f610705e3b3c (patch)
tree45a5d45d6208ca4f5bf0f0347be3e211a9bcc822
parentNo need to include pfvar.h, another leftover from relayd. It was also (diff)
downloadwireguard-openbsd-cdf4d38d89f7a8fce13582210985f610705e3b3c.tar.xz
wireguard-openbsd-cdf4d38d89f7a8fce13582210985f610705e3b3c.zip
The kernel doesn't actually care what a sockaddr's sa_len is on input,
so don't waste code setting it improvment and ok florian@
-rw-r--r--usr.sbin/slowcgi/slowcgi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/slowcgi/slowcgi.c b/usr.sbin/slowcgi/slowcgi.c
index 44595bb0e1a..069b1e96dd4 100644
--- a/usr.sbin/slowcgi/slowcgi.c
+++ b/usr.sbin/slowcgi/slowcgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slowcgi.c,v 1.42 2015/01/16 06:40:20 deraadt Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.43 2015/01/19 21:18:47 guenther Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
* Copyright (c) 2013 Florian Obser <florian@openbsd.org>
@@ -355,7 +355,6 @@ slowcgi_listen(char *path, struct passwd *pw)
{
struct listener *l = NULL;
struct sockaddr_un sun;
- size_t len;
mode_t old_umask;
int fd;
@@ -365,10 +364,9 @@ slowcgi_listen(char *path, struct passwd *pw)
bzero(&sun, sizeof(sun));
sun.sun_family = AF_UNIX;
- len = strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
- if (len >= sizeof(sun.sun_path))
+ if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
+ sizeof(sun.sun_path))
lerrx(1, "socket path to long");
- sun.sun_len = len;
if (unlink(path) == -1)
if (errno != ENOENT)