UID in environment variable (#1420)

* add $UID
This commit is contained in:
Michel Oosterhof 2020-09-27 12:18:03 +08:00 committed by GitHub
parent 827fede265
commit eab8702981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ class SSHSessionForCowrieUser(object):
'SHELL': '/bin/bash',
'USER': self.username,
'HOME': self.avatar.home,
'TMOUT': '1800'}
'TMOUT': '1800',
'UID': self.uid}
if self.uid == 0:
self.environ['PATH'] = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
else: