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
723935d6
Unverified
Commit
723935d6
authored
Apr 17, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Apr 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caps: skip file capability checks on android
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
99e54f04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
caps.c
src/lxc/caps.c
+5
-0
conf.c
src/lxc/conf.c
+5
-1
No files found.
src/lxc/caps.c
View file @
723935d6
...
...
@@ -225,6 +225,10 @@ static bool lxc_cap_is_set(cap_t caps, cap_value_t cap, cap_flag_t flag)
bool
lxc_file_cap_is_set
(
const
char
*
path
,
cap_value_t
cap
,
cap_flag_t
flag
)
{
/* Android's bionic currently seems to lack support for cap_get_file(). */
#if IS_BIONIC
return
true
;
#else
bool
cap_is_set
;
cap_t
caps
;
...
...
@@ -243,6 +247,7 @@ bool lxc_file_cap_is_set(const char *path, cap_value_t cap, cap_flag_t flag)
cap_is_set
=
lxc_cap_is_set
(
caps
,
cap
,
flag
);
cap_free
(
caps
);
return
cap_is_set
;
#endif
}
bool
lxc_proc_cap_is_set
(
cap_value_t
cap
,
cap_flag_t
flag
)
...
...
src/lxc/conf.c
View file @
723935d6
...
...
@@ -3254,7 +3254,7 @@ static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
goto
cleanup
;
}
#if HAVE_LIBCAP
#if HAVE_LIBCAP
&& !IS_BIONIC
/* Check if it has the CAP_SETUID capability. */
if
((
cap
&
CAP_SETUID
)
&&
lxc_file_cap_is_set
(
path
,
CAP_SETUID
,
CAP_EFFECTIVE
)
&&
...
...
@@ -3274,6 +3274,10 @@ static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
fret
=
1
;
goto
cleanup
;
}
#else
DEBUG
(
"Cannot check for file capabilites as full capability support is "
"missing. Manual intervention needed."
);
fret
=
1
;
#endif
cleanup:
...
...
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