jsmecham / atom-terminal-tab

Simple terminal for the Atom text editor.
https://atom.io/packages/terminal-tab
MIT License
142 stars 29 forks source link

Terminal tab does not support suid binaries. #134

Open yacc143 opened 4 years ago

yacc143 commented 4 years ago

terminal tab on Atom 1.48.0 (deb installed on Ubuntu 1.48.0) does not support suid binaries:

spawn a fresh terminal:

andreas@obelix:~/work/grants_team_setup$ LANG=C
andreas@obelix:~/work/grants_team_setup$ sudo
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
andreas@obelix:~/work/grants_team_setup$ 

capsh --print reports the same inside and outside Atom.

Even funnier, running gnome-terminal inside the tab, starts a new terminal, and that DOES support executing suid binaries like sudo.

yacc143 commented 4 years ago

Ah, found the potential issue here:

https://github.com/electron/electron/issues/18521

Could it be a similar problem here? Considering that terminal tab also depends upon node-pty?

yacc143 commented 4 years ago

And yes, running gnome-terminal would work because gnome-terminal probably forks of a mother process that is outside of atom.

yacc143 commented 4 years ago

Yep, this is a known bug in Electron 5.0.x :(

And looking at the tags on the issue/commit, it will only be fixed in 5.1.x

https://github.com/electron/electron/pull/19953