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
042f9e9c
Unverified
Commit
042f9e9c
authored
Feb 21, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: s/cgroup2_chown/delegate/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
4cd3a764
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
cgfsng.c
src/lxc/cgroups/cgfsng.c
+2
-2
cgroup.c
src/lxc/cgroups/cgroup.c
+2
-2
cgroup.h
src/lxc/cgroups/cgroup.h
+1
-6
No files found.
src/lxc/cgroups/cgfsng.c
View file @
042f9e9c
...
@@ -1326,7 +1326,7 @@ static int chown_cgroup_wrapper(void *data)
...
@@ -1326,7 +1326,7 @@ static int chown_cgroup_wrapper(void *data)
if
(
arg
->
hierarchies
[
i
]
->
fs_type
!=
UNIFIED_HIERARCHY
)
if
(
arg
->
hierarchies
[
i
]
->
fs_type
!=
UNIFIED_HIERARCHY
)
continue
;
continue
;
for
(
char
**
p
=
arg
->
hierarchies
[
i
]
->
cgroup2_chown
;
p
&&
*
p
;
p
++
)
for
(
char
**
p
=
arg
->
hierarchies
[
i
]
->
delegate
;
p
&&
*
p
;
p
++
)
(
void
)
fchowmodat
(
dirfd
,
*
p
,
destuid
,
nsgid
,
0664
);
(
void
)
fchowmodat
(
dirfd
,
*
p
,
destuid
,
nsgid
,
0664
);
}
}
...
@@ -3213,7 +3213,7 @@ static int __initialize_cgroups(struct cgroup_ops *ops, bool relative,
...
@@ -3213,7 +3213,7 @@ static int __initialize_cgroups(struct cgroup_ops *ops, bool relative,
move_ptr
(
controllers
);
move_ptr
(
controllers
);
move_ptr
(
controller_list
);
move_ptr
(
controller_list
);
if
(
type
==
UNIFIED_HIERARCHY
)
if
(
type
==
UNIFIED_HIERARCHY
)
ops
->
unified
->
cgroup2_chown
=
move_ptr
(
delegate
);
ops
->
unified
->
delegate
=
move_ptr
(
delegate
);
}
}
/* determine cgroup layout */
/* determine cgroup layout */
...
...
src/lxc/cgroups/cgroup.c
View file @
042f9e9c
...
@@ -81,9 +81,9 @@ void cgroup_exit(struct cgroup_ops *ops)
...
@@ -81,9 +81,9 @@ void cgroup_exit(struct cgroup_ops *ops)
free
(
*
p
);
free
(
*
p
);
free
((
*
it
)
->
controllers
);
free
((
*
it
)
->
controllers
);
for
(
char
**
p
=
(
*
it
)
->
cgroup2_chown
;
p
&&
*
p
;
p
++
)
for
(
char
**
p
=
(
*
it
)
->
delegate
;
p
&&
*
p
;
p
++
)
free
(
*
p
);
free
(
*
p
);
free
((
*
it
)
->
cgroup2_chown
);
free
((
*
it
)
->
delegate
);
free
((
*
it
)
->
at_mnt
);
free
((
*
it
)
->
at_mnt
);
free
((
*
it
)
->
at_base
);
free
((
*
it
)
->
at_base
);
...
...
src/lxc/cgroups/cgroup.h
View file @
042f9e9c
...
@@ -103,12 +103,7 @@ struct hierarchy {
...
@@ -103,12 +103,7 @@ struct hierarchy {
char
*
at_base
;
char
*
at_base
;
struct
/* unified hierarchy specific */
{
struct
/* unified hierarchy specific */
{
/*
char
**
delegate
;
* cgroup2 only: what files need to be chowned to delegate a
* cgroup to an unprivileged user.
*/
char
**
cgroup2_chown
;
/* cgroup2 only */
unsigned
int
bpf_device_controller
:
1
;
unsigned
int
bpf_device_controller
:
1
;
unsigned
int
freezer_controller
:
1
;
unsigned
int
freezer_controller
:
1
;
};
};
...
...
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