Skip to content

client/confmodule.in: Ensure that IFS is properly set (Closes: #1040216)

Gioele Barabucci requested to merge gioele/cdebconf:confmodule-fix-ifs into master

Setting IFS using a command-local variable assignments does not work for printf because "$*" is expanded using the value of IFS from the current environment, not from the environment of the command.

For example

dash -c 'IFS="."; set -- a b c; IFS=" " printf "%s\n" "$*"'

outputs "a.b.c" instead of the expected "a b c".

To get the correct behaviour, IFS must be set before "$*" is used.

Using the IFS-handling code from debconf's confmodule fixes this issue.

Merge request reports

Loading