Package: courier-authdaemon
Version: 0.66.4-5
Severity: grave

The /etc/init.d/courier-authdaemon script hangs on any use.

It contains the suspicious I/O loop:

    if [ -r "$TMPFILES" ]; then
        while read type path mode user group; do
            if [ "$type" = "d" ]; then
                mkdir -p "$path"
                chmod "$mode" "$path"
                chown "$user:$group" "$path"
                [ -x /sbin/restorecon ] && /sbin/restorecon $path
            fi
        done
    fi

which is attempting to read from stdio. But does not prompt the user
about what is expected to be typed in.


Looking at the file represented by $TMPFILES it appears that file is
supposed to be piped to the "while read" instead of waiting for user
input. This alteration makes the script finish and the package install
runs to completion;

    if [ -r "$TMPFILES" ]; then
        cat $TMPFILES | while read type path mode user group; do
            if [ "$type" = "d" ]; then
                mkdir -p "$path"
                chmod "$mode" "$path"
                chown "$user:$group" "$path"
                [ -x /sbin/restorecon ] && /sbin/restorecon $path
            fi
        done
    fi


Though I am not sure if the resulting installation is correct yet as
there are other issues somewhere preventing the init.d scripts from
actually doing anything.

"start" command appears to start daemons running. But "stop" command
does nothing despite reporting "[ok] success".

Amos

Reply via email to