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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
slapos
Commits
5364a100
Commit
5364a100
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
af6692fa
Changes
1
Show 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 @
5364a100
...
@@ -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'
],
}
}
...
...
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