rpms/nc/devel nc-1.84-glib.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 nc.spec, 1.19, 1.20 sources, 1.5, 1.6 nc-glib.patch, 1.2, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Nov 18 10:41:11 UTC 2005
Author: rvokal
Update of /cvs/dist/rpms/nc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32126
Modified Files:
.cvsignore nc.spec sources
Added Files:
nc-1.84-glib.patch
Removed Files:
nc-glib.patch
Log Message:
- follow upstream
nc-1.84-glib.patch:
netcat.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
--- NEW FILE nc-1.84-glib.patch ---
--- nc/netcat.c.glib 2005-11-18 11:23:13.000000000 +0100
+++ nc/netcat.c 2005-11-18 11:38:00.000000000 +0100
@@ -54,6 +54,8 @@
#include <fcntl.h>
#include "atomicio.h"
+#include <glib.h>
+
#ifndef SUN_LEN
#define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
@@ -411,7 +413,7 @@
memset(&sun, 0, sizeof(struct sockaddr_un));
sun.sun_family = AF_UNIX;
- if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
+ if (g_strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
sizeof(sun.sun_path)) {
close(s);
errno = ENAMETOOLONG;
@@ -442,7 +444,7 @@
memset(&sun, 0, sizeof(struct sockaddr_un));
sun.sun_family = AF_UNIX;
- if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
+ if (g_strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
sizeof(sun.sun_path)) {
close(s);
errno = ENAMETOOLONG;
@@ -553,11 +555,11 @@
if ((s = socket(res0->ai_family, res0->ai_socktype,
res0->ai_protocol)) < 0)
continue;
-
+ #ifdef SO_REUSEPORT
ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
if (ret == -1)
err(1, NULL);
-
+ #endif
set_common_sockopts(s);
if (bind(s, (struct sockaddr *)res0->ai_addr,
@@ -722,7 +724,8 @@
char *c;
for (x = 0; x <= (hi - lo); x++) {
- y = (arc4random() & 0xFFFF) % (hi - lo);
+ /* use random instead of arc4random */
+ y = (random() & 0xFFFF) % (hi - lo);
c = portlist[x];
portlist[x] = portlist[y];
portlist[y] = c;
@@ -764,21 +767,25 @@
{
int x = 1;
+#ifdef TCP_MD5SIG
if (Sflag) {
if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG,
&x, sizeof(x)) == -1)
err(1, NULL);
}
+#endif
if (Dflag) {
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
&x, sizeof(x)) == -1)
err(1, NULL);
}
+#ifdef SO_JUMBO
if (jflag) {
if (setsockopt(s, SOL_SOCKET, SO_JUMBO,
&x, sizeof(x)) == -1)
err(1, NULL);
}
+#endif
if (Tflag != -1) {
if (setsockopt(s, IPPROTO_IP, IP_TOS,
&Tflag, sizeof(Tflag)) == -1)
@@ -818,9 +825,11 @@
\t-l Listen mode, for inbound connects\n\
\t-n Suppress name/port resolutions\n\
\t-p port\t Specify local port for remote connects\n\
- \t-r Randomize remote ports\n\
- \t-S Enable the TCP MD5 signature option\n\
- \t-s addr\t Local source address\n\
+ \t-r Randomize remote ports\n "
+#ifdef TCP_MD5SIG
+" \t-S Enable the TCP MD5 signature option\n"
+#endif
+" \t-s addr\t Local source address\n\
\t-T ToS\t Set IP Type of Service\n\
\t-t Answer TELNET negotiation\n\
\t-U Use UNIX domain socket\n\
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/nc/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 27 Sep 2005 11:36:44 -0000 1.4
+++ .cvsignore 18 Nov 2005 10:41:08 -0000 1.5
@@ -1 +1 @@
-nc-1.82.tar.bz2
+nc-1.84.tar.bz2
Index: nc.spec
===================================================================
RCS file: /cvs/dist/rpms/nc/devel/nc.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- nc.spec 21 Oct 2005 10:10:36 -0000 1.19
+++ nc.spec 18 Nov 2005 10:41:08 -0000 1.20
@@ -1,10 +1,10 @@
Summary: Reads and writes data across network connections using TCP or UDP.
Name: nc
-Version: 1.82
-Release: 2
+Version: 1.84
+Release: 1
URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
Source0: nc-%{version}.tar.bz2
-Patch0: nc-glib.patch
+Patch0: nc-1.84-glib.patch
Patch1: nc-1.78-pollhup.patch
Patch2: nc-1.82-reuseaddr.patch
License: GPL
@@ -52,6 +52,9 @@
%doc README scripts
%changelog
+* Fri Nov 18 2005 Radek Vokal <rvokal at redhat.com> 1.84-1
+- follow upstream
+
* Fri Oct 21 2005 Radek Vokal <rvokal at redhat.com> 1.82-2
- use SO_REUSEADDR (#171315)
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/nc/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources 27 Sep 2005 11:36:44 -0000 1.5
+++ sources 18 Nov 2005 10:41:08 -0000 1.6
@@ -1 +1 @@
-c06108db0e84a11d37c74b7c429b82e7 nc-1.82.tar.bz2
+2dd05f6a6f058d7001a1fc7d8354216e nc-1.84.tar.bz2
--- nc-glib.patch DELETED ---
More information about the fedora-cvs-commits
mailing list