1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

use SUN_LEN macro to calculate the actual length of an initialized sockaddr_un

Submitted by:	Edwin Groothuis <edwin@mavetju.org>
This commit is contained in:
Yen-Ming Lee 2003-06-29 13:21:20 +00:00
parent e35bc8c804
commit 87e9e5b854
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83830
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- scanner_avpd.c.orig Sun Jun 29 21:08:46 2003
+++ scanner_avpd.c Sun Jun 29 21:10:12 2003
@@ -74,7 +74,7 @@
if (avp_fd!=-1 && connected==-1){
do_log(LOG_DEBUG, "Trying to connect to socket");
if (connect(avp_fd, (struct sockaddr *)(&avp_socket),
- sizeof(avp_socket.sun_family) + strlen(NodeCtl)) >= 0){
+ SUN_LEN(&avp_socket)) >= 0){
connected=1;
do_log(LOG_DEBUG, "avp_socket_connect connected to kavdaemon");
return 0;

View File

@ -0,0 +1,11 @@
--- scanner_trophie.c.orig Sun Jun 29 21:08:53 2003
+++ scanner_trophie.c Sun Jun 29 21:10:34 2003
@@ -61,7 +61,7 @@
if (trophie_fd!=-1 && connected==-1){
do_log(LOG_DEBUG, "Trying to connect to socket");
if (connect(trophie_fd, (struct sockaddr *)(&trophie_socket),
- sizeof(trophie_socket.sun_family) + strlen(config->virusscanner)) >= 0){
+ SUN_LEN(&trophie_socket)) >= 0){
connected=1;
do_log(LOG_DEBUG, "trophie_socket_connect connected");
return 0;