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
ca83bebe
Unverified
Commit
ca83bebe
authored
Nov 24, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: move CAP_SYS_* definitions to utils.h
Closes #1946. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f5bb843e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
conf.c
src/lxc/conf.c
+0
-36
utils.h
src/lxc/utils.h
+36
-0
No files found.
src/lxc/conf.c
View file @
ca83bebe
...
@@ -106,42 +106,6 @@
...
@@ -106,42 +106,6 @@
lxc_log_define
(
lxc_conf
,
lxc
);
lxc_log_define
(
lxc_conf
,
lxc
);
#if HAVE_LIBCAP
#ifndef CAP_SETFCAP
#define CAP_SETFCAP 31
#endif
#ifndef CAP_MAC_OVERRIDE
#define CAP_MAC_OVERRIDE 32
#endif
#ifndef CAP_MAC_ADMIN
#define CAP_MAC_ADMIN 33
#endif
#endif
#ifndef PR_CAPBSET_DROP
#define PR_CAPBSET_DROP 24
#endif
#ifndef LO_FLAGS_AUTOCLEAR
#define LO_FLAGS_AUTOCLEAR 4
#endif
#ifndef CAP_SETUID
#define CAP_SETUID 7
#endif
#ifndef CAP_SETGID
#define CAP_SETGID 6
#endif
/* needed for cgroup automount checks, regardless of whether we
* have included linux/capability.h or not */
#ifndef CAP_SYS_ADMIN
#define CAP_SYS_ADMIN 21
#endif
/* Define pivot_root() if missing from the C library */
/* Define pivot_root() if missing from the C library */
#ifndef HAVE_PIVOT_ROOT
#ifndef HAVE_PIVOT_ROOT
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
...
...
src/lxc/utils.h
View file @
ca83bebe
...
@@ -50,6 +50,42 @@
...
@@ -50,6 +50,42 @@
#define __S_ISTYPE(mode, mask) (((mode)&S_IFMT) == (mask))
#define __S_ISTYPE(mode, mask) (((mode)&S_IFMT) == (mask))
#endif
#endif
#if HAVE_LIBCAP
#ifndef CAP_SETFCAP
#define CAP_SETFCAP 31
#endif
#ifndef CAP_MAC_OVERRIDE
#define CAP_MAC_OVERRIDE 32
#endif
#ifndef CAP_MAC_ADMIN
#define CAP_MAC_ADMIN 33
#endif
#endif
#ifndef PR_CAPBSET_DROP
#define PR_CAPBSET_DROP 24
#endif
#ifndef LO_FLAGS_AUTOCLEAR
#define LO_FLAGS_AUTOCLEAR 4
#endif
#ifndef CAP_SETUID
#define CAP_SETUID 7
#endif
#ifndef CAP_SETGID
#define CAP_SETGID 6
#endif
/* needed for cgroup automount checks, regardless of whether we
* have included linux/capability.h or not */
#ifndef CAP_SYS_ADMIN
#define CAP_SYS_ADMIN 21
#endif
/* Useful macros */
/* Useful macros */
/* Maximum number for 64 bit integer is a string with 21 digits: 2^64 - 1 = 21 */
/* Maximum number for 64 bit integer is a string with 21 digits: 2^64 - 1 = 21 */
#define LXC_NUMSTRLEN64 21
#define LXC_NUMSTRLEN64 21
...
...
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