[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-62-g82220c2
From: |
Alfred M. Szmidt |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-62-g82220c2 |
Date: |
Sun, 31 Oct 2010 20:40:19 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 82220c25850dc6f208f7319b209b0dd3df1fc00f (commit)
via 60a541619269b32b53c7c05003821b91bd1e5044 (commit)
via fe539ae9c3a1e6456859593ef7aa9ba4797d881c (commit)
via 3b7ce1732f80421b8e24496e9a0be538ad11462e (commit)
via 5b174beae521f700a886911829a6a9a11cf426bd (commit)
via cc3c8e7c7a75f7112f43660e93c3b8a0e1bb27c2 (commit)
via 8698a66345bff08d1e0929703b7fd42a89e20460 (commit)
via 08866d9632061cea2e56616497df6aa7f88ccf6a (commit)
from bb5b08302663ac94707fcc4cbfac69513968590c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=82220c25850dc6f208f7319b209b0dd3df1fc00f
commit 82220c25850dc6f208f7319b209b0dd3df1fc00f
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 21:25:52 2010 +0100
libinetutils: UTMP fixes for OpenBSD.
diff --git a/ChangeLog b/ChangeLog
index 66cc297..b22cca1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-31 Mats Erik Andersson <address@hidden>
+
+ libinetutils: UTMP fixes for OpenBSD.
+
+ * libinetutils/utmp_init.c [HAVE_UTIL_H]: Include <util.h>.
+ (utmp_init): Only use UTX.ut_host if HAVE_STRUCT_UTMP_UT_NAME ||
+ HAVE_STRUCT_UTMPX_UT_NAME are defined.
+ [HAVE_STRUCT_UTMP_UT_HOST]: Initialise USER using UTX.ut_host.
+ Call pututline()/endutent() only if HAVE_DECL_GETUTENT is defined,
otherwise use login().
+ * libinetutils/cleansess.c [HAVE_UTIL_H]: Include <util.h>.
+ * libinetutils/utmp_logout.c [HAVE_UTIL_H]: Include <util.h>.
+ Call getutline() only if HAVE_DECL_GETUTENT is defined, otherwise
+ use logout().
+
2010-10-31 Alfred M. Szmidt <address@hidden>
Use git-version-gen to extract version number.
diff --git a/libinetutils/cleansess.c b/libinetutils/cleansess.c
index 87d3de5..7757351 100644
--- a/libinetutils/cleansess.c
+++ b/libinetutils/cleansess.c
@@ -26,6 +26,9 @@
#include <sys/time.h>
#include <time.h>
#ifdef HAVE_UTMP_H
+# if HAVE_UTIL_H
+# include <util.h>
+# endif
# include <utmp.h>
#else
# ifdef HAVE_UTMPX_H
diff --git a/libinetutils/utmp_init.c b/libinetutils/utmp_init.c
index 8e4fcfd..aa4e874 100644
--- a/libinetutils/utmp_init.c
+++ b/libinetutils/utmp_init.c
@@ -52,6 +52,9 @@
# endif
# include <utmpx.h>
#else
+# if HAVE_UTIL_H
+# include <util.h>
+# endif
# include <utmp.h>
#endif
#include <string.h>
@@ -77,9 +80,12 @@ utmp_init (char *line, char *user, char *id)
#endif
#if defined HAVE_STRUCT_UTMP_UT_USER || defined HAVE_STRUCT_UTMPX_UT_USER
strncpy (utx.ut_user, user, sizeof (utx.ut_user));
-#else
+#elif defined HAVE_STRUCT_UTMP_UT_NAME || defined HAVE_STRUCT_UTMPX_UT_NAME
strncpy (utx.ut_name, user, sizeof (utx.ut_name));
#endif
+#if defined HAVE_STRUCT_UTMP_UT_HOST
+ strncpy (utx.ut_host, user, sizeof (utx.ut_host));
+#endif
strncpy (utx.ut_line, line, sizeof (utx.ut_line));
#if defined HAVE_STRUCT_UTMP_UT_PID
utx.ut_pid = getpid ();
@@ -100,7 +106,7 @@ utmp_init (char *line, char *user, char *id)
updwtmpx (PATH_WTMPX, &utx);
# endif
endutxent ();
-#else
+#elif HAVE_DECL_GETUTENT
pututline (&utx);
# ifdef HAVE_UPDWTMP
updwtmp (PATH_WTMP, &utx);
@@ -108,6 +114,8 @@ utmp_init (char *line, char *user, char *id)
logwtmp (line, user, id);
# endif
endutent ();
+#else
+ login (&utx);
#endif
}
diff --git a/libinetutils/utmp_logout.c b/libinetutils/utmp_logout.c
index 9774f3c..eb1b6b9 100644
--- a/libinetutils/utmp_logout.c
+++ b/libinetutils/utmp_logout.c
@@ -49,6 +49,9 @@
# define __USE_GNU
# include <utmpx.h>
#else
+# if HAVE_UTIL_H
+# include <util.h>
+# endif
# include <utmp.h>
#endif
#include <string.h>
@@ -79,7 +82,7 @@ utmp_logout (char *line)
updwtmpx (PATH_WTMPX, ut);
}
endutxent ();
-#else
+#elif HAVE_DECL_GETUTENT
struct utmp utx;
struct utmp *ut;
@@ -116,5 +119,8 @@ utmp_logout (char *line)
# endif
}
endutent ();
+#else
+ if (logout (line))
+ logwtmp (line, "", "");
#endif
}
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=60a541619269b32b53c7c05003821b91bd1e5044
commit 60a541619269b32b53c7c05003821b91bd1e5044
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 20:59:33 2010 +0100
Use git-version-gen to extract version number.
diff --git a/.gitignore b/.gitignore
index 1733723..a3e9634 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,8 @@
.deps
.emacs*
.libs
+.tarball-version
+.version
ABOUT-NLS
GNUmakefile
INSTALL
diff --git a/ChangeLog b/ChangeLog
index fe501c3..66cc297 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-31 Alfred M. Szmidt <address@hidden>
+
+ Use git-version-gen to extract version number.
+
+ * .gitignore (.tarball-version, .version): Added to list.
+ * configure.ac: Use git-version-gen to extract version number.
+ * bootstrap.conf (gnulib_modules): Added git-version-gen to list.
+
+ * Makefile.am (BUILT_SOURCES): New variable.
+ ($(top_srcdir)/.version, dist-hook): New targets.
+
+ * bootstrap.conf (gnulib_modules): Removed unlocked-io from list.
+
2010-10-31 Mats Erik Andersson <address@hidden>
traceroute: Pass integer values to IP_TTL option.
diff --git a/Makefile.am b/Makefile.am
index 7af1c56..adbfce6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,5 +31,11 @@ SUBDIRS = lib \
DISTCLEANFILES = pathdefs.make paths.defs $(PACKAGE)-$(VERSION).tar.gz
+BUILT_SOURCES = $(top_srcdir)/.version
+$(top_srcdir)/.version:
+ echo $(VERSION) > address@hidden && mv address@hidden $@
+dist-hook:
+ echo $(VERSION) > $(distdir)/.tarball-version
+
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"`
diff --git a/bootstrap.conf b/bootstrap.conf
index e4511dc..e1158ac 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -45,6 +45,7 @@ gettext
gettext-h
getusershell
git-merge-changelog
+git-version-gen
glob
gnupload
inttostr
@@ -73,7 +74,6 @@ strnlen
sysexits
termios
unistd-safer
-unlocked-io
update-copyright
vasnprintf
version-etc-fsf
diff --git a/configure.ac b/configure.ac
index 183275d..c1ac270 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@
AC_PREREQ(2.59)
-AC_INIT([GNU inetutils], [1.8], address@hidden)
+AC_INIT([GNU inetutils], m4_esyscmd([build-aux/git-version-gen
.tarball-version]), address@hidden)
AC_CONFIG_SRCDIR([src/inetd.c])
AC_CONFIG_AUX_DIR([build-aux])
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=fe539ae9c3a1e6456859593ef7aa9ba4797d881c
commit fe539ae9c3a1e6456859593ef7aa9ba4797d881c
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 20:16:53 2010 +0100
traceroute: Pass integer values to IP_TTL option.
diff --git a/ChangeLog b/ChangeLog
index d0c09ca..fe501c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2010-10-31 Mats Erik Andersson <address@hidden>
+ traceroute: Pass integer values to IP_TTL option.
+
+ * src/traceroute.c (trace_init): Renamed TTLP to TTL, and changed
+ type to `int'.
+ (trace_inc_ttl): Likewise.
+
+2010-10-31 Mats Erik Andersson <address@hidden>
+
Calculate socket length using sockaddr.
* src/inetd.c: New element `se_addrlen' in `struct servtab'.
diff --git a/src/traceroute.c b/src/traceroute.c
index 0b02fa3..f79e747 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -311,9 +311,9 @@ void
trace_init (trace_t * t, const struct sockaddr_in to,
const enum trace_type type)
{
- const unsigned char *ttlp;
+ int ttl;
assert (t);
- ttlp = &t->ttl;
+ ttl = t->ttl;
t->type = type;
t->to = to;
@@ -325,8 +325,8 @@ trace_init (trace_t * t, const struct sockaddr_in to,
if (t->udpfd < 0)
error (EXIT_FAILURE, errno, "socket");
- if (setsockopt (t->udpfd, IPPROTO_IP, IP_TTL, ttlp,
- sizeof (t->ttl)) < 0)
+ if (setsockopt (t->udpfd, IPPROTO_IP, IP_TTL, &ttl,
+ sizeof (ttl)) < 0)
error (EXIT_FAILURE, errno, "setsockopt");
}
@@ -340,7 +340,7 @@ trace_init (trace_t * t, const struct sockaddr_in to,
error (EXIT_FAILURE, errno, "socket");
if (setsockopt (t->icmpfd, IPPROTO_IP, IP_TTL,
- ttlp, sizeof (t->ttl)) < 0)
+ &ttl, sizeof (ttl)) < 0)
error (EXIT_FAILURE, errno, "setsockopt");
}
else
@@ -520,14 +520,14 @@ void
trace_inc_ttl (trace_t * t)
{
int fd;
- const unsigned char *ttlp;
+ int ttl;
assert (t);
- ttlp = &t->ttl;
+ ttl = t->ttl;
t->ttl++;
fd = (t->type == TRACE_UDP ? t->udpfd : t->icmpfd);
- if (setsockopt (fd, IPPROTO_IP, IP_TTL, ttlp, sizeof (t->ttl)) < 0)
+ if (setsockopt (fd, IPPROTO_IP, IP_TTL, &ttl, sizeof (ttl)) < 0)
error (EXIT_FAILURE, errno, "setsockopt");
}
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=3b7ce1732f80421b8e24496e9a0be538ad11462e
commit 3b7ce1732f80421b8e24496e9a0be538ad11462e
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 20:04:15 2010 +0100
inetd: Calculate socket length using sockaddr.
diff --git a/ChangeLog b/ChangeLog
index 8b30433..d0c09ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-10-31 Mats Erik Andersson <address@hidden>
+ Calculate socket length using sockaddr.
+
+ * src/inetd.c: New element `se_addrlen' in `struct servtab'.
+ (expand_enter): Record in SE_ADDRLEN the actual length of each
+ established control address.
+ (setup): Use the exact address length in call to bind(3).
+
+2010-10-31 Mats Erik Andersson <address@hidden>
+
Improve the test suite.
* tests/tftp.sh: Make it robust and portable to GNU/Linux and BSD.
diff --git a/src/inetd.c b/src/inetd.c
index 272e874..f5f7d32 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -254,6 +254,7 @@ struct servtab
sa_family_t se_family; /* address family of the socket */
char se_v4mapped; /* 1 = accept v4mapped connection, 0 = don't */
struct sockaddr_storage se_ctrladdr; /* bound address */
+ socklen_t se_addrlen; /* exact address length in use */
unsigned se_refcnt;
int se_count; /* number started since se_time */
struct timeval se_time; /* start of se_count */
@@ -585,7 +586,7 @@ setup (struct servtab *sep)
syslog (LOG_ERR, "setsockopt (SO_REUSEADDR): %m");
err = bind (sep->se_fd, (struct sockaddr *) &sep->se_ctrladdr,
- sizeof (sep->se_ctrladdr));
+ sep->se_addrlen);
if (err < 0)
{
/* If we can't bind with AF_INET6 try again with AF_INET. */
@@ -800,7 +801,9 @@ expand_enter (struct servtab *sep)
for (rp = result; rp != NULL; rp = rp->ai_next)
{
+ memset (&sep->se_ctrladdr, 0, sizeof (sep->se_ctrladdr));
memcpy (&sep->se_ctrladdr, rp->ai_addr, rp->ai_addrlen);
+ sep->se_addrlen = rp->ai_addrlen;
cp = enter (sep);
servent_setup (cp);
}
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=5b174beae521f700a886911829a6a9a11cf426bd
commit 5b174beae521f700a886911829a6a9a11cf426bd
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 19:56:53 2010 +0100
ping, tftp, traceroute: Improve the test suite.
diff --git a/ChangeLog b/ChangeLog
index 39ed0e9..8b30433 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-31 Mats Erik Andersson <address@hidden>
+
+ Improve the test suite.
+
+ * tests/tftp.sh: Make it robust and portable to GNU/Linux and BSD.
+ * tests/ping-localhost.sh: Test `ping' and `ping6'.
+ * tests/traceroute-localhost.sh: Test UDP and ICMP.
+
2010-10-31 Ludovic Courtès <address@hidden>
tftp: Resolve the "tftp" service only when no port is specified.
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index 35bf87c..f363787 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -18,6 +18,10 @@
# along with this program. If not, see `http://www.gnu.org/licenses/'.
PING=${PING:-../ping/ping$EXEEXT}
+TARGET=${TARGET:-127.0.0.1}
+
+PING6=${PING6:-../ping/ping6$EXEEXT}
+TARGET6=${TARGET6:-::1}
if [ $VERBOSE ]; then
set -x
@@ -29,6 +33,16 @@ if [ `id -u` != 0 ]; then
exit 77
fi
-$PING -c 1 127.0.0.1; errno=$?
+errno=0
+errno2=0
+
+$PING -c 1 $TARGET || errno=$?
+test $errno -eq 0 || echo "Failed at pinging $TARGET." >&2
+
+# Host might not have been built with IPv6 support..
+test -x $PING6 && $PING6 -c 1 $TARGET6 || errno2=$?
+test $errno2 -eq 0 || echo "Failed at pinging $TARGET6." >&2
+
+test $errno -eq 0 || exit $errno
-exit $errno
+exit $errno2
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 6b2dc80..64d6eb7 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -22,13 +22,15 @@
TFTP="${TFTP:-../src/tftp$EXEEXT}"
TFTPD="${TFTPD:-$PWD/../src/tftpd$EXEEXT}"
INETD="${INETD:-../src/inetd$EXEEXT}"
-IFCONFIG="${IFCONFIG:-../ifconfig/ifconfig$EXEEXT}"
+IFCONFIG="${IFCONFIG:-../ifconfig/ifconfig$EXEEXT --format=unix}"
-PORT=7777
+AF=${AF:-inet}
+PROTO=${PROTO:-udp}
+PORT=${PORT:-7777}
INETD_CONF="$PWD/inetd.conf.tmp"
-ADDRESSES="`$IFCONFIG | grep 'inet addr:' | \
- sed -e's/inet addr:\([^ ]\+\)[[:blank:]].*$/\1/g'`"
+ADDRESSES="`$IFCONFIG | sed -e "/$AF /!d" \
+ -e "s/^.*$AF[[:blank:]]\([:.0-9]\{1,\}\)[[:blank:]].*$/\1/g"`"
if [ "$VERBOSE" ]; then
set -x
@@ -37,17 +39,38 @@ if [ "$VERBOSE" ]; then
"$INETD" --version
fi
+# Check that the port is still available
+netstat -na | grep -q "^$PROTO .*$PORT "
+if test $? -eq 0; then
+ echo "Desired port $PORT/$PROTO is already in use."
+ exit 1
+fi
+
# Create `inetd.conf'. Note: We want $TFTPD to be an absolute file
# name because `inetd' chdirs to `/' in daemon mode; ditto for
# $INETD_CONF.
cat > "$INETD_CONF" <<EOF
-$PORT dgram udp wait $USER $TFTPD tftpd -l `pwd`/tftp-test
+$PORT dgram $PROTO wait $USER $TFTPD tftpd -l `pwd`/tftp-test
EOF
# Launch `inetd', assuming it's reachable at all $ADDRESSES.
-$INETD "${VERBOSE:+-d}" "$INETD_CONF" &
+$INETD -d "$INETD_CONF" &
inetd_pid="$!"
+test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
+
+# Wait somewhat for the service to settle.
+sleep 1
+
+# Did `inetd' really succeed in establishing a listener?
+netstat -na | grep "^$PROTO .*$PORT "
+if test $? -ne 0; then
+ # No it did not.
+ ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid"
+ echo "Failed in starting correct Inetd instance." >&2
+ exit 1
+fi
+
if [ -f /dev/urandom ]; then
input="/dev/urandom"
else
@@ -56,7 +79,9 @@ fi
rm -fr tftp-test tftp-test-file
mkdir tftp-test && \
- dd if="$input" of="tftp-test/tftp-test-file" bs=1024 count=170
+ dd if="$input" of="tftp-test/tftp-test-file" bs=1024 count=170 2>/dev/null
+
+echo "Looks into $ADDRESSES."
for addr in $ADDRESSES; do
echo "trying with address \`$addr'..." >&2
@@ -69,12 +94,18 @@ for addr in $ADDRESSES; do
if [ "$result" -ne 0 ]; then
# Failure.
+ test -z "$VERBOSE" || echo "Failed comparison for $addr." >&2
break
+ else
+ test -z "$VERBOSE" || echo "Successful comparison for $addr." >&2
fi
done
-kill "$inetd_pid"
++ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid"
rm -rf tftp-test tftp-test-file "$INETD_CONF"
+# Minimal clean up
+echo
+
exit $result
diff --git a/tests/traceroute-localhost.sh b/tests/traceroute-localhost.sh
index 97d13dc..3b45c46 100755
--- a/tests/traceroute-localhost.sh
+++ b/tests/traceroute-localhost.sh
@@ -18,6 +18,7 @@
# along with this program. If not, see `http://www.gnu.org/licenses/'.
TRACEROUTE=${TRACEROUTE:-../src/traceroute$EXEEXT}
+TARGET=${TARGET:-127.0.0.1}
if [ $VERBOSE ]; then
set -x
@@ -29,6 +30,15 @@ if [ `id -u` != 0 ]; then
exit 77
fi
-$TRACEROUTE 127.0.0.1; errno=$?
+errno=0
+errno2=0
-exit $errno
+$TRACEROUTE --type=udp $TARGET || errno=$?
+test $errno -eq 0 || echo "Failed at UDP tracing." >&2
+
+$TRACEROUTE --type=icmp $TARGET || errno2=$?
+test $errno2 -eq 0 || echo "Failed at ICMP tracing." >&2
+
+test $errno -eq 0 || exit $errno
+
+exit $errno2
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=cc3c8e7c7a75f7112f43660e93c3b8a0e1bb27c2
commit cc3c8e7c7a75f7112f43660e93c3b8a0e1bb27c2
Author: Alfred M. Szmidt <address@hidden>
Date: Sun Oct 31 19:46:31 2010 +0100
tftp: Resolve the "tftp" service only when no port is specified.
diff --git a/ChangeLog b/ChangeLog
index da358cb..39ed0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-31 Ludovic Courtès <address@hidden>
+
+ tftp: Resolve the "tftp" service only when no port is specified.
+
+ * src/tftp.c: Include <error.h>.
+ (port): Change from `short' to `int'.
+ (sp): Remove variable.
+ (main): Don't call `getservbyname'.
+ (setpeer): Call `getservbyname' when ARGC != 3.
+ (put, get): Refer to PORT instead of SP->s_port.
+
2010-10-27 Mats Erik Andersson <address@hidden>
Simon Josefsson <address@hidden>
diff --git a/src/tftp.c b/src/tftp.c
index 6515976..f8f5582 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -63,6 +63,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <error.h>
#include <fcntl.h>
#include <netdb.h>
#include <setjmp.h>
@@ -99,7 +100,7 @@ static int maxtimeout = 5 * TIMEOUT;
static struct sockaddr_in peeraddr; /* filled in by main */
static int f; /* the opened socket */
-static short port;
+static int port; /* Port number in network byte order of the server. */
static int trace;
static int verbose;
static int connected;
@@ -111,7 +112,6 @@ char *margv[20];
char *prompt = "tftp";
jmp_buf toplevel;
void intr (int signo);
-struct servent *sp;
void get (int, char **);
void help (int, char **);
@@ -226,12 +226,6 @@ main (int argc, char *argv[])
iu_argp_init ("tftp", default_program_authors);
argp_parse (&argp, argc, argv, 0, NULL, NULL);
- sp = getservbyname ("tftp", "udp");
- if (sp == 0)
- {
- fprintf (stderr, "tftp: udp/tftp: unknown service\n");
- exit (EXIT_FAILURE);
- }
f = socket (AF_INET, SOCK_DGRAM, 0);
if (f < 0)
{
@@ -345,9 +339,9 @@ setpeer (int argc, char *argv[])
hostname = xstrdup (argv[1]);
}
- port = sp->s_port;
if (argc == 3)
{
+ /* Take a user-specified port number. */
port = atoi (argv[2]);
if (port < 0)
{
@@ -357,6 +351,15 @@ setpeer (int argc, char *argv[])
}
port = htons (port);
}
+ else
+ {
+ /* Use the standard TFTP port. */
+ struct servent *sp;
+ sp = getservbyname ("tftp", "udp");
+ if (sp == 0)
+ error (EXIT_FAILURE, 0, "udp/tftp: unknown service\n");
+ port = sp->s_port;
+ }
connected = 1;
}
@@ -483,7 +486,7 @@ put (int argc, char *argv[])
}
if (verbose)
printf ("putting %s to %s:%s [%s]\n", cp, hostname, targ, mode);
- peeraddr.sin_port = port ? port : sp->s_port;
+ peeraddr.sin_port = port;
send_file (fd, targ, mode);
return;
}
@@ -503,7 +506,7 @@ put (int argc, char *argv[])
}
if (verbose)
printf ("putting %s to %s:%s [%s]\n", argv[n], hostname, targ, mode);
- peeraddr.sin_port = port ? port : sp->s_port;
+ peeraddr.sin_port = port;
send_file (fd, targ, mode);
}
}
@@ -568,7 +571,7 @@ get (int argc, char *argv[])
if (verbose)
printf ("getting from %s:%s to %s [%s]\n",
hostname, src, cp, mode);
- peeraddr.sin_port = port ? port : sp->s_port;
+ peeraddr.sin_port = port;
recvfile (fd, src, mode);
break;
}
@@ -582,7 +585,7 @@ get (int argc, char *argv[])
}
if (verbose)
printf ("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode);
- peeraddr.sin_port = port ? port : sp->s_port;
+ peeraddr.sin_port = port;
recvfile (fd, src, mode);
}
}
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=8698a66345bff08d1e0929703b7fd42a89e20460
commit 8698a66345bff08d1e0929703b7fd42a89e20460
Author: Alfred M. Szmidt <address@hidden>
Date: Sat Oct 23 14:15:22 2010 +0200
Updated. (silent change)
diff --git a/README b/README
index ffafd99..5558317 100644
--- a/README
+++ b/README
@@ -1,29 +1,10 @@
-GNU Inetutils
+GNU inetutils - The GNU Network Utilities
This is a distribution of common networking utilities and servers.
-They are currently mostly from the 4.4BSD-Lite2 distribution, with
-some changes to make them compatible with the GNU Hurd (in particular,
-the Hurd does not define some arbitrary limits, such as MAXPATHLEN),
-and to make them more portable, using autoconf. A GNU build
-environment has also been added.
-
-The GNU whois client reads a whois-servers file to figure out which
-whois server to use. It won't always pick the best server;
-whois.internic.net seems to know something about nic.ddn.mil, but the
-GNU whois client will use nic.ddn.mil to look up nic.ddn.mil if you
-use the configuration file we supply. Our configuration file probably
-also does not have a complete list of whois servers; feel free to send
-information about additional whois servers to the bug reporting
-address.
-
-There are probably many BSD dependencies remaining, but inetutils is
-believed to work on the following system types (and others may work):
-
- i486-pc-gnu
- i486-pc-linux-gnu
- m68k-hp-netbsd1.2
- sparc-sun-netbsd1.2
+The individual utilities were originally derived from the 4.4BSDLite2
+distribution. Many features were integrated from NetBSD, OpenBSD,
+FreeBSD and GNU/Linux
The file `paths' contains a list of all paths used by programs in this
distribution, and rules to find values for them. To change a path
@@ -39,6 +20,15 @@ if you explicitly specify whether to build a program, that
will
override the values specified by --disable-clients or
--disable-servers.
+The GNU whois client reads a whois-servers file to figure out which
+whois server to use. It won't always pick the best server;
+whois.internic.net seems to know something about nic.ddn.mil, but the
+GNU whois client will use nic.ddn.mil to look up nic.ddn.mil if you
+use the configuration file we supply. Our configuration file probably
+also does not have a complete list of whois servers; feel free to send
+information about additional whois servers to the bug reporting
+address.
+
Notes:
1) All of the r* commands clients, rcp, rlogin, rsh, need to be
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=08866d9632061cea2e56616497df6aa7f88ccf6a
commit 08866d9632061cea2e56616497df6aa7f88ccf6a
Author: Alfred M. Szmidt <address@hidden>
Date: Wed Oct 20 00:01:00 2010 +0200
Updated. (silent change)
diff --git a/README-alpha b/README-alpha
index 3c227d0..039129a 100644
--- a/README-alpha
+++ b/README-alpha
@@ -116,6 +116,7 @@ When doing a stable release, do not forget to:
- record the release date in NEWS
- create a tag (inetutils-N_M)
- post an announcment to address@hidden
+ - update web manual and coverage testing
** Announcement template
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 2 +
ChangeLog | 63 +++++++++++++++++++++++++++++++++++++++++
Makefile.am | 6 ++++
README | 36 ++++++++---------------
README-alpha | 1 +
bootstrap.conf | 2 +-
configure.ac | 2 +-
libinetutils/cleansess.c | 3 ++
libinetutils/utmp_init.c | 12 ++++++-
libinetutils/utmp_logout.c | 8 ++++-
src/inetd.c | 5 ++-
src/tftp.c | 29 ++++++++++--------
src/traceroute.c | 16 +++++-----
tests/ping-localhost.sh | 18 ++++++++++-
tests/tftp.sh | 47 +++++++++++++++++++++++++-----
tests/traceroute-localhost.sh | 14 ++++++++-
16 files changed, 202 insertions(+), 62 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-62-g82220c2,
Alfred M. Szmidt <=