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):
with open(args['ssl_certificate']) as public_key_file:
print >> certificate_file, public_key_file.read()
user = pwd.getpwuid(os.getuid()).pw_name
group = grp.getgrgid(os.getgid()).gr_name
user = pwd.getpwuid(os.getuid()).pw_uid
group = grp.getgrgid(os.getgid()).gr_gid
service = '/:%(user)s:%(group)s:%(directory)s:%(command)s' % {
'user': group,
'group': user,
'user': user,
'group': group,
'directory': args['directory'],
'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