ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
436 stars 111 forks source link

Ctrl-c terminates lshell 0.9.16 #69

Closed kriptozhid closed 10 years ago

kriptozhid commented 10 years ago

Hello since upgrade to 0.9.16 my users reported after using 'tail -f' they get logged out.

Actually they would terminate tail with Ctrl-c and afterwords any command would result in connection termination. I simplified it down to:

user:~$ help cat clear exit history lpath lsudo

user:~$ cat Ctrl-c

user:~$ help Connection to host closed.

I didn't go through commits yet to narrow it down but my first guess is the new job control.

ghantoos commented 10 years ago

This seems to be specific to cat(1) (or the fact that it is listening on stdin instead of lshell).

I'm able to reproduce the bug. It should be fixed indeed. :)

kriptozhid commented 10 years ago

Hello it is this, unfortunately I don't have a fix for you highest priority is pushing out a working versions right now:

shellcmd.py line 144:

Temporarily disable job control for #69

self.retcode = os.system('set -m; %s' % self.g_line)

self.retcode = os.system(self.g_line)

ghantoos commented 10 years ago

@kriptozhid sorry it took me time to look into this. I have just reverted the commit, as you suggested.

Thanks for your help!