diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-11-01 18:15:29 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-11-01 18:15:29 +0000 |
commit | 2df877bd59f6a5a29c4232e4c7148b7115a4f1e0 (patch) | |
tree | 998f5ce43c6f17bcfb9e056aa5f1392836f78c37 /usr.sbin/ractl | |
parent | 1ba480fa0b8f1268e5c2c616e0cb5d249b30d1b2 (diff) |
Correctly group initialization of AF_UNIX socket.
spotted by deraadt in new code, sweep by me.
OK deraadt
Diffstat (limited to 'usr.sbin/ractl')
-rw-r--r-- | usr.sbin/ractl/ractl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ractl/ractl.c b/usr.sbin/ractl/ractl.c index e776b6ec36a..e3e0219ab0c 100644 --- a/usr.sbin/ractl/ractl.c +++ b/usr.sbin/ractl/ractl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ractl.c,v 1.1 2018/07/10 22:12:43 florian Exp $ */ +/* $OpenBSD: ractl.c,v 1.2 2019/11/01 18:15:28 florian Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -90,8 +90,8 @@ main(int argc, char *argv[]) memset(&sun, 0, sizeof(sun)); sun.sun_family = AF_UNIX; - strlcpy(sun.sun_path, sockname, sizeof(sun.sun_path)); + if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1) err(1, "connect: %s", sockname); |