Openembedded Core Discussions
 help / color / mirror / Atom feed
* Fix tcp-wrappers for sshd
@ 2013-02-20 21:09 farrah rashid
  2013-02-20 21:09 ` [PATCH 1/2] tcp-wrappers: remove size_t.patch farrah rashid
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: farrah rashid @ 2013-02-20 21:09 UTC (permalink / raw)
  To: openembedded-core

farrah rashid (2):
  tcp-wrappers: remove size_t.patch
  tcp-wrappers: add socklen_t.patch

 .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44 ---------------
 .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59 ++++++++++++++++++++
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
 3 files changed, 61 insertions(+), 46 deletions(-)
 delete mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] tcp-wrappers: remove size_t.patch
  2013-02-20 21:09 Fix tcp-wrappers for sshd farrah rashid
@ 2013-02-20 21:09 ` farrah rashid
  2013-02-20 21:09 ` [PATCH 2/2] tcp-wrappers: add socklen_t.patch farrah rashid
  2013-02-21  7:13 ` Fix tcp-wrappers for sshd Saul Wold
  2 siblings, 0 replies; 7+ messages in thread
From: farrah rashid @ 2013-02-20 21:09 UTC (permalink / raw)
  To: openembedded-core

Incorrect data type for socket calls

Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
---
 .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44 --------------------
 1 files changed, 0 insertions(+), 44 deletions(-)
 delete mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch

diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
deleted file mode 100644
index 8373e8a..0000000
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Upstream-Status: Backport
-
-diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
---- tcp_wrappers_7.6.orig/fix_options.c	2003-08-21 03:41:33.000000000 +0200
-+++ tcp_wrappers_7.6/fix_options.c	2003-08-21 03:41:27.000000000 +0200
-@@ -38,7 +38,11 @@
- #ifdef IP_OPTIONS
-     unsigned char optbuf[BUFFER_SIZE / 3], *cp;
-     char    lbuf[BUFFER_SIZE], *lp;
-+#ifdef __GLIBC__
-+    size_t  optsize = sizeof(optbuf), ipproto;
-+#else
-     int     optsize = sizeof(optbuf), ipproto;
-+#endif
-     struct protoent *ip;
-     int     fd = request->fd;
-     unsigned int opt;
-diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
---- tcp_wrappers_7.6.orig/socket.c	2003-08-21 03:41:33.000000000 +0200
-+++ tcp_wrappers_7.6/socket.c	2003-08-21 03:40:51.000000000 +0200
-@@ -90,7 +90,11 @@
-     static struct sockaddr_in client;
-     static struct sockaddr_in server;
- #endif
-+#ifdef __GLIBC__
-+    size_t  len;
-+#else
-     int     len;
-+#endif
-     char    buf[BUFSIZ];
-     int     fd = request->fd;
- 
-@@ -421,7 +425,11 @@
- #else
-     struct sockaddr_in sin;
- #endif
-+#ifdef __GLIBC__
-+    size_t  size = sizeof(sin);
-+#else
-     int     size = sizeof(sin);
-+#endif
- 
-     /*
-      * Eat up the not-yet received datagram. Some systems insist on a
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] tcp-wrappers: add socklen_t.patch
  2013-02-20 21:09 Fix tcp-wrappers for sshd farrah rashid
  2013-02-20 21:09 ` [PATCH 1/2] tcp-wrappers: remove size_t.patch farrah rashid
@ 2013-02-20 21:09 ` farrah rashid
  2013-02-21  7:13 ` Fix tcp-wrappers for sshd Saul Wold
  2 siblings, 0 replies; 7+ messages in thread
From: farrah rashid @ 2013-02-20 21:09 UTC (permalink / raw)
  To: openembedded-core

Replace incorrect size_t data type with socket length data type

Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
---
 .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59 ++++++++++++++++++++
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
 2 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch

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 0000000..8e46df8
--- /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 9b865ba..ba94008 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -5,7 +5,7 @@ SECTION = "console/network"
 
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
-PR ="r9"
+PR ="r10"
 
 
 PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
@@ -36,7 +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://size_t.patch \
+           file://socklen_t.patch \
            file://tcpdchk_libwrapped.patch \
            file://ldflags.patch \
            \
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Fix tcp-wrappers for sshd
  2013-02-20 21:09 Fix tcp-wrappers for sshd farrah rashid
  2013-02-20 21:09 ` [PATCH 1/2] tcp-wrappers: remove size_t.patch farrah rashid
  2013-02-20 21:09 ` [PATCH 2/2] tcp-wrappers: add socklen_t.patch farrah rashid
@ 2013-02-21  7:13 ` Saul Wold
  2013-02-21  7:50   ` Bernhard Reutner-Fischer
  2013-02-25 13:51   ` Richard Purdie
  2 siblings, 2 replies; 7+ messages in thread
From: Saul Wold @ 2013-02-21  7:13 UTC (permalink / raw)
  To: farrah rashid; +Cc: openembedded-core

On 02/20/2013 01:09 PM, farrah rashid wrote:
> farrah rashid (2):
>    tcp-wrappers: remove size_t.patch
>    tcp-wrappers: add socklen_t.patch
>
>   .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44 ---------------
>   .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59 ++++++++++++++++++++
>   .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
>   3 files changed, 61 insertions(+), 46 deletions(-)
>   delete mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
>   create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
>

This must be for Danny, please mark that in the patch in the future.

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix tcp-wrappers for sshd
  2013-02-21  7:13 ` Fix tcp-wrappers for sshd Saul Wold
@ 2013-02-21  7:50   ` Bernhard Reutner-Fischer
  2013-02-21  9:10     ` Rongqing Li
  2013-02-25 13:51   ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Bernhard Reutner-Fischer @ 2013-02-21  7:50 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On 21 February 2013 08:13, Saul Wold <sgw@linux.intel.com> wrote:
> On 02/20/2013 01:09 PM, farrah rashid wrote:
>>
>> farrah rashid (2):
>>    tcp-wrappers: remove size_t.patch
>>    tcp-wrappers: add socklen_t.patch
>>
>>   .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44
>> ---------------
>>   .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59
>> ++++++++++++++++++++
>>   .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
>>   3 files changed, 61 insertions(+), 46 deletions(-)
>>   delete mode 100644
>> meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
>>   create mode 100644
>> meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
>>
>
> This must be for Danny, please mark that in the patch in the future.

socklen_t is also needed on !GLIBC hosts since a long time now (IIRC
it was even in SUSv2).
I would just use most of the syndicated patches from debian/patches/ from
http://ftp.de.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.q-24.debian.tar.xz
YMMV.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix tcp-wrappers for sshd
  2013-02-21  7:50   ` Bernhard Reutner-Fischer
@ 2013-02-21  9:10     ` Rongqing Li
  0 siblings, 0 replies; 7+ messages in thread
From: Rongqing Li @ 2013-02-21  9:10 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: openembedded-core



On 02/21/2013 03:50 PM, Bernhard Reutner-Fischer wrote:
> On 21 February 2013 08:13, Saul Wold <sgw@linux.intel.com> wrote:
>> On 02/20/2013 01:09 PM, farrah rashid wrote:
>>>
>>> farrah rashid (2):
>>>     tcp-wrappers: remove size_t.patch
>>>     tcp-wrappers: add socklen_t.patch
>>>
>>>    .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44
>>> ---------------
>>>    .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59
>>> ++++++++++++++++++++
>>>    .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
>>>    3 files changed, 61 insertions(+), 46 deletions(-)
>>>    delete mode 100644
>>> meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
>>>    create mode 100644
>>> meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
>>>
>>
>> This must be for Danny, please mark that in the patch in the future.
>
> socklen_t is also needed on !GLIBC hosts since a long time now (IIRC
> it was even in SUSv2).
> I would just use most of the syndicated patches from debian/patches/ from
> http://ftp.de.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.q-24.debian.tar.xz
> YMMV.
>



size_t.patch has been removed in 6c418ec278335c93692c2e19ec0b7b84b471e2b9,

In fact, size_t.patch has introduced a bug in ppc64.


-Roy




> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>

-- 
Best Reagrds,
Roy | RongQing Li



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix tcp-wrappers for sshd
  2013-02-21  7:13 ` Fix tcp-wrappers for sshd Saul Wold
  2013-02-21  7:50   ` Bernhard Reutner-Fischer
@ 2013-02-25 13:51   ` Richard Purdie
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2013-02-25 13:51 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On Wed, 2013-02-20 at 23:13 -0800, Saul Wold wrote:
> On 02/20/2013 01:09 PM, farrah rashid wrote:
> > farrah rashid (2):
> >    tcp-wrappers: remove size_t.patch
> >    tcp-wrappers: add socklen_t.patch
> >
> >   .../tcp-wrappers/tcp-wrappers-7.6/size_t.patch     |   44 ---------------
> >   .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch  |   59 ++++++++++++++++++++
> >   .../tcp-wrappers/tcp-wrappers_7.6.bb               |    4 +-
> >   3 files changed, 61 insertions(+), 46 deletions(-)
> >   delete mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
> >   create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
> >
> 
> This must be for Danny, please mark that in the patch in the future.

This is a bit of a mess since we have the first patch in master but not
the second. I've added it...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-25 14:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 21:09 Fix tcp-wrappers for sshd farrah rashid
2013-02-20 21:09 ` [PATCH 1/2] tcp-wrappers: remove size_t.patch farrah rashid
2013-02-20 21:09 ` [PATCH 2/2] tcp-wrappers: add socklen_t.patch farrah rashid
2013-02-21  7:13 ` Fix tcp-wrappers for sshd Saul Wold
2013-02-21  7:50   ` Bernhard Reutner-Fischer
2013-02-21  9:10     ` Rongqing Li
2013-02-25 13:51   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox