Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

rpi-build doesn't return error when invalid SHIP address given #5

@pietrushnic

Description

@pietrushnic

There is no input validation on IP address:

[0:34:06] pietrushnic:tmp $ rpi-build use\[stdlib\] rpi_linux install SSHIP=192.168.1.255
Workdir: /home/pietrushnic/tmp/workdir
(in /home/pietrushnic/rpi-build/stdlib)
Release: rpi_linux
Package: rpi_linux_common
Package: issue106
Package: raspberrypi_tools
Package: raspberrypi_firmware
Package: vcboot
Package: raspberrypi_linux
cd /home/pietrushnic/tmp/workdir/out; tar -zcf /home/pietrushnic/tmp/workdir/archive.tar.gz *
Target 'archive' done

sshpass -e ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no  pi@192.168.1.255 "rm -rf rpi-build-archive; mkdir rpi-build-archive"
cat /home/pietrushnic/tmp/workdir/archive.tar.gz | sshpass -e ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no  pi@192.168.1.255 "cd rpi-build-archive; tar zxvf -"
Target 'transfer' done

sshpass -e ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no  pi@192.168.1.255 "stat --printf=%Y /usr/bin/rpi-update"
Update rpi-update to ensure FW_REPOLOCAL support:
sshpass -e ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no  pi@192.168.1.255 "sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update"
sshpass -e ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no  pi@192.168.1.255 "sudo UPDATE_SELF=0 SKIP_BACKUP=1 SKIP_REPODELETE=0 SKIP_DOWNLOAD=1 FW_REPOLOCAL=rpi-build-archive rpi-update '2014-10-02 00:35:57 +0200' 1>&2"
Target 'install' done

Same situation for valid address but without working ssh service on target. This introduce confusion when you installed kernel on RPi and it breaks IP connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions