Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
6cee93ac
Commit
6cee93ac
authored
Nov 09, 2015
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attach: unshare cgroupns if possible
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
--- Changelog 20160104: only try if kernel supports cgns.
parent
12983ba4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
attach.c
src/lxc/attach.c
+7
-0
No files found.
src/lxc/attach.c
View file @
6cee93ac
...
@@ -957,6 +957,13 @@ int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_fun
...
@@ -957,6 +957,13 @@ int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_fun
WARN
(
"could not change directory to '%s'"
,
new_cwd
);
WARN
(
"could not change directory to '%s'"
,
new_cwd
);
free
(
cwd
);
free
(
cwd
);
if
(
options
->
attach_flags
&
LXC_ATTACH_MOVE_TO_CGROUP
&&
cgns_supported
())
{
if
(
unshare
(
CLONE_NEWCGROUP
)
!=
0
)
{
SYSERROR
(
"cgroupns unshare: permission denied"
);
rexit
(
-
1
);
}
}
/* now create the real child process */
/* now create the real child process */
{
{
struct
attach_clone_payload
payload
=
{
struct
attach_clone_payload
payload
=
{
...
...
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