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
8024504d
Unverified
Commit
8024504d
authored
Jan 20, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attach_options: reduce delta
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
0f0e087a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
32 deletions
+34
-32
attach_options.h
src/lxc/attach_options.h
+34
-32
No files found.
src/lxc/attach_options.h
View file @
8024504d
...
@@ -35,27 +35,26 @@ extern "C" {
...
@@ -35,27 +35,26 @@ extern "C" {
* LXC environment policy.
* LXC environment policy.
*/
*/
typedef
enum
lxc_attach_env_policy_t
{
typedef
enum
lxc_attach_env_policy_t
{
LXC_ATTACH_KEEP_ENV
,
/
/!< Retain the environment
LXC_ATTACH_KEEP_ENV
,
/
*!< Retain the environment */
LXC_ATTACH_CLEAR_ENV
/
/!< Clear the environment
LXC_ATTACH_CLEAR_ENV
/
*!< Clear the environment */
}
lxc_attach_env_policy_t
;
}
lxc_attach_env_policy_t
;
enum
{
enum
{
/* the following are on by default: */
/* The following are on by default: */
LXC_ATTACH_MOVE_TO_CGROUP
=
0x00000001
,
//!< Move to cgroup
LXC_ATTACH_MOVE_TO_CGROUP
=
0x00000001
,
/*!< Move to cgroup */
LXC_ATTACH_DROP_CAPABILITIES
=
0x00000002
,
//!< Drop capabilities
LXC_ATTACH_DROP_CAPABILITIES
=
0x00000002
,
/*!< Drop capabilities */
LXC_ATTACH_SET_PERSONALITY
=
0x00000004
,
//!< Set personality
LXC_ATTACH_SET_PERSONALITY
=
0x00000004
,
/*!< Set personality */
LXC_ATTACH_LSM_EXEC
=
0x00000008
,
//!< Execute under a Linux Security Module
LXC_ATTACH_LSM_EXEC
=
0x00000008
,
/*!< Execute under a Linux Security Module */
/* the following are off by default */
/* The following are off by default: */
LXC_ATTACH_REMOUNT_PROC_SYS
=
0x00010000
,
//!< Remount /proc filesystem
LXC_ATTACH_REMOUNT_PROC_SYS
=
0x00010000
,
/*!< Remount /proc filesystem */
LXC_ATTACH_LSM_NOW
=
0x00020000
,
//!< FIXME: unknown
LXC_ATTACH_LSM_NOW
=
0x00020000
,
/*!< FIXME: unknown */
/* we have 16 bits for things that are on by default
/* We have 16 bits for things that are on by default and 16 bits that
* and 16 bits that are off by default, that should
* are off by default, that should be sufficient to keep binary
* be sufficient to keep binary compatibility for
* compatibility for a while
* a while
*/
*/
LXC_ATTACH_DEFAULT
=
0x0000FFFF
/
/!< Mask of flags to apply by default
LXC_ATTACH_DEFAULT
=
0x0000FFFF
/
*!< Mask of flags to apply by default */
};
};
/*! All Linux Security Module flags */
/*! All Linux Security Module flags */
...
@@ -82,13 +81,14 @@ typedef struct lxc_attach_options_t {
...
@@ -82,13 +81,14 @@ typedef struct lxc_attach_options_t {
int
namespaces
;
int
namespaces
;
/*! Initial personality (\c -1 to autodetect).
/*! Initial personality (\c -1 to autodetect).
* \warning This may be ignored if lxc is compiled without personality support)
* \warning This may be ignored if lxc is compiled without personality
* support)
*/
*/
long
personality
;
long
personality
;
/*! Initial current directory, use \c NULL to use cwd.
/*! Initial current directory, use \c NULL to use cwd.
* If the current directory does not exist in the container, the
* If the current directory does not exist in the container, the
root
*
root
directory will be used instead because of kernel defaults.
* directory will be used instead because of kernel defaults.
*/
*/
char
*
initial_cwd
;
char
*
initial_cwd
;
...
@@ -132,18 +132,20 @@ typedef struct lxc_attach_options_t {
...
@@ -132,18 +132,20 @@ typedef struct lxc_attach_options_t {
}
lxc_attach_options_t
;
}
lxc_attach_options_t
;
/*! Default attach options to use */
/*! Default attach options to use */
#define LXC_ATTACH_OPTIONS_DEFAULT \
#define LXC_ATTACH_OPTIONS_DEFAULT \
{ \
{ \
/* .attach_flags = */
LXC_ATTACH_DEFAULT, \
/* .attach_flags = */
LXC_ATTACH_DEFAULT, \
/* .namespaces = */
-1, \
/* .namespaces = */
-1, \
/* .personality = */
-1, \
/* .personality = */
-1, \
/* .initial_cwd = */
NULL, \
/* .initial_cwd = */
NULL, \
/* .uid = */
(uid_t)-1, \
/* .uid = */
(uid_t)-1, \
/* .gid = */
(gid_t)-1, \
/* .gid = */
(gid_t)-1, \
/* .env_policy = */
LXC_ATTACH_KEEP_ENV, \
/* .env_policy = */
LXC_ATTACH_KEEP_ENV, \
/* .extra_env_vars = */
NULL, \
/* .extra_env_vars = */
NULL, \
/* .extra_keep_env = */
NULL, \
/* .extra_keep_env = */
NULL, \
/* .stdin_fd = */
0, 1, 2 \
/* .stdin_fd = */
0, \
/* .stdout_fd = */
1, \
/* .stderr_fd = */
2, \
}
}
/*!
/*!
...
...
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