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
317410da
Unverified
Commit
317410da
authored
Apr 22, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile: fix strchrnul() inclusion
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
60933dae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
156 additions
and
12 deletions
+156
-12
Makefile.am
src/lxc/Makefile.am
+102
-0
getsubopt.c
src/lxc/tools/include/getsubopt.c
+4
-12
Makefile.am
src/tests/Makefile.am
+50
-0
No files found.
src/lxc/Makefile.am
View file @
317410da
...
...
@@ -20,6 +20,7 @@ noinst_HEADERS = api_extensions.h \
error.h
\
error_utils.h
\
file_utils.h
\
../include/strchrnul.h
\
../include/netns_ifaddrs.h
\
initutils.h
\
list.h
\
...
...
@@ -391,6 +392,10 @@ lxc_attach_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_attach_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_attach_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_autostart_SOURCES
=
tools/lxc_autostart.c
\
...
...
@@ -448,6 +453,10 @@ lxc_autostart_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_autostart_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_autostart_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_cgroup_SOURCES
=
tools/lxc_cgroup.c
\
...
...
@@ -505,6 +514,10 @@ lxc_cgroup_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_cgroup_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_cgroup_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_config_SOURCES
=
tools/lxc_config.c
\
...
...
@@ -562,6 +575,10 @@ lxc_config_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_config_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_config_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_console_SOURCES
=
tools/lxc_console.c
\
...
...
@@ -619,6 +636,10 @@ lxc_console_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_console_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_console_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_destroy_SOURCES
=
tools/lxc_destroy.c
\
...
...
@@ -676,6 +697,10 @@ lxc_destroy_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_destroy_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_destroy_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_device_SOURCES
=
tools/lxc_device.c
\
...
...
@@ -733,6 +758,10 @@ lxc_device_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_device_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_device_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_execute_SOURCES
=
tools/lxc_execute.c
\
...
...
@@ -790,6 +819,10 @@ lxc_execute_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_execute_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_execute_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_freeze_SOURCES
=
tools/lxc_freeze.c
\
...
...
@@ -847,6 +880,10 @@ lxc_freeze_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_freeze_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_freeze_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_info_SOURCES
=
tools/lxc_info.c
\
...
...
@@ -904,6 +941,10 @@ lxc_info_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_info_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_info_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_monitor_SOURCES
=
tools/lxc_monitor.c
\
...
...
@@ -962,6 +1003,10 @@ lxc_monitor_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_monitor_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_monitor_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_ls_SOURCES
=
tools/lxc_ls.c
\
...
...
@@ -1020,6 +1065,10 @@ lxc_ls_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_ls_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_ls_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_copy_SOURCES
=
tools/lxc_copy.c
\
...
...
@@ -1077,6 +1126,10 @@ lxc_copy_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_copy_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_copy_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_start_SOURCES
=
tools/lxc_start.c
\
...
...
@@ -1134,6 +1187,10 @@ lxc_start_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_start_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_start_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_stop_SOURCES
=
tools/lxc_stop.c
\
...
...
@@ -1191,6 +1248,10 @@ lxc_stop_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_stop_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_stop_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_top_SOURCES
=
tools/lxc_top.c
\
...
...
@@ -1248,6 +1309,10 @@ lxc_top_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_top_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_top_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_unfreeze_SOURCES
=
tools/lxc_unfreeze.c
\
...
...
@@ -1305,6 +1370,10 @@ lxc_unfreeze_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_unfreeze_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_unfreeze_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_unshare_SOURCES
=
tools/lxc_unshare.c
\
...
...
@@ -1364,6 +1433,10 @@ lxc_unshare_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_unshare_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_unshare_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_wait_SOURCES
=
tools/lxc_wait.c
\
...
...
@@ -1421,6 +1494,10 @@ lxc_wait_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_wait_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_wait_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_create_SOURCES
=
tools/lxc_create.c
\
...
...
@@ -1478,6 +1555,10 @@ lxc_create_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_create_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_create_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_snapshot_SOURCES
=
tools/lxc_snapshot.c
\
...
...
@@ -1535,6 +1616,10 @@ lxc_snapshot_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_snapshot_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_snapshot_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_checkpoint_SOURCES
=
tools/lxc_checkpoint.c
\
...
...
@@ -1592,6 +1677,11 @@ lxc_checkpoint_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_checkpoint_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_checkpoint_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
endif
...
...
@@ -1665,6 +1755,10 @@ lxc_monitord_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_monitord_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_monitord_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_user_nic_SOURCES
=
cmd/lxc_user_nic.c
...
...
@@ -1724,6 +1818,10 @@ lxc_user_nic_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_user_nic_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_user_nic_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
lxc_usernsexec_SOURCES
=
cmd/lxc_usernsexec.c
...
...
@@ -1784,6 +1882,10 @@ lxc_usernsexec_SOURCES += af_unix.c af_unix.h \
if
ENABLE_SECCOMP
lxc_usernsexec_SOURCES
+=
seccomp.c lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_usernsexec_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
endif
endif
...
...
src/lxc/tools/include/getsubopt.c
View file @
317410da
...
...
@@ -4,19 +4,11 @@
#include <stdlib.h>
#include <string.h>
char
*
strchrnul
(
const
char
*
s
,
int
c
)
{
char
*
result
;
result
=
strchr
(
s
,
c
);
#include "config.h"
if
(
!
result
)
{
result
=
(
char
*
)
s
+
strlen
(
s
);
}
return
(
result
);
}
#ifndef HAVE_STRCHRNUL
#include "include/strchrnul"
#endif
/* Parse comma separated suboption from *OPTIONP and match against
strings in TOKENS. If found return index and set *VALUEP to
...
...
src/tests/Makefile.am
View file @
317410da
...
...
@@ -69,6 +69,10 @@ if ENABLE_SECCOMP
lxc_test_api_reboot_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_api_reboot_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_apparmor_SOURCES
=
aa.c
\
../lxc/af_unix.c ../lxc/af_unix.h
\
../lxc/caps.c ../lxc/caps.h
\
...
...
@@ -119,6 +123,10 @@ if ENABLE_SECCOMP
lxc_test_apparmor_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_apparmor_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_attach_SOURCES
=
attach.c
\
../lxc/af_unix.c ../lxc/af_unix.h
\
../lxc/caps.c ../lxc/caps.h
\
...
...
@@ -169,6 +177,10 @@ if ENABLE_SECCOMP
lxc_test_attach_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_attach_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_basic_SOURCES
=
basic.c
lxc_test_cgpath_SOURCES
=
cgpath.c
\
../lxc/af_unix.c ../lxc/af_unix.h
\
...
...
@@ -220,6 +232,10 @@ if ENABLE_SECCOMP
lxc_test_cgpath_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_cgpath_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_clonetest_SOURCES
=
clonetest.c
lxc_test_concurrent_SOURCES
=
concurrent.c
lxc_test_config_jump_table_SOURCES
=
config_jump_table.c
\
...
...
@@ -273,6 +289,10 @@ if ENABLE_SECCOMP
lxc_test_config_jump_table_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_config_jump_table_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_console_SOURCES
=
console.c
lxc_test_console_log_SOURCES
=
console_log.c lxctest.h
lxc_test_containertests_SOURCES
=
containertests.c
...
...
@@ -329,6 +349,11 @@ lxc_test_device_add_remove_SOURCES = device_add_remove.c \
if
ENABLE_SECCOMP
lxc_test_device_add_remove_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_device_add_remove_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_getkeys_SOURCES
=
getkeys.c
lxc_test_get_item_SOURCES
=
get_item.c
\
../lxc/af_unix.c ../lxc/af_unix.h
\
...
...
@@ -379,6 +404,11 @@ lxc_test_get_item_SOURCES = get_item.c \
if
ENABLE_SECCOMP
lxc_test_get_item_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_get_item_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_list_SOURCES
=
list.c
lxc_test_locktests_SOURCES
=
locktests.c
\
../lxc/af_unix.c ../lxc/af_unix.h
\
...
...
@@ -430,6 +460,10 @@ if ENABLE_SECCOMP
lxc_test_locktests_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_locktests_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_lxcpath_SOURCES
=
lxcpath.c
lxc_test_may_control_SOURCES
=
may_control.c
lxc_test_mount_injection_SOURCES
=
mount_injection.c
\
...
...
@@ -483,6 +517,10 @@ if ENABLE_SECCOMP
lxc_test_mount_injection_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_mount_injection_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_parse_config_file_SOURCES
=
parse_config_file.c
\
lxctest.h
\
../lxc/af_unix.c ../lxc/af_unix.h
\
...
...
@@ -534,6 +572,10 @@ if ENABLE_SECCOMP
lxc_test_parse_config_file_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_parse_config_file_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_raw_clone_SOURCES
=
lxc_raw_clone.c
\
lxctest.h
\
../lxc/af_unix.c ../lxc/af_unix.h
\
...
...
@@ -585,6 +627,10 @@ if ENABLE_SECCOMP
lxc_test_raw_clone_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_raw_clone_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
lxc_test_reboot_SOURCES
=
reboot.c
lxc_test_saveconfig_SOURCES
=
saveconfig.c
lxc_test_share_ns_SOURCES
=
share_ns.c
\
...
...
@@ -650,6 +696,10 @@ if ENABLE_SECCOMP
lxc_test_utils_SOURCES
+=
../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
if
!HAVE_STRCHRNUL
lxc_test_utils_SOURCES
+=
../include/strchrnul.c ../include/strchrnul.h
endif
AM_CFLAGS
+=
-DLXCROOTFSMOUNT
=
\"
$(LXCROOTFSMOUNT)
\"
\
-DLXCPATH
=
\"
$(LXCPATH)
\"
\
-DLXC_GLOBAL_CONF
=
\"
$(LXC_GLOBAL_CONF)
\"
\
...
...
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