[Pkg-samba-maint] Bug#486056: smbclient: bashism in /bin/sh script
Raphael Geissert
atomo64 at gmail.com
Sun Jun 15 03:14:04 UTC 2008
Note, as Christian Perrier correctly stated, because I am MBF I can't review
every single situation. I only check for duplicate reports and false
positives.
On Friday 13 June 2008, Adam D. Barratt wrote:
> On Thu, 2008-06-12 at 23:18 -0700, Steve Langasek wrote:
> [...]
>
> > On Fri, Jun 13, 2008 at 12:08:27AM -0500, Raphael Geissert wrote:
>
> [...]
>
> > > checkbashisms' output:
> > > > possible bashism in ./usr/bin/smbtar line 154 (unsafe echo with
> > > > backslash): echo "share is $service\\$cdcmd"
>
> [...]
>
> > I don't suppose you have a better fix for this than changing the
> > interpreter to /bin/bash? I'm happy to apply a patch.
>
> Looking at the source, replacing the echo with a printf would suffice.
>
> Given that the parameters are simply being echoed, a simple
> s/echo/printf/ should be safe enough; for the sake of robustness 'printf
> "share is %s\\%s" "$service" "$cdcmd"' would be "better".
As I recently stated in #486059, it is even better to use single quotes.
And btw, a \n is missing on that line ;)
>
> Regards,
>
> Adam
Regards,
--
Atomo64 - Raphael
Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20080614/2da99e5b/attachment.pgp
More information about the Pkg-samba-maint
mailing list