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
5b346390
Unverified
Commit
5b346390
authored
Feb 09, 2019
by
Stéphane Graber
Committed by
GitHub
Feb 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2831 from brauner/2019-02-08/capabilities_stable-2.0
caps: check uid and euid
parents
3d277c51
8d18e582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
caps.c
src/lxc/caps.c
+2
-4
No files found.
src/lxc/caps.c
View file @
5b346390
...
...
@@ -154,8 +154,7 @@ int lxc_ambient_caps_up(void)
int
last_cap
=
CAP_LAST_CAP
;
char
*
cap_names
=
NULL
;
/* When we are run as root, we don't want to play with the capabilities. */
if
(
!
getuid
())
if
(
!
getuid
()
||
geteuid
())
return
0
;
caps
=
cap_get_proc
();
...
...
@@ -222,8 +221,7 @@ int lxc_ambient_caps_down(void)
cap_t
caps
;
cap_value_t
cap
;
/* When we are run as root, we don't want to play with the capabilities. */
if
(
!
getuid
())
if
(
!
getuid
()
||
geteuid
())
return
0
;
ret
=
prctl
(
PR_CAP_AMBIENT
,
PR_CAP_AMBIENT_CLEAR_ALL
,
0
,
0
,
0
);
...
...
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