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
6d95db4c
Unverified
Commit
6d95db4c
authored
Jul 20, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
namespace: hide unnecessary symbols
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
50b98b68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
6 deletions
+39
-6
Makefile.am
src/lxc/Makefile.am
+25
-0
namespace.h
src/lxc/namespace.h
+8
-6
Makefile.am
src/tests/Makefile.am
+6
-0
No files found.
src/lxc/Makefile.am
View file @
6d95db4c
...
...
@@ -339,6 +339,7 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
rexec.c rexec.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
...
...
@@ -355,6 +356,7 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_autostart_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -370,6 +372,7 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_cgroup_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -385,6 +388,7 @@ lxc_config_SOURCES = tools/lxc_config.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_config_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -400,6 +404,7 @@ lxc_console_SOURCES = tools/lxc_console.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_console_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -415,6 +420,7 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_destroy_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -430,6 +436,7 @@ lxc_device_SOURCES = tools/lxc_device.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_device_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -445,6 +452,7 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_execute_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -460,6 +468,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_freeze_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -475,6 +484,7 @@ lxc_info_SOURCES = tools/lxc_info.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_info_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -492,6 +502,7 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
log.c log.h
\
macro.h
\
monitor.c monitor.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_monitor_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -508,6 +519,7 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
initutils.c initutils.h
\
log.c log.h
\
memory_utils.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_ls_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -523,6 +535,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
...
...
@@ -539,6 +552,7 @@ lxc_start_SOURCES = tools/lxc_start.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_start_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -555,6 +569,7 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
initutils.c initutils.h
\
log.c log.h
\
mainloop.c mainloop.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_stop_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -571,6 +586,7 @@ lxc_top_SOURCES = tools/lxc_top.c \
initutils.c initutils.h
\
log.c log.h
\
mainloop.c mainloop.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_top_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -586,6 +602,7 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_unfreeze_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -601,6 +618,7 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
\
syscall_numbers.h
\
syscall_wrappers.h
...
...
@@ -618,6 +636,7 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_wait_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -633,6 +652,7 @@ lxc_create_SOURCES = tools/lxc_create.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
...
...
@@ -649,6 +669,7 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_snapshot_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -664,6 +685,7 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
file_utils.c file_utils.h
\
initutils.c initutils.h
\
log.c log.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
if
ENABLE_SECCOMP
lxc_checkpoint_SOURCES
+=
seccomp.c lxcseccomp.h
...
...
@@ -702,6 +724,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
log.c log.h
\
mainloop.c mainloop.h
\
monitor.c monitor.h
\
namespace.c namespace.h
\
process_utils.c process_utils.h
\
string_utils.c string_utils.h
\
syscall_numbers.h
\
...
...
@@ -721,6 +744,7 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
initutils.c initutils.h
\
log.c log.h
\
memory_utils.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
parse.c parse.h
\
...
...
@@ -744,6 +768,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
log.c log.h
\
macro.h
\
memory_utils.h
\
namespace.c namespace.h
\
string_utils.c string_utils.h
\
syscall_wrappers.h
\
utils.c utils.h
...
...
src/lxc/namespace.h
View file @
6d95db4c
...
...
@@ -7,6 +7,8 @@
#include <unistd.h>
#include <sys/syscall.h>
#include "compiler.h"
enum
{
LXC_NS_USER
,
LXC_NS_MNT
,
...
...
@@ -18,16 +20,16 @@ enum {
LXC_NS_MAX
};
extern
const
struct
ns_info
{
__hidden
extern
const
struct
ns_info
{
const
char
*
proc_name
;
int
clone_flag
;
const
char
*
flag_name
;
const
char
*
env_name
;
}
ns_info
[
LXC_NS_MAX
];
extern
int
lxc_namespace_2_cloneflag
(
const
char
*
namespace
);
extern
int
lxc_namespace_2_ns_idx
(
const
char
*
namespace
);
extern
int
lxc_namespace_2_std_identifiers
(
char
*
namespaces
);
extern
int
lxc_fill_namespace_flags
(
char
*
flaglist
,
int
*
flags
);
__hidden
extern
int
lxc_namespace_2_cloneflag
(
const
char
*
namespace
);
__hidden
extern
int
lxc_namespace_2_ns_idx
(
const
char
*
namespace
);
__hidden
extern
int
lxc_namespace_2_std_identifiers
(
char
*
namespaces
);
__hidden
extern
int
lxc_fill_namespace_flags
(
char
*
flaglist
,
int
*
flags
);
#endif
#endif
/* __LXC_NAMESPACE_H */
src/tests/Makefile.am
View file @
6d95db4c
...
...
@@ -19,6 +19,7 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/mainloop.c ../lxc/mainloop.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
@@ -39,6 +40,7 @@ lxc_test_attach_SOURCES = attach.c \
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/mainloop.c ../lxc/mainloop.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
@@ -59,6 +61,7 @@ lxc_test_cgpath_SOURCES = cgpath.c \
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/mainloop.c ../lxc/mainloop.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
@@ -81,6 +84,7 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/mainloop.c ../lxc/mainloop.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
@@ -121,6 +125,7 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \
../lxc/file_utils.c ../lxc/file_utils.h
\
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
@@ -164,6 +169,7 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \
../lxc/initutils.c ../lxc/initutils.h
\
../lxc/log.c ../lxc/log.h
\
../lxc/mainloop.c ../lxc/mainloop.h
\
../lxc/namespace.c ../lxc/namespace.h
\
../lxc/network.c ../lxc/network.h
\
../lxc/nl.c ../lxc/nl.h
\
../lxc/string_utils.c ../lxc/string_utils.h
...
...
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