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
55fc780b
Unverified
Commit
55fc780b
authored
Mar 14, 2018
by
Christian Brauner
Committed by
GitHub
Mar 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2216 from igalic/fix/clang-warning
conf: fix clang warning when building w/o libcap
parents
0b628094
8560cd36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
conf.c
src/lxc/conf.c
+4
-5
No files found.
src/lxc/conf.c
View file @
55fc780b
...
@@ -205,8 +205,8 @@ static struct mount_opt propagation_opt[] = {
...
@@ -205,8 +205,8 @@ static struct mount_opt propagation_opt[] = {
{
NULL
,
0
,
0
},
{
NULL
,
0
,
0
},
};
};
#if HAVE_LIBCAP
static
struct
caps_opt
caps_opt
[]
=
{
static
struct
caps_opt
caps_opt
[]
=
{
#if HAVE_LIBCAP
{
"chown"
,
CAP_CHOWN
},
{
"chown"
,
CAP_CHOWN
},
{
"dac_override"
,
CAP_DAC_OVERRIDE
},
{
"dac_override"
,
CAP_DAC_OVERRIDE
},
{
"dac_read_search"
,
CAP_DAC_READ_SEARCH
},
{
"dac_read_search"
,
CAP_DAC_READ_SEARCH
},
...
@@ -257,10 +257,8 @@ static struct caps_opt caps_opt[] = {
...
@@ -257,10 +257,8 @@ static struct caps_opt caps_opt[] = {
#ifdef CAP_BLOCK_SUSPEND
#ifdef CAP_BLOCK_SUSPEND
{
"block_suspend"
,
CAP_BLOCK_SUSPEND
},
{
"block_suspend"
,
CAP_BLOCK_SUSPEND
},
#endif
#endif
};
#else
static
struct
caps_opt
caps_opt
[]
=
{};
#endif
#endif
};
static
struct
limit_opt
limit_opt
[]
=
{
static
struct
limit_opt
limit_opt
[]
=
{
#ifdef RLIMIT_AS
#ifdef RLIMIT_AS
...
@@ -2359,11 +2357,12 @@ static int parse_cap(const char *cap)
...
@@ -2359,11 +2357,12 @@ static int parse_cap(const char *cap)
char
*
ptr
=
NULL
;
char
*
ptr
=
NULL
;
size_t
i
;
size_t
i
;
int
capid
=
-
1
;
int
capid
=
-
1
;
size_t
end
=
sizeof
(
caps_opt
)
/
sizeof
(
caps_opt
[
0
]);
if
(
!
strcmp
(
cap
,
"none"
))
if
(
!
strcmp
(
cap
,
"none"
))
return
-
2
;
return
-
2
;
for
(
i
=
0
;
i
<
sizeof
(
caps_opt
)
/
sizeof
(
caps_opt
[
0
])
;
i
++
)
{
for
(
i
=
0
;
i
<
end
;
i
++
)
{
if
(
strcmp
(
cap
,
caps_opt
[
i
].
name
))
if
(
strcmp
(
cap
,
caps_opt
[
i
].
name
))
continue
;
continue
;
...
...
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