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
435 stars 112 forks source link

[bug] empty user configuration traceback #127

Closed ghantoos closed 8 years ago

ghantoos commented 8 years ago

When a user configuration is empty, lshell will traceback.

Traceback (most recent call last):
  File "./bin/lshell", line 52, in <module>
    main()
  File "./bin/lshell", line 38, in main
    userconf = CheckConfig(args).returnconf()
  File "/home/ghantoos/src/lshell/lshell/checkconfig.py", line 70, in __init__
    self.get_config()
  File "/home/ghantoos/src/lshell/lshell/checkconfig.py", line 298, in get_config
    self.get_config_sub(self.user)
  File "/home/ghantoos/src/lshell/lshell/checkconfig.py", line 320, in get_config_sub
    if len(split) > 1 and key in ['path',
UnboundLocalError: local variable 'split' referenced before assignment