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
a8416439
Unverified
Commit
a8416439
authored
Jul 17, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: hide unnecessary symbols
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
e0f15d25
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
72 deletions
+127
-72
Makefile.am
src/lxc/Makefile.am
+66
-0
conf.h
src/lxc/conf.h
+57
-65
error.c
src/lxc/error.c
+1
-1
file_utils.c
src/lxc/file_utils.c
+1
-1
initutils.c
src/lxc/initutils.c
+2
-5
No files found.
src/lxc/Makefile.am
View file @
a8416439
...
@@ -331,79 +331,141 @@ LDADD = liblxc.la \
...
@@ -331,79 +331,141 @@ LDADD = liblxc.la \
if
ENABLE_TOOLS
if
ENABLE_TOOLS
lxc_attach_SOURCES
=
tools/lxc_attach.c
\
lxc_attach_SOURCES
=
tools/lxc_attach.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
rexec.c rexec.h
\
rexec.c rexec.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_autostart_SOURCES
=
tools/lxc_autostart.c
\
lxc_autostart_SOURCES
=
tools/lxc_autostart.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_cgroup_SOURCES
=
tools/lxc_cgroup.c
\
lxc_cgroup_SOURCES
=
tools/lxc_cgroup.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_config_SOURCES
=
tools/lxc_config.c
\
lxc_config_SOURCES
=
tools/lxc_config.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_console_SOURCES
=
tools/lxc_console.c
\
lxc_console_SOURCES
=
tools/lxc_console.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_destroy_SOURCES
=
tools/lxc_destroy.c
\
lxc_destroy_SOURCES
=
tools/lxc_destroy.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_device_SOURCES
=
tools/lxc_device.c
\
lxc_device_SOURCES
=
tools/lxc_device.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_execute_SOURCES
=
tools/lxc_execute.c
\
lxc_execute_SOURCES
=
tools/lxc_execute.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_freeze_SOURCES
=
tools/lxc_freeze.c
\
lxc_freeze_SOURCES
=
tools/lxc_freeze.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_info_SOURCES
=
tools/lxc_info.c
\
lxc_info_SOURCES
=
tools/lxc_info.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_monitor_SOURCES
=
tools/lxc_monitor.c
\
lxc_monitor_SOURCES
=
tools/lxc_monitor.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
macro.h
\
macro.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_ls_SOURCES
=
tools/lxc_ls.c
\
lxc_ls_SOURCES
=
tools/lxc_ls.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_copy_SOURCES
=
tools/lxc_copy.c
\
lxc_copy_SOURCES
=
tools/lxc_copy.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
storage/storage_utils.c storage/storage_utils.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_start_SOURCES
=
tools/lxc_start.c
\
lxc_start_SOURCES
=
tools/lxc_start.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_stop_SOURCES
=
tools/lxc_stop.c
\
lxc_stop_SOURCES
=
tools/lxc_stop.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_top_SOURCES
=
tools/lxc_top.c
\
lxc_top_SOURCES
=
tools/lxc_top.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_unfreeze_SOURCES
=
tools/lxc_unfreeze.c
\
lxc_unfreeze_SOURCES
=
tools/lxc_unfreeze.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_unshare_SOURCES
=
tools/lxc_unshare.c
\
lxc_unshare_SOURCES
=
tools/lxc_unshare.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
\
string_utils.c string_utils.h
\
syscall_numbers.h
\
syscall_numbers.h
\
syscall_wrappers.h
syscall_wrappers.h
lxc_wait_SOURCES
=
tools/lxc_wait.c
\
lxc_wait_SOURCES
=
tools/lxc_wait.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_create_SOURCES
=
tools/lxc_create.c
\
lxc_create_SOURCES
=
tools/lxc_create.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
storage/storage_utils.c storage/storage_utils.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_snapshot_SOURCES
=
tools/lxc_snapshot.c
\
lxc_snapshot_SOURCES
=
tools/lxc_snapshot.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
lxc_checkpoint_SOURCES
=
tools/lxc_checkpoint.c
\
lxc_checkpoint_SOURCES
=
tools/lxc_checkpoint.c
\
tools/arguments.c tools/arguments.h
\
tools/arguments.c tools/arguments.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
conf.c conf.h
\
string_utils.c string_utils.h1
string_utils.c string_utils.h1
endif
endif
...
@@ -424,6 +486,7 @@ init_lxc_LDFLAGS = -pthread
...
@@ -424,6 +486,7 @@ init_lxc_LDFLAGS = -pthread
lxc_monitord_SOURCES
=
cmd/lxc_monitord.c
\
lxc_monitord_SOURCES
=
cmd/lxc_monitord.c
\
af_unix.c af_unix.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
log.c log.h
\
log.c log.h
\
mainloop.c mainloop.h
\
mainloop.c mainloop.h
\
monitor.c monitor.h
\
monitor.c monitor.h
\
...
@@ -433,7 +496,9 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
...
@@ -433,7 +496,9 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
utils.c utils.h
utils.c utils.h
lxc_user_nic_SOURCES
=
cmd/lxc_user_nic.c
\
lxc_user_nic_SOURCES
=
cmd/lxc_user_nic.c
\
../include/netns_ifaddrs.c ../include/netns_ifaddrs.h
\
../include/netns_ifaddrs.c ../include/netns_ifaddrs.h
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
conf.c conf.h
\
log.c log.h
\
log.c log.h
\
memory_utils.h
\
memory_utils.h
\
network.c network.h
\
network.c network.h
\
...
@@ -470,6 +535,7 @@ if HAVE_STATIC_LIBCAP
...
@@ -470,6 +535,7 @@ if HAVE_STATIC_LIBCAP
sbin_PROGRAMS
+=
init.lxc.static
sbin_PROGRAMS
+=
init.lxc.static
init_lxc_static_SOURCES
=
cmd/lxc_init.c
\
init_lxc_static_SOURCES
=
cmd/lxc_init.c
\
af_unix.c af_unix.h
\
caps.c caps.h
\
caps.c caps.h
\
error.c error.h
\
error.c error.h
\
initutils.c initutils.h
\
initutils.c initutils.h
\
...
...
src/lxc/conf.h
View file @
a8416439
...
@@ -403,9 +403,8 @@ struct lxc_conf {
...
@@ -403,9 +403,8 @@ struct lxc_conf {
}
shmount
;
}
shmount
;
};
};
extern
int
write_id_mapping
(
enum
idtype
idtype
,
pid_t
pid
,
const
char
*
buf
,
__hidden
extern
int
write_id_mapping
(
enum
idtype
idtype
,
pid_t
pid
,
const
char
*
buf
,
size_t
buf_size
)
size_t
buf_size
)
__access_r
(
3
,
4
);
__access_r
(
3
,
4
);
#ifdef HAVE_TLS
#ifdef HAVE_TLS
extern
thread_local
struct
lxc_conf
*
current_config
;
extern
thread_local
struct
lxc_conf
*
current_config
;
...
@@ -413,68 +412,61 @@ extern thread_local struct lxc_conf *current_config;
...
@@ -413,68 +412,61 @@ extern thread_local struct lxc_conf *current_config;
extern
struct
lxc_conf
*
current_config
;
extern
struct
lxc_conf
*
current_config
;
#endif
#endif
extern
int
run_lxc_hooks
(
const
char
*
name
,
char
*
hook
,
struct
lxc_conf
*
conf
,
__hidden
extern
int
run_lxc_hooks
(
const
char
*
name
,
char
*
hook
,
struct
lxc_conf
*
conf
,
char
*
argv
[]);
char
*
argv
[]);
__hidden
extern
struct
lxc_conf
*
lxc_conf_init
(
void
);
extern
int
detect_shared_rootfs
(
void
);
__hidden
extern
void
lxc_conf_free
(
struct
lxc_conf
*
conf
);
extern
struct
lxc_conf
*
lxc_conf_init
(
void
);
__hidden
extern
int
pin_rootfs
(
const
char
*
rootfs
);
extern
void
lxc_conf_free
(
struct
lxc_conf
*
conf
);
__hidden
extern
int
lxc_map_ids
(
struct
lxc_list
*
idmap
,
pid_t
pid
);
extern
int
pin_rootfs
(
const
char
*
rootfs
);
__hidden
extern
int
lxc_create_tty
(
const
char
*
name
,
struct
lxc_conf
*
conf
);
extern
int
lxc_map_ids
(
struct
lxc_list
*
idmap
,
pid_t
pid
);
__hidden
extern
void
lxc_delete_tty
(
struct
lxc_tty_info
*
ttys
);
extern
int
lxc_create_tty
(
const
char
*
name
,
struct
lxc_conf
*
conf
);
__hidden
extern
int
lxc_clear_config_caps
(
struct
lxc_conf
*
c
);
extern
void
lxc_delete_tty
(
struct
lxc_tty_info
*
ttys
);
__hidden
extern
int
lxc_clear_config_keepcaps
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_config_caps
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_cgroups
(
struct
lxc_conf
*
c
,
const
char
*
key
,
int
version
);
extern
int
lxc_clear_config_keepcaps
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_mount_entries
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_cgroups
(
struct
lxc_conf
*
c
,
const
char
*
key
,
int
version
);
__hidden
extern
int
lxc_clear_automounts
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_mount_entries
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_hooks
(
struct
lxc_conf
*
c
,
const
char
*
key
);
extern
int
lxc_clear_automounts
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_idmaps
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_hooks
(
struct
lxc_conf
*
c
,
const
char
*
key
);
__hidden
extern
int
lxc_clear_groups
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_idmaps
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_environment
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_groups
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_clear_limits
(
struct
lxc_conf
*
c
,
const
char
*
key
);
extern
int
lxc_clear_environment
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_delete_autodev
(
struct
lxc_handler
*
handler
);
extern
int
lxc_clear_limits
(
struct
lxc_conf
*
c
,
const
char
*
key
);
__hidden
extern
int
lxc_clear_autodev_tmpfs_size
(
struct
lxc_conf
*
c
);
extern
int
lxc_delete_autodev
(
struct
lxc_handler
*
handler
);
__hidden
extern
void
lxc_clear_includes
(
struct
lxc_conf
*
conf
);
extern
int
lxc_clear_autodev_tmpfs_size
(
struct
lxc_conf
*
c
);
__hidden
extern
int
lxc_setup_rootfs_prepare_root
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
extern
void
lxc_clear_includes
(
struct
lxc_conf
*
conf
);
const
char
*
lxcpath
);
extern
int
lxc_setup_rootfs_prepare_root
(
struct
lxc_conf
*
conf
,
__hidden
extern
int
lxc_setup
(
struct
lxc_handler
*
handler
);
const
char
*
name
,
const
char
*
lxcpath
);
__hidden
extern
int
lxc_setup_parent
(
struct
lxc_handler
*
handler
);
extern
int
lxc_setup
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
setup_resource_limits
(
struct
lxc_list
*
limits
,
pid_t
pid
);
extern
int
lxc_setup_parent
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
find_unmapped_nsid
(
const
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
setup_resource_limits
(
struct
lxc_list
*
limits
,
pid_t
pid
);
__hidden
extern
int
mapped_hostid
(
unsigned
id
,
const
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
find_unmapped_nsid
(
const
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
__hidden
extern
int
userns_exec_1
(
const
struct
lxc_conf
*
conf
,
int
(
*
fn
)(
void
*
),
void
*
data
,
extern
int
mapped_hostid
(
unsigned
id
,
const
struct
lxc_conf
*
conf
,
const
char
*
fn_name
);
enum
idtype
idtype
);
__hidden
extern
int
userns_exec_full
(
struct
lxc_conf
*
conf
,
int
(
*
fn
)(
void
*
),
void
*
data
,
extern
int
userns_exec_1
(
const
struct
lxc_conf
*
conf
,
int
(
*
fn
)(
void
*
),
const
char
*
fn_name
);
void
*
data
,
const
char
*
fn_name
);
__hidden
extern
int
parse_mntopts
(
const
char
*
mntopts
,
unsigned
long
*
mntflags
,
char
**
mntdata
);
extern
int
userns_exec_full
(
struct
lxc_conf
*
conf
,
int
(
*
fn
)(
void
*
),
__hidden
extern
int
parse_propagationopts
(
const
char
*
mntopts
,
unsigned
long
*
pflags
);
void
*
data
,
const
char
*
fn_name
);
__hidden
extern
void
tmp_proc_unmount
(
struct
lxc_conf
*
lxc_conf
);
extern
int
parse_mntopts
(
const
char
*
mntopts
,
unsigned
long
*
mntflags
,
__hidden
extern
void
turn_into_dependent_mounts
(
void
);
char
**
mntdata
);
__hidden
extern
void
suggest_default_idmap
(
void
);
extern
int
parse_propagationopts
(
const
char
*
mntopts
,
unsigned
long
*
pflags
);
__hidden
extern
FILE
*
make_anonymous_mount_file
(
struct
lxc_list
*
mount
,
bool
include_nesting_helpers
);
extern
void
tmp_proc_unmount
(
struct
lxc_conf
*
lxc_conf
);
__hidden
extern
struct
lxc_list
*
sort_cgroup_settings
(
struct
lxc_list
*
cgroup_settings
);
extern
void
turn_into_dependent_mounts
(
void
);
__hidden
extern
unsigned
long
add_required_remount_flags
(
const
char
*
s
,
const
char
*
d
,
extern
void
suggest_default_idmap
(
void
);
unsigned
long
flags
);
extern
FILE
*
make_anonymous_mount_file
(
struct
lxc_list
*
mount
,
__hidden
extern
int
run_script
(
const
char
*
name
,
const
char
*
section
,
const
char
*
script
,
...);
bool
include_nesting_helpers
);
__hidden
extern
int
run_script_argv
(
const
char
*
name
,
unsigned
int
hook_version
,
const
char
*
section
,
extern
struct
lxc_list
*
sort_cgroup_settings
(
struct
lxc_list
*
cgroup_settings
);
const
char
*
script
,
const
char
*
hookname
,
char
**
argsin
);
extern
unsigned
long
add_required_remount_flags
(
const
char
*
s
,
const
char
*
d
,
__hidden
extern
int
in_caplist
(
int
cap
,
struct
lxc_list
*
caps
);
unsigned
long
flags
);
__hidden
extern
int
setup_sysctl_parameters
(
struct
lxc_list
*
sysctls
);
extern
int
run_script
(
const
char
*
name
,
const
char
*
section
,
const
char
*
script
,
__hidden
extern
int
lxc_clear_sysctls
(
struct
lxc_conf
*
c
,
const
char
*
key
);
...);
__hidden
extern
int
setup_proc_filesystem
(
struct
lxc_list
*
procs
,
pid_t
pid
);
extern
int
run_script_argv
(
const
char
*
name
,
unsigned
int
hook_version
,
__hidden
extern
int
lxc_clear_procs
(
struct
lxc_conf
*
c
,
const
char
*
key
);
const
char
*
section
,
const
char
*
script
,
__hidden
extern
int
lxc_clear_apparmor_raw
(
struct
lxc_conf
*
c
);
const
char
*
hookname
,
char
**
argsin
);
__hidden
extern
int
lxc_clear_namespace
(
struct
lxc_conf
*
c
);
extern
int
in_caplist
(
int
cap
,
struct
lxc_list
*
caps
);
__hidden
extern
int
userns_exec_minimal
(
const
struct
lxc_conf
*
conf
,
int
(
*
fn_parent
)(
void
*
),
extern
int
setup_sysctl_parameters
(
struct
lxc_list
*
sysctls
);
void
*
fn_parent_data
,
int
(
*
fn_child
)(
void
*
),
extern
int
lxc_clear_sysctls
(
struct
lxc_conf
*
c
,
const
char
*
key
);
void
*
fn_child_data
);
extern
int
setup_proc_filesystem
(
struct
lxc_list
*
procs
,
pid_t
pid
);
__hidden
extern
int
userns_exec_mapped_root
(
const
char
*
path
,
int
path_fd
,
extern
int
lxc_clear_procs
(
struct
lxc_conf
*
c
,
const
char
*
key
);
const
struct
lxc_conf
*
conf
);
extern
int
lxc_clear_apparmor_raw
(
struct
lxc_conf
*
c
);
extern
int
lxc_clear_namespace
(
struct
lxc_conf
*
c
);
extern
int
userns_exec_minimal
(
const
struct
lxc_conf
*
conf
,
int
(
*
fn_parent
)(
void
*
),
void
*
fn_parent_data
,
int
(
*
fn_child
)(
void
*
),
void
*
fn_child_data
);
extern
int
userns_exec_mapped_root
(
const
char
*
path
,
int
path_fd
,
const
struct
lxc_conf
*
conf
);
static
inline
int
chown_mapped_root
(
const
char
*
path
,
const
struct
lxc_conf
*
conf
)
static
inline
int
chown_mapped_root
(
const
char
*
path
,
const
struct
lxc_conf
*
conf
)
{
{
return
userns_exec_mapped_root
(
path
,
-
EBADF
,
conf
);
return
userns_exec_mapped_root
(
path
,
-
EBADF
,
conf
);
...
...
src/lxc/error.c
View file @
a8416439
...
@@ -18,7 +18,7 @@ lxc_log_define(error, lxc);
...
@@ -18,7 +18,7 @@ lxc_log_define(error, lxc);
* 128+n signal n received by the application
* 128+n signal n received by the application
* 255 lxc error
* 255 lxc error
*/
*/
extern
int
lxc_error_set_and_log
(
int
pid
,
int
status
)
extern
int
lxc_error_set_and_log
(
int
pid
,
int
status
)
{
{
int
ret
=
0
;
int
ret
=
0
;
...
...
src/lxc/file_utils.c
View file @
a8416439
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
#include "config.h"
#include "config.h"
#include "file_utils.h"
#include "file_utils.h"
#include "log.h"
#include "macro.h"
#include "macro.h"
#include "memory_utils.h"
#include "memory_utils.h"
#include "string_utils.h"
#include "string_utils.h"
#include <time.h>
#include "utils.h"
#include "utils.h"
int
lxc_open_dirfd
(
const
char
*
dir
)
int
lxc_open_dirfd
(
const
char
*
dir
)
...
...
src/lxc/initutils.c
View file @
a8416439
...
@@ -4,12 +4,13 @@
...
@@ -4,12 +4,13 @@
#define _GNU_SOURCE 1
#define _GNU_SOURCE 1
#endif
#endif
#include <sys/prctl.h>
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <unistd.h>
#include "compiler.h"
#include "compiler.h"
#include "config.h"
#include "config.h"
#include "file_utils.h"
#include "file_utils.h"
#include "initutils.h"
#include "initutils.h"
#include "log.h"
#include "macro.h"
#include "macro.h"
#include "memory_utils.h"
#include "memory_utils.h"
...
@@ -17,8 +18,6 @@
...
@@ -17,8 +18,6 @@
#include "include/strlcpy.h"
#include "include/strlcpy.h"
#endif
#endif
lxc_log_define
(
initutils
,
lxc
);
static
char
*
copy_global_config_value
(
char
*
p
)
static
char
*
copy_global_config_value
(
char
*
p
)
{
{
int
len
=
strlen
(
p
);
int
len
=
strlen
(
p
);
...
@@ -310,8 +309,6 @@ int setproctitle(char *title)
...
@@ -310,8 +309,6 @@ int setproctitle(char *title)
prctl_arg
(
sizeof
(
prctl_map
)),
prctl_arg
(
0
));
prctl_arg
(
sizeof
(
prctl_map
)),
prctl_arg
(
0
));
if
(
ret
==
0
)
if
(
ret
==
0
)
(
void
)
strlcpy
((
char
*
)
arg_start
,
title
,
len
);
(
void
)
strlcpy
((
char
*
)
arg_start
,
title
,
len
);
else
SYSWARN
(
"Failed to set cmdline"
);
return
ret
;
return
ret
;
}
}
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