[Pkg-samba-maint] Bug#486056: smbclient: bashism in /bin/sh script

Adam D. Barratt adam at adam-barratt.org.uk
Fri Jun 13 08:52:10 UTC 2008


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".

Regards,

Adam





More information about the Pkg-samba-maint mailing list