Otherwise that variable has no effect.
Suggested by Kees Cook.
Through Autoconf we set hardening flags that are actually more aggressive than the Ubuntu defaults, but they conflict with same.
The previous code had the following issues: 1) hardcoded the path of /bin/sh (should use paths.h) 2) threw away the variable with the fallback shell 3) prepended - to the path rather than the shell name 4) added a - before explicit chosen non-shell commands Closes #199.
There appears to be a typo/thinko in the ncurses detection stuff in configure.ac. The fallout was that on a Linux host without ncurses-devel installed, "./configure" failed to find curses.h but claimed overall success, then the build failed later during make. This patch removes an extraneous comma, which seems to make it both fail and succeed correctly when it should.
…using error msg.
Fixes: $ MOSH_KEY=foo ./mosh-client 127.0.0.1 60010 Crypto exception: Key must be 22 letters long. Segmentation fault Closes #189.
As far as I know, for all implementations of libutempter, the utempter_remove_added_record() function depends on the file descriptor passed to utempter_add_record() to still be valid. The reason for this, is that this file descriptor is propagated to the setuid utility that is responsible for modifying utmpx. Modify the code to remove the utmpx entry before closing the pseudo-terminal master device. While there, simply use utempter_remove_record(), which takes the file descriptor explicitly. The advantage is that this prevents potential foot-shooting in the future. Visual inspection of the source code will make it more obvious that utempter depends on the file descriptor. Closes #179.
[keithw -- applied style change from kmcallister] Closes #181.