diff options
author | farrah rashid <farrah.rashid@windriver.com> | 2013-02-20 16:09:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-25 05:58:19 -0800 |
commit | ace5a940dc7396f9f19eb4390ddd0ea5bd52268e (patch) | |
tree | 895361dac8b73804736efe2ce0b45f1b5a9798e9 /meta/recipes-extended/tcp-wrappers | |
parent | 7c57659ccf68e2aa6151b6fddd640a46e52d81dd (diff) | |
download | poky-ace5a940dc7396f9f19eb4390ddd0ea5bd52268e.tar.gz |
tcp-wrappers: add socklen_t.patch
Replace incorrect size_t data type with socket length data type
(From OE-Core rev: c2d456cb79f42eefd50605d72361ded823568d1b)
Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/tcp-wrappers')
-rw-r--r-- | meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch | 59 | ||||
-rw-r--r-- | meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 1 |
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 @@ | |||
1 | commit 88b6984ef0bf3b703c1c851092662b95e91db1ff | ||
2 | Author: farrah rashid <farrah.rashid@windriver.com> | ||
3 | Date: Tue Feb 12 09:53:50 2013 -0500 | ||
4 | |||
5 | tcp-wrappers Support for building with glibc | ||
6 | |||
7 | Added support for socklen_t type to len argument passed to socket related | ||
8 | calls. This fixes a bug that causes tcp wrappers to fail when using sshd. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: farrah rashid <farrah.rashid@windriver.com> | ||
13 | |||
14 | diff --git a/fix_options.c b/fix_options.c | ||
15 | index 7473adf..fe2b442 100644 | ||
16 | --- a/fix_options.c | ||
17 | +++ b/fix_options.c | ||
18 | @@ -38,7 +38,12 @@ struct request_info *request; | ||
19 | #ifdef IP_OPTIONS | ||
20 | unsigned char optbuf[BUFFER_SIZE / 3], *cp; | ||
21 | char lbuf[BUFFER_SIZE], *lp; | ||
22 | - int optsize = sizeof(optbuf), ipproto; | ||
23 | +#ifdef __GLIBC__ | ||
24 | + socklen_t optsize = sizeof(optbuf); | ||
25 | +#else | ||
26 | + int optsize = sizeof(optbuf); | ||
27 | +#endif | ||
28 | + int ipproto; | ||
29 | struct protoent *ip; | ||
30 | int fd = request->fd; | ||
31 | unsigned int opt; | ||
32 | diff --git a/socket.c b/socket.c | ||
33 | index 4b2c575..a0d2987 100644 | ||
34 | --- a/socket.c | ||
35 | +++ b/socket.c | ||
36 | @@ -95,7 +95,11 @@ struct request_info *request; | ||
37 | static struct sockaddr_in client; | ||
38 | static struct sockaddr_in server; | ||
39 | #endif | ||
40 | +#ifdef __GLIBC__ | ||
41 | + socklen_t len; | ||
42 | +#else | ||
43 | int len; | ||
44 | +#endif | ||
45 | char buf[BUFSIZ]; | ||
46 | int fd = request->fd; | ||
47 | |||
48 | @@ -426,7 +430,11 @@ int fd; | ||
49 | #else | ||
50 | struct sockaddr_in sin; | ||
51 | #endif | ||
52 | +#ifdef __GLIBC__ | ||
53 | + socklen_t size = sizeof(sin); | ||
54 | +#else | ||
55 | int size = sizeof(sin); | ||
56 | +#endif | ||
57 | |||
58 | /* | ||
59 | * 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 \ | |||
36 | file://safe_finger.patch \ | 36 | file://safe_finger.patch \ |
37 | file://sig_fix.patch \ | 37 | file://sig_fix.patch \ |
38 | file://siglongjmp.patch \ | 38 | file://siglongjmp.patch \ |
39 | file://socklen_t.patch \ | ||
39 | file://tcpdchk_libwrapped.patch \ | 40 | file://tcpdchk_libwrapped.patch \ |
40 | file://ldflags.patch \ | 41 | file://ldflags.patch \ |
41 | \ | 42 | \ |