atftpd postinst should pass udp to update-inetd (not udp4)

Bug #993101 reported by Sergey V. Gershovich
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
atftp (Debian)
Fix Released
Unknown
atftp (Ubuntu)
Fix Released
Undecided
Unassigned
rlinetd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

ATFTD does not install correctly.

Install log:
--
# aptitude install atftpd
Следующие НОВЫЕ пакеты будут установлены:
  atftpd libfile-copy-recursive-perl{a} rlinetd{a} update-inetd{a}
0 пакетов обновлено, 4 установлено новых, 0 пакетов отмечено для удаления, и 0 пакетов не обновлено.
Необходимо получить 0 Б/190 kБ архивов. После распаковки 802 kБ будет занято.
Хотите продолжить? [Y/n/?]
Предварительная настройка пакетов ...
Выбор ранее не выбранного пакета libfile-copy-recursive-perl.
(Чтение базы данных ... на данный момент установлено 127338 файлов и каталогов.)
Распаковывается пакет libfile-copy-recursive-perl (из файла .../libfile-copy-recursive-perl_0.38-1_all.deb)...
Выбор ранее не выбранного пакета update-inetd.
Распаковывается пакет update-inetd (из файла .../update-inetd_4.41_all.deb)...
Выбор ранее не выбранного пакета atftpd.
Распаковывается пакет atftpd (из файла .../atftpd_0.7.dfsg-11_i386.deb)...
Выбор ранее не выбранного пакета rlinetd.
Распаковывается пакет rlinetd (из файла .../rlinetd_0.8-1_i386.deb)...
Обрабатываются триггеры для man-db ...
Обрабатываются триггеры для ureadahead ...
Настраивается пакет libfile-copy-recursive-perl (0.38-1) ...
Настраивается пакет update-inetd (4.41) ...
Настраивается пакет atftpd (0.7.dfsg-11) ...

unknown protocol: udp4
; skipping service tftp

Настраивается пакет rlinetd (0.8-1) ...

 * Starting internet superserver rlinetd
---
# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: atftpd 0.7.dfsg-11
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Wed May 2 12:04:03 2012
InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Release i386 (20120423)
ProcEnviron:
 TERM=xterm
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: atftp
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sergey V. Gershovich (sir-jazzy) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in atftp (Ubuntu):
status: New → Confirmed
Revision history for this message
urusha (urusha) wrote :

This is actually not an atftpd problem, but a problem in rlinetd package (which is being installed with atftpd as inet-superserver daemon by default). rlinetd doesn't support "udp4" as protocol. Attached patch (applied to inetd2rlinetd) strips protocol number from those having it. And additionally fixes error string about wrong protocols.

affects: atftp (Ubuntu) → rlinetd (Ubuntu)
Revision history for this message
urusha (urusha) wrote :

Here is the new patch. Now it respects protocol family (udp4/6, tcp4/6) if such is given.

Revision history for this message
urusha (urusha) wrote :

Also, seems that aftpd supports ipv6 from 0.7.dfsg-9.1 (see changelog.Debian.gz), and now "upd4" should be changed to "udp" in atftpd's postinst script.
So, I'll set atftpd as affected again.

