Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jean-Paul Smets
slapos
Commits
e9349c65
Commit
e9349c65
authored
Nov 14, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shellinabox-recipe: now uses uid and gid to start
parent
e5600fad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
slapos/recipe/shellinabox.py
slapos/recipe/shellinabox.py
+4
-4
No files found.
slapos/recipe/shellinabox.py
View file @
e9349c65
...
...
@@ -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'
],
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment