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

Bug#1040216: cdebconf: confmodule: Erranous behaviour if IFS does not start with a space during db_*



Package: cdebconf
Version: 0.270
Tags: patch

Dear cdebconf maintainers,

in confmodule, the command arguments are passed to cdebconf via

IFS=' ' printf "%s\n" "$*"

That command-local assignment of IFS affects the way printf works, but not the way in which "$*" is expanded by the shell: "$*" will be still expanded using the IFS of the calling shell.

Example of this fault behavior:

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

This means that any db_foo command will fail if the calling shell's IFS does not start with a space, e.g. `IFS=$'\n'; while read foo; do ... do_foo ...; done`.

A patch to fix this this issue is available at https://salsa.debian.org/installer-team/cdebconf/-/merge_requests/20

(extracted from https://salsa.debian.org/installer-team/cdebconf/-/merge_requests/19)

Regards,

--
Gioele Barabucci


Reply to: