Package: putty-tools
Version: 0.75-3
Severity: normal
File: /usr/bin/psusan
psusan(1) suggests this:
And the setup script uml-psusan.sh might look like this:
#!/bin/bash
# Set up vital pseudo-filesystems
mount -t proc none /proc
mount -t devpts none /dev/pts
# Redirect I/O to the serial port, but stderr to the console
exec 0<>/dev/ttyS0 1>&0 2>/dev/console
# Set the serial port into raw mode, to run a binary protocol
stty raw -echo
# Choose what shell you want to run inside psusan
export SHELL=/bin/bash
# And now run psusan over the serial port
exec /home/simon/src/putty/misc/psusan
This sets SHELL. It does not set PATH. Due to #991959, the PATH
ends up set to
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
ie with cwd at the end. This is quite undesirable.
I think it would be best to change the example to explicitly set PATH
to avoid this bug. CCing upstream since even when bash is fixed in
Debian sid, the upstream manpage probably wants to have this
workaround indefinitely.
(I am using psusan from a .deb I built myself from the sid sources, so
the version number in this bug report ought really to refer to
src:putty but that seems more confusing than helpful.)
Thanks,
Ian.
-- System Information:
Debian Release: 10.10
APT prefers stable-debug
APT policy: (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf
Kernel: Linux 5.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled
Versions of packages putty-tools depends on:
ii libc6 2.28-10
putty-tools recommends no packages.
Versions of packages putty-tools suggests:
ii putty-doc 0.75-3
-- no debconf information