summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfarrah rashid <farrah.rashid@windriver.com>2013-02-20 16:09:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-01 15:38:49 +0000
commitd0114a5a99ebdd84eb0e0c7ced3321a9168139b1 (patch)
treef1ed2f5d8c025d3b9085724f51863be7855ebb5c
parent87359b141599ab6a916daf55a9cf1a49067fdf4b (diff)
downloadpoky-d0114a5a99ebdd84eb0e0c7ced3321a9168139b1.tar.gz
poky-d0114a5a99ebdd84eb0e0c7ced3321a9168139b1.tar.bz2
poky-d0114a5a99ebdd84eb0e0c7ced3321a9168139b1.zip
tcp-wrappers: add socklen_t.patch
Replace incorrect size_t data type with socket length data type (From OE-Core rev: f8d44580e7caf29f1b532c89041469847c36f45f) Signed-off-by: farrah rashid <farrah.rashid@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch59
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb1
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
new file mode 100644
index 0000000000..8e46df8e1e
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
@@ -0,0 +1,59 @@
+commit 88b6984ef0bf3b703c1c851092662b95e91db1ff
+Author: farrah rashid <farrah.rashid@windriver.com>
+Date: Tue Feb 12 09:53:50 2013 -0500
+
+ tcp-wrappers Support for building with glibc
+
+ Added support for socklen_t type to len argument passed to socket related
+ calls. This fixes a bug that causes tcp wrappers to fail when using sshd.
+
+ Upstream-Status: Pending
+
+ Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
+
+diff --git a/fix_options.c b/fix_options.c
+index 7473adf..fe2b442 100644
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -38,7 +38,12 @@ struct request_info *request;
+ #ifdef IP_OPTIONS
+ unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+ char lbuf[BUFFER_SIZE], *lp;
+- int optsize = sizeof(optbuf), ipproto;
++#ifdef __GLIBC__
++ socklen_t optsize = sizeof(optbuf);
++#else
++ int optsize = sizeof(optbuf);
++#endif
++ int ipproto;
+ struct protoent *ip;
+ int fd = request->fd;
+ unsigned int opt;
+diff --git a/socket.c b/socket.c
+index 4b2c575..a0d2987 100644
+--- a/socket.c
++++ b/socket.c
+@@ -95,7 +95,11 @@ struct request_info *request;
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
+ #endif
++#ifdef __GLIBC__
++ socklen_t len;
++#else
+ int len;
++#endif
+ char buf[BUFSIZ];
+ int fd = request->fd;
+
+@@ -426,7 +430,11 @@ int fd;
+ #else
+ struct sockaddr_in sin;
+ #endif
++#ifdef __GLIBC__
++ socklen_t size = sizeof(sin);
++#else
+ int size = sizeof(sin);
++#endif
+
+ /*
+ * Eat up the not-yet received datagram. Some systems insist on a
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 51ec7b292f..ba940085ff 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -36,6 +36,7 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
file://safe_finger.patch \
file://sig_fix.patch \
file://siglongjmp.patch \
+ file://socklen_t.patch \
file://tcpdchk_libwrapped.patch \
file://ldflags.patch \
\