[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] ‘ifconfig --help’ segfaults
From: |
Ludovic Courtès |
Subject: |
Re: [bug-inetutils] ‘ifconfig --help’ segfaults |
Date: |
Wed, 10 Mar 2010 16:06:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hello,
Thanks for applying the patch.
There’s now another problem when building the tarball on Hydra:
--8<---------------cut here---------------start------------->8---
/bin/sh
/tmp/nix-build-azr614s9zgssh74ifxwrx930v4gqxd8k-inetutils-tarball-0pre8cc0838af5cb8b8c160a8d442d2a39056340be67.drv-0/git-export/build-aux/missing
--run help2man \
--source='GNU inetutils 1.7.90' \
--include=./ftp.h2m \
--output=ftp.1 \
--section 1 \
`echo ../ftp/ftp | sed s,../ping6/ping6,../ping/ping6, | sed
s,../hostname/hostname,../src/hostname, | sed s,../inetd/inetd,../src/inetd, |
sed s,../logger/logger,../src/logger, | sed s,../rcp/rcp,../src/rcp, | sed
s,../rexec/rexec,../src/rexec, | sed s,../rexecd/rexecd,../src/rexecd, | sed
s,../rlogin/rlogin,../src/rlogin, | sed s,../rlogind/rlogind,../src/rlogind, |
sed s,../rsh/rsh,../src/rsh, | sed s,../rshd/rshd,../src/rshd, | sed
s,../syslogd/syslogd,../src/syslogd, | sed s,../tftp/tftp,../src/tftp, | sed
s,../tftpd/tftpd,../src/tftpd, | sed
s,../traceroute/traceroute,../src/traceroute, | sed
s,../uucpd/uucpd,../src/uucpd,`
help2man: can't get `--help' info from ../ftp/ftp
make[3]: *** [man] Error 1
--8<---------------cut here---------------end--------------->8---
This stems from the fact that builds are run in a chroot lacking
/etc/services. The ‘ftp’ program bails out before parsing its arguments
because it can’t find the ‘ftp’ service. The patch below fixes it.
2010-03-10 Ludovic Courtès <address@hidden> (tiny change)
* ftp/main.c (main): Call getservbyname(3) after arguments have
been parsed.
diff --git a/ftp/main.c b/ftp/main.c
index b01bc22..b05fc1e 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -175,10 +175,7 @@ main (int argc, char *argv[])
char *cp;
set_program_name (argv[0]);
-
- sp = getservbyname ("ftp", "tcp");
- if (sp == 0)
- error (EXIT_FAILURE, 0, "ftp/tcp: unknown service");
+
doglob = 1;
interactive = 1;
autologin = 1;
@@ -191,6 +188,10 @@ main (int argc, char *argv[])
argc -= index;
argv += index;
+ sp = getservbyname ("ftp", "tcp");
+ if (sp == 0)
+ error (EXIT_FAILURE, 0, "ftp/tcp: unknown service");
+
fromatty = isatty (fileno (stdin));
if (fromatty)
{
Thanks,
Ludo’.
pgpmY3GpGX9BH.pgp
Description: PGP signature
- [bug-inetutils] ‘ifconfig --help’ segfaults, Ludovic Courtès, 2010/03/09
- Re: [bug-inetutils] ‘ifconfig --help’ segfaults, Alfred M. Szmidt, 2010/03/09
- Re: [bug-inetutils] ‘ifconfig --help’ segfaults, Ludovic Courtès, 2010/03/09
- Re: [bug-inetutils] =?utf-8?Q?=E2=80=9 8ifconfig_--help=E2=80=99?= segfaults, Sergey Poznyakoff, 2010/03/10
- Re: [bug-inetutils] ‘ifconfig --help’ segfaults,
Ludovic Courtès <=
- [bug-inetutils] Re: ‘ifconfig --help’ segfaults, Ludovic Courtès, 2010/03/14
- Re: [bug-inetutils] Re: ‘ifconfig --help ’ segfaults, Giuseppe Scrivano, 2010/03/14
- Re: [bug-inetutils] Re: ‘ifconfig --help ’ segfaults, Ludovic Courtès, 2010/03/14
- Re: [bug-inetutils] Re: ‘ifconfig --help ’ segfaults, Giuseppe Scrivano, 2010/03/14
- Re: [bug-inetutils] Re: ‘ifconfig --help ’ segfaults, Ludovic Courtès, 2010/03/15
- [bug-inetutils] Re: ‘ifconfig --help’ segfaults, Simon Josefsson, 2010/03/15
- [bug-inetutils] Re: ‘ifconfig --help’ segfaults, Simon Josefsson, 2010/03/15
- [bug-inetutils] ‘pty’ module fails on FreeBSD 7.2, Ludovic Courtès, 2010/03/16
- [bug-inetutils] Re: ‘pty’ module fails on FreeBSD 7.2, Ralf Wildenhues, 2010/03/19
- [bug-inetutils] Re: ‘pty’ module fails on FreeBSD 7.2, Ludovic Courtès, 2010/03/17