Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2009 13:34:42 GMT
From:      Ashish Shukla <wahjava@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/131422: [PATCH] Fix socketpair() function invocation in ctrlproxy
Message-ID:  <200902051334.n15DYgP6029913@www.freebsd.org>
Resent-Message-ID: <200902051340.n15De3s1029594@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         131422
>Category:       ports
>Synopsis:       [PATCH] Fix socketpair() function invocation in ctrlproxy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 05 13:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ashish Shukla
>Release:        7.1-STABLE
>Organization:
N/A
>Environment:
FreeBSD monte-cristo.france 7.1-STABLE FreeBSD 7.1-STABLE #0: Thu Jan 29 05:08:23 IST 2009     root@monte-cristo.france:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The attached diff fixes following issues:

  * The socketpair() function is invoked incorrectly causing, it to return EPROTONOSUPPORT everytime.
  * Changed '#include <gssapi.h>' to '#include <gssapi/gssapi.h>' to prevent warnings emitted by GCC.
>How-To-Repeat:

>Fix:
diff -urN /usr/ports/irc/ctrlproxy/Makefile ctrlproxy/Makefile
--- /usr/ports/irc/ctrlproxy/Makefile   2009-01-13 03:21:19.000000000 +0530
+++ ctrlproxy/Makefile  2009-02-05 18:50:10.000000000 +0530
@@ -8,7 +8,7 @@
 
 PORTNAME=      ctrlproxy
 PORTVERSION=   3.0.8
-PORTREVISION=  1
+PORTREVISION=  2
 CATEGORIES=    irc
 MASTER_SITES=  http://www.ctrlproxy.org/releases/ \
                LOCAL/chinsan/ctrlproxy/
diff -urN /usr/ports/irc/ctrlproxy/files/patch-lib_connection.c ctrlproxy/files/patch-lib_connectio
n.c
--- /usr/ports/irc/ctrlproxy/files/patch-lib_connection.c       1970-01-01 05:30:00.000000000 +0530
+++ ctrlproxy/files/patch-lib_connection.c      2009-02-05 18:52:47.000000000 +0530
@@ -0,0 +1,18 @@
+
+$FreeBSD$
+
+--- lib/connection.c.orig
++++ lib/connection.c
+@@ -676,8 +676,12 @@
+       pid_t pid;
+       int sock[2];
+ 
++#ifdef __FreeBSD__
++      if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sock) == -1) {
++#else
+       if (socketpair(PF_UNIX, SOCK_STREAM, AF_LOCAL, sock) == -1) {
++#endif
+               network_log(LOG_ERROR, s, "socketpair: %s", strerror(errno));
+               return -1;
+       }
+ 
diff -urN /usr/ports/irc/ctrlproxy/files/patch-lib_listener.h ctrlproxy/files/patch-lib_listener.h
--- /usr/ports/irc/ctrlproxy/files/patch-lib_listener.h 1970-01-01 05:30:00.000000000 +0530
+++ ctrlproxy/files/patch-lib_listener.h        2009-02-05 18:47:50.000000000 +0530
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- lib/listener.h.orig
++++ lib/listener.h
+@@ -5,7 +5,7 @@
+ #include "ctrlproxy.h"
+ 
+ #ifdef HAVE_GSSAPI
+-#include <gssapi.h>
++#include <gssapi/gssapi.h>
+ #endif
+ 
+ #ifndef G_MODULE_EXPORT


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902051334.n15DYgP6029913>