Changed in atftp (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "inetd2rlinetd patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Richard Hansen (rhansen) wrote :

Attached are two debdiffs, one for atftp and one for rlinetd. Both are based on urusha's patches.

I've uploaded the packages to my PPA: https://launchpad.net/~a7x/+archive/bug993101

They should be done building in a few hours. To install:

    sudo apt-add-repository ppa:a7x/bug993101
    sudo apt-get update
    sudo apt-get upgrade

Revision history for this message
urusha (urusha) wrote :

Tried ppa versions. Atftpd seems to work fine. But there is a problem with rlinetd:

rlinetd crashes (amd64) when I try to make tftp connection (tftp 127.0.0.1 -c get pxelinux.0). "rlinetd -d" output is in attachment. This must be a new upstream version bug or something, because previous version works fine with the same configs (and the current issue is related to inetd2rlinetd only).

Revision history for this message
Richard Hansen (rhansen) wrote :

@urusha: Do you get the crash if you use an unmodified rlinetd-0.8.2-1?

Revision history for this message
Richard Hansen (rhansen) wrote :

(For those that are curious, the reason I patched the Quantal version of rlinetd instead of the Precise version is because Ubuntu's policy is to fix the bug in the latest development version first, then backport the fix to stable releases. See <https://wiki.ubuntu.com/StableReleaseUpdates>.)

Revision history for this message
Richard Hansen (rhansen) wrote :

I'm getting the crash in both the unmodified and patched version of rlinetd-0.8.2-1. A workaround is to simply revert to the official Precise version of rlinetd (since atftpd has been patched to use udp instead of udp4).

@urusha: Would you mind filing a new bug for that crash?

Revision history for this message
urusha (urusha) wrote :

I'll fill a new bug for that crash. But what about rlinetd fix for precise? There can be another packages that use special protocol family, so atftpd patch is just a workaround (fortunately adding new functionality) , but not a real fix. Is there any way to fix it in precise?

Thank you.

Revision history for this message
Richard Hansen (rhansen) wrote :

> But what about rlinetd fix for precise?

I think it'd be best to file a new bug report about rlinetd's inability to handle (udp|tcp)(4|6) and let this ticket be only about changing atftpd's postinst from udp4 to udp.

> Is there any way to fix it in precise?

Yes, but it will have to go through the SRU process, which means getting it working in the development version first (which means fixing the crash).

Since both atftpd and rlinetd were copied directly from Debian, it's probably best to file bug reports with Debian in addition to the Ubuntu bug reports.
http://www.debian.org/Bugs/Reporting

Revision history for this message
urusha (urusha) wrote :

I see. Here is the report about the crash, please, confirm it: https://bugs.launchpad.net/ubuntu/+source/rlinetd/+bug/1057645
Protocol family handling report will follow. Debian's reports may too (I've already written to maintainer about the protocol family issue, still haven't got any answer).

Revision history for this message
Richard Hansen (rhansen) wrote :

In other words, there are three distinct bugs here:

  * (this bug) atftpd's postinst script should use udp instead of udp4 for two reasons: (1) atftpd supports IPv6, and (2) rlinetd doesn't understand udp4
  * rlinetd-0.8.2-1 crashes (at least with atftpd)
  * rlinetd doesn't understand (udp|tcp)(4|6)

Revision history for this message
urusha (urusha) wrote :

Well, here is the report about protocol family: https://bugs.launchpad.net/ubuntu/+source/rlinetd/+bug/1057663
Please, confirm it and add your debdiff there.
Thank you.

Revision history for this message
Richard Hansen (rhansen) wrote :

I can't access bug #1057645. I'm guessing that bug is marked as private due to the presence of a core dump (which could theoretically contain sensitive information such as IP addresses, passwords, data file contents, etc.).

Revision history for this message
urusha (urusha) wrote :

Now it's public and you can access it.

Revision history for this message
Richard Hansen (rhansen) wrote :

@urusha: Thank you for filing the bugs!

I moved the rlinetd package from ppa:a7x/bug993101 to ppa:a7x/bug1057663 (<https://launchpad.net/~a7x/+archive/bug1057663>).

Changed in atftp (Debian):
status: Unknown → New
Revision history for this message
Richard Hansen (rhansen) wrote :

I am attaching 3 new debdiffs: one for precise, one for quantal, and one for raring.

Revision history for this message
Richard Hansen (rhansen) wrote :
Revision history for this message
Richard Hansen (rhansen) wrote :

All three of these have been uploaded to my PPA (<https://launchpad.net/~a7x/+archive/bug993101>). To install:

    sudo apt-add-repository ppa:a7x/bug993101
    sudo apt-get update
    sudo apt-get upgrade

Revision history for this message
Robert Luberda (robert-debian) wrote :

This bug does not affects rlinetd any longer. rlientd 0.8.2-2 fixes #1057663 which is a duplicate of rlinetd's part of this report.

Richard Hansen (rhansen)
Changed in rlinetd (Ubuntu):
status: Confirmed → Invalid
summary: - atftpd does not install correctly
+ atftpd fails to install -- update-inetd doesn't like udp4
summary: - atftpd fails to install -- update-inetd doesn't like udp4
+ atftpd postinst should pass udp to update-inetd (not udp4)
Revision history for this message
Richard Hansen (rhansen) wrote :

Still a problem in saucy (and trusty). I uploaded a saucy build to my PPA (<https://launchpad.net/~a7x/+archive/bug993101>).

tags: added: quantal raring saucy
Changed in atftp (Debian):
status: New → Fix Released
Richard Hansen (rhansen)
Changed in atftp (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.