Your message dated Thu, 05 Dec 2013 10:20:09 +0000
with message-id <[email protected]>
and subject line Bug#731279: fixed in tinc 1.0.23-2
has caused the Debian Bug report #731279,
regarding tinc: bashism in scripts cause failure with default setup
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 [email protected]
immediately.)
--
731279: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731279
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tinc
Version: 1.0.19-3
Severity: important
I discovered this when trying to configure tinc for the first time,
adding setup in /etc/network/interfaces. Running 'ifup vpn' would
fail, and for no apparent reason. Adding 'set -x' to
/etc/network/if-pre-up.d/tinc did not make me any wiser, as it would
seem to exit on the ". /etc/default/tinc" line, which did not make
sense.
But it seem to me this script trigger either a misfeature or a bug in
dash or is depending on bash specific behaviour. Changing it to use
/bin/bash instead of /bin/sh solve the problem.
The problem is that including with dot (.) a script with only comments
causes the return code of the include statement to become the return
code of the previous command. This is how the script is question
starts:
#!/bin/sh
set -e
[ -z "$IF_TINC_NET" ] && exit 0
# Read options from /etc/default
. /etc/default/tinc
[...]
The [ -z "$IF_TINC_NET" ] test return false in my case, and
". /etc/default/tinc" return false too and the script exits because of
this content:
# Extra options to be passed to tincd.
# EXTRA="-d"
Here is an example demonstrating the problem:
pere@minerva:~/tmp$ cat testscript
#!/bin/sh
set -e
false && echo true
. ./testinclude
echo done
pere@minerva:~/tmp$ ls -l testscript
-rwxr-xr-x 1 pere pere 64 des. 3 23:09 testscript
pere@minerva:~/tmp$ cat testinclude
# foo
pere@minerva:~/tmp$ ./testscript
pere@minerva:~/tmp$ bash testscript
done
pere@minerva:~/tmp$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 mars 1 2012 /bin/sh -> dash
pere@minerva:~/tmp$
Notice how the testscript program do not print 'done' when dash is
used.
I recommend changing the scripts to use /bin/bash instead of /bin/sh,
and perhaps ask the dash developers to look into what is going on
here. I did, and the script started working.
--
Happy hacking
Petter reinholdtsen
--- End Message ---
--- Begin Message ---
Source: tinc
Source-Version: 1.0.23-2
We believe that the bug you reported is fixed in the latest version of
tinc, which is due to be installed in the Debian FTP archive.
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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Guus Sliepen <[email protected]> (supplier of updated tinc 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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Thu, 05 Dec 2013 09:41:13 +0000
Source: tinc
Binary: tinc
Architecture: source amd64
Version: 1.0.23-2
Distribution: unstable
Urgency: low
Maintainer: Guus Sliepen <[email protected]>
Changed-By: Guus Sliepen <[email protected]>
Description:
tinc - Virtual Private Network daemon
Closes: 731279
Changes:
tinc (1.0.23-2) unstable; urgency=low
.
* Use if-statements instead of && in shell scripts. Closes: #731279
The && operator does not clear the error status, and if the next statement
in a shell script does not change the error status it would cause the
script to prematurely exit. Thanks to Peter Reinholdtsen for spotting it.
* Use absolute path to tincd in the if-post-down script.
Checksums-Sha1:
8cd62d993de8c65a72077ebd2c13579694a0ba2f 1092 tinc_1.0.23-2.dsc
48a6be2a99de14d158b2dbb23650581bb12a382d 9391 tinc_1.0.23-2.debian.tar.gz
a6bbfde7756c0815f30f566cb0d2c2d1b91e9c36 192638 tinc_1.0.23-2_amd64.deb
Checksums-Sha256:
f9a7ded046fd9089ef8f01ec2733dfa9e54b387a402ac48156ee65d47d715389 1092
tinc_1.0.23-2.dsc
c2fb6e16e405e631e58750260aae29ab109b09bf3af8093890b1ea04e74851b1 9391
tinc_1.0.23-2.debian.tar.gz
676225e95fd226290a264baa860fc7561d7b9ab57cac352d83c5e2e97bf2906c 192638
tinc_1.0.23-2_amd64.deb
Files:
f2f7086fa11289e6b2ce2bc9dd1b4191 1092 net optional tinc_1.0.23-2.dsc
8c31fbac8b99154d3438b1496a7b37b9 9391 net optional tinc_1.0.23-2.debian.tar.gz
7a4e48c3356babfb70b14621992ca1f9 192638 net optional tinc_1.0.23-2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iEYEARECAAYFAlKgT54ACgkQAxLow12M2nu9hgCgsMANSMY68EQnlX6WoESR58to
THMAoKRFwC8S8PaFEk20YpiJTXVx00J2
=P/A/
-----END PGP SIGNATURE-----
--- End Message ---