Commit e9349c65 authored by Nicolas Wavrant's avatar Nicolas Wavrant

shellinabox-recipe: now uses uid and gid to start

parent e5600fad
...@@ -58,11 +58,11 @@ def shellinabox(args): ...@@ -58,11 +58,11 @@ def shellinabox(args):
with open(args['ssl_certificate']) as public_key_file: with open(args['ssl_certificate']) as public_key_file:
print >> certificate_file, public_key_file.read() print >> certificate_file, public_key_file.read()
user = pwd.getpwuid(os.getuid()).pw_name user = pwd.getpwuid(os.getuid()).pw_uid
group = grp.getgrgid(os.getgid()).gr_name group = grp.getgrgid(os.getgid()).gr_gid
service = '/:%(user)s:%(group)s:%(directory)s:%(command)s' % { service = '/:%(user)s:%(group)s:%(directory)s:%(command)s' % {
'user': group, 'user': user,
'group': user, 'group': group,
'directory': args['directory'], 'directory': args['directory'],
'command': args['login_shell'], 'command': args['login_shell'],
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment