You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This assumes that a full path is not given and expects a binary name from the $PREFIX/bin directory.
Or if abused a relative path starting from that directory but I would assume that to break later on.
I would recommend to check if $1 contains slashes or not.
I would expect chsh -s "$(command -v bash)" to work as it does on other systems but here it results in the shell executable file path /data/data/com.termux/files/usr/bin//data/data/com.termux/files/usr/bin/bash which errors the executability check.
The text was updated successfully, but these errors were encountered:
https://github.com/termux/termux-tools/blob/master/scripts/chsh.in#L16
Line 16
NEW_SHELL=@TERMUX_PREFIX@/bin/$1
This assumes that a full path is not given and expects a binary name from the
$PREFIX/bin
directory.Or if abused a relative path starting from that directory but I would assume that to break later on.
I would recommend to check if
$1
contains slashes or not.I would expect
chsh -s "$(command -v bash)"
to work as it does on other systems but here it results in the shell executable file path/data/data/com.termux/files/usr/bin//data/data/com.termux/files/usr/bin/bash
which errors the executability check.The text was updated successfully, but these errors were encountered: