Adapt to our SO_PEERCRED.

This commit is contained in:
dcoppa 2010-10-18 07:43:08 +00:00
parent 056ede8d59
commit ff61d9c46e
3 changed files with 33 additions and 2 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2010/08/19 12:54:14 jasper Exp $
# $OpenBSD: Makefile,v 1.6 2010/10/18 07:43:08 dcoppa Exp $
COMMENT= IPC library used by GnuPG and gpgme
DISTNAME= libassuan-2.0.1
REVISION= 0
SHARED_LIBS += assuan 0.1 # 1.0
@ -23,7 +24,8 @@ USE_LIBTOOL= Yes
MODULES= devel/gettext \
textproc/intltool
LIB_DEPENDS= gpg-error::security/libgpg-error
WANTLIB= gpg-error
LIB_DEPENDS= ::security/libgpg-error
CONFIGURE_STYLE= gnu

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-configure,v 1.1 2010/10/18 07:43:08 dcoppa Exp $
--- configure.orig Mon Aug 9 12:33:37 2010
+++ configure Thu Oct 14 11:29:50 2010
@@ -13333,11 +13333,12 @@ if test "${assuan_cv_sys_so_peercred+set}" = set; then
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <sys/types.h>
#include <sys/socket.h>
int
main ()
{
-struct ucred cr;
+struct sockpeercred cr;
int cl = sizeof cr;
getsockopt (1, SOL_SOCKET, SO_PEERCRED, &cr, &cl);
;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_assuan-socket-server_c,v 1.1 2010/10/18 07:43:08 dcoppa Exp $
--- src/assuan-socket-server.c.orig Thu Oct 14 11:26:27 2010
+++ src/assuan-socket-server.c Thu Oct 14 11:27:15 2010
@@ -51,7 +51,7 @@ accept_connection_bottom (assuan_context_t ctx)
ctx->peercred_valid = 0;
#ifdef HAVE_SO_PEERCRED
{
- struct ucred cr;
+ struct sockpeercred cr;
socklen_t cl = sizeof cr;
if ( !getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &cr, &cl))