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
c0888dfe
Commit
c0888dfe
authored
Mar 06, 2016
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chmod container cgroup 775
so that container root can create sub-cgroups Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
95adfe93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
cgfsng.c
src/lxc/cgfsng.c
+11
-1
No files found.
src/lxc/cgfsng.c
View file @
c0888dfe
...
...
@@ -1014,6 +1014,11 @@ struct chown_data {
uid_t
origuid
;
// target uid in parent namespace
};
/*
* chgrp the container cgroups to container group. We leave
* the container owner as cgroup owner. So we must make the
* directories 775 so that the container can create sub-cgroups.
*/
static
int
chown_cgroup_wrapper
(
void
*
data
)
{
struct
chown_data
*
arg
=
data
;
...
...
@@ -1037,7 +1042,12 @@ static int chown_cgroup_wrapper(void *data)
free
(
fullpath
);
return
-
1
;
}
// TODO - do we need to chown tasks and cgroup.procs too?
if
(
chmod
(
fullpath
,
0775
)
<
0
)
{
SYSERROR
(
"Error chmoding %s
\n
"
,
fullpath
);
free
(
fullpath
);
return
-
1
;
}
free
(
fullpath
);
}
...
...
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