[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#560125: marked as done (freebsd-utils: Insufficient quoting in init.d script)



Your message dated Mon, 14 Dec 2009 21:49:58 +0000
with message-id <E1NKInm-0006ea-UG@ries.debian.org>
and subject line Bug#560125: fixed in freebsd-utils 8.0-2
has caused the Debian Bug report #560125,
regarding freebsd-utils: Insufficient quoting in init.d script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
560125: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560125
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: freebsd-utils
Version: 8.0-1
Severity: important
Tags: patch

Hi,

while debugging some stuff, I stumbled upon this:
| /etc/init.d/freebsd-utils: line 88: [: !=: unary operator expected

Indeed, the $(readlink …) part isn't quoted so if it returns nothing,
the test operates on “ != "/proc/mounts"” with a missing argument. That
may happen during debootstrapping.

Please find attached a trivial patch against glibc-bsd's trunk to fix
that.

[ As a side note: One may wonder, but even though the script is “set
-e”, later instructions are executed anyway (I was interested in such
operations). ]

As another (more interesting) side-note, that can break (I guess)
depending on the partitioning(?):
| + ln -f /proc/mounts /etc/mtab
| ln: creating hard link `/etc/mtab' => `/proc/mounts': Invalid cross-device link

I guess another bugreport about that is in order.

Mraw,
KiBi.
>From add2852d086fdfd78d55d5fecefcc99755d9b94f Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Wed, 9 Dec 2009 06:09:49 +0100
Subject: [PATCH] Fix quoting in init script.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

$(readlink …) may return an empty string, resulting in a missing
parameter.
---
 freebsd-utils/debian/freebsd-utils.init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/freebsd-utils/debian/freebsd-utils.init b/freebsd-utils/debian/freebsd-utils.init
index 4924bb0..07ab0cf 100644
--- a/freebsd-utils/debian/freebsd-utils.init
+++ b/freebsd-utils/debian/freebsd-utils.init
@@ -85,7 +85,7 @@ case "$1" in
     
     echo "done."
    
-    if [ $(readlink /etc/mtab) != "/proc/mounts" ] ; then
+    if [ "$(readlink /etc/mtab)" != "/proc/mounts" ] ; then
       echo "Warning: replacing /etc/mtab by a symlink to /proc/mounts."
       rm -f /etc/mtab
       ln -f /proc/mounts /etc/mtab
-- 
1.6.5.4


--- End Message ---
--- Begin Message ---
Source: freebsd-utils
Source-Version: 8.0-2

We believe that the bug you reported is fixed in the latest version of
freebsd-utils, which is due to be installed in the Debian FTP archive:

freebsd-net-tools_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/freebsd-net-tools_8.0-2_kfreebsd-i386.deb
freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
  to main/f/freebsd-utils/freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
freebsd-utils_8.0-2.diff.gz
  to main/f/freebsd-utils/freebsd-utils_8.0-2.diff.gz
freebsd-utils_8.0-2.dsc
  to main/f/freebsd-utils/freebsd-utils_8.0-2.dsc
freebsd-utils_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/freebsd-utils_8.0-2_kfreebsd-i386.deb
kbdcontrol_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/kbdcontrol_8.0-2_kfreebsd-i386.deb
kldutils-udeb_8.0-2_kfreebsd-i386.udeb
  to main/f/freebsd-utils/kldutils-udeb_8.0-2_kfreebsd-i386.udeb
kldutils_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/kldutils_8.0-2_kfreebsd-i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 560125@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated freebsd-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 14 Dec 2009 20:53:21 +0100
Source: freebsd-utils
Binary: freebsd-utils freebsd-utils-udeb kldutils kldutils-udeb kbdcontrol freebsd-net-tools
Architecture: source kfreebsd-i386
Version: 8.0-2
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description: 
 freebsd-net-tools - FreeBSD networking tools
 freebsd-utils - FreeBSD utilities needed for GNU/kFreeBSD
 freebsd-utils-udeb - FreeBSD utilities needed for GNU/kFreeBSD (udeb)
 kbdcontrol - command-line tool to change keyboard layout on GNU/kFreeBSD
 kldutils   - tools for managing kFreeBSD modules
 kldutils-udeb - tools for managing kFreeBSD modules (udeb)
Closes: 559344 560125
Changes: 
 freebsd-utils (8.0-2) unstable; urgency=low
 .
   * freebsd-utils.init: fix quoting, and use a symbolic links instead
     of an hardlink (closes: #560125).
   * freebsd-utils: conflicts with module-init-tools (closes: #559344).
Checksums-Sha1: 
 1bf9e96dd44fd5c264c0ef366e7abbe74c78b94f 1576 freebsd-utils_8.0-2.dsc
 77818974546dfc0469fa6778457b44bdfa454f2e 53476 freebsd-utils_8.0-2.diff.gz
 5b5197b79e76ec0f3bec51a997e29c7a606b0bb8 136726 freebsd-utils_8.0-2_kfreebsd-i386.deb
 52a800faabb1eadfaf81e0dd2864375f0d8a5f92 11550 freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 294a8f5ac295e676ab72c53c94a1c8ea96d4d539 32980 kldutils_8.0-2_kfreebsd-i386.deb
 b2e4b36cea827b3bb80b25ca6676195f4317bfa5 6446 kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 4f13e1f568125278d4fa22de9ad1f40043bb1787 104296 kbdcontrol_8.0-2_kfreebsd-i386.deb
 e1b60574b348a2fe272df07c5eb86609c81c5d62 299030 freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Checksums-Sha256: 
 6f13002615607c89b43a9bd023ec4ac59534e239c8cef6b240583afc002eb3a6 1576 freebsd-utils_8.0-2.dsc
 ff0a3a2f44c4c8eb6c30c197c1515dd14df09957ad07a782e0b1b485aea7e184 53476 freebsd-utils_8.0-2.diff.gz
 ecde3670f1437faad28412a40d3c93fd6e8c3b2aaee40771eacfe5593f3c2b39 136726 freebsd-utils_8.0-2_kfreebsd-i386.deb
 2612f9bec3bd56186e2812096281e844b67bb96ea992dc5d01fbe5e5288eba57 11550 freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 0f30c28482dbdee80b84083701501f02e7c79dad2265f357bfa86a4501899a74 32980 kldutils_8.0-2_kfreebsd-i386.deb
 2be523ef84474bac2e050fd2eb688b4009ad6047b9b70e59faf0cc2e604fe75b 6446 kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 c6d39e7b4826b82e7884add7283faca951b775727fcc43ee4d0bd2198a7d4525 104296 kbdcontrol_8.0-2_kfreebsd-i386.deb
 0e787a7279e6f17d987db844a367942b5eb2372cc14943095e4e4613b6d996cb 299030 freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Files: 
 e9484ba134e555af188bebe10249d9e1 1576 utils important freebsd-utils_8.0-2.dsc
 e032ba8545b16494dd040d20092d476f 53476 utils important freebsd-utils_8.0-2.diff.gz
 d519509fea64a3484990bcbb4bccd5c4 136726 utils required freebsd-utils_8.0-2_kfreebsd-i386.deb
 ba3d015db4ed29392a688afb149a9d3b 11550 debian-installer optional freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 d9b23ce5c46e4f035ba7b341b0f6bad1 32980 utils important kldutils_8.0-2_kfreebsd-i386.deb
 8d3d2cb4fb46d36cf6ab1654b15afa51 6446 debian-installer optional kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 70e5e86a97de8061a3643a438d935ac5 104296 utils important kbdcontrol_8.0-2_kfreebsd-i386.deb
 37bd1bab4a0020b7c40096a69928f04d 299030 net important freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/kFreeBSD)

iD8DBQFLJpiBw3ao2vG823MRAkWXAJsEaSLA7yCzA8a+rd0eyHSoUF+KowCdFwE9
SCuoxOH6VZw3WyJXPa8Lh8Y=
=DAmD
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: