From cee5f6429d31447d104d0186c12b61cb71980a6f Mon Sep 17 00:00:00 2001 From: openeuler-iSula Date: Sun, 29 Dec 2019 15:42:58 +0800 Subject: [PATCH] lxc: remove seucrec Signed-off-by: openeuler-iSula --- ...xc.isulad.init.args-config-interface.patch | 22 +-- ...-add-support-share-namespace-by-path.patch | 8 +- ...lxc.isulad.populate.device-interface.patch | 26 +-- 0004-support-isulad-fifo-log.patch | 8 +- 0005-auto-mount-cgroup-sys-and-proc.patch | 10 +- ...hen-set-no-ro-mount-mount-propagatio.patch | 8 +- 0007-use-isulad-log-format.patch | 8 +- ...lad-modify-exit-code-and-stop-signal.patch | 10 +- ...lxc_start-add-default-terminal-fifos.patch | 34 ++-- ...e-pid-ppid-info-into-file-for-isulad.patch | 34 ++-- ...FIFO-to-monitor-state-of-lxc-monitor.patch | 26 +-- 0012-Init-fifos-in-lxc_attach_terminal.patch | 8 +- 0013-isulad-set-env-home-in-container.patch | 18 +-- ...upport-rotate-for-container-log-file.patch | 10 +- 0015-fix-high-gcc-compile-bug.patch | 8 +- 0016-add-masked-paths-and-ro-paths.patch | 18 +-- ...check-cgroup-cpu.shares-after-setted.patch | 10 +- ...xc-attach-add-support-terminal-fifos.patch | 22 +-- ...eadonly-and-make-soft-link-of-subcgr.patch | 10 +- ...fix-log-error-when-symlink-subcgroup.patch | 8 +- 0021-lxc-attch-add-error-message.patch | 36 ++--- 0022-support-rootfs-mount-propagation.patch | 26 +-- ...uid-and-gid-from-lxc-container-confi.patch | 8 +- ...ymlink-in-mount-entry-and-not-permit.patch | 20 +-- 0025-support-oci-hooks.patch | 76 ++++----- ...and-do-not-destroy-directory-when-de.patch | 14 +- 0027-fix-bug-of-memory-leak.patch | 12 +- 0028-support-rootfs-for-container.patch | 10 +- ...dd-start-timeout-to-limit-start-time.patch | 34 ++-- 0030-support-block-device-as-rootfs.patch | 30 ++-- 0031-clean-add-clean-resources-api.patch | 28 ++-- ...-caps-when-cap.keep-ISULAD_KEEP_NONE.patch | 8 +- ...upport-mount-squashfs-in-mount-entry.patch | 24 +-- 0034-some-small-bugfix.patch | 32 ++-- 0035-lxc-fixup-builds-with-newer-glibc.patch | 8 +- ...aps-add-drop-caps-of-current-process.patch | 24 +-- ...t-signal-handlers-and-set-umask-0027.patch | 12 +- ...ven-terminal-as-controlling-terminal.patch | 8 +- ...-message-when-container-start-failed.patch | 40 ++--- ...t-200ms-for-cmds-send-to-lxc-monitor.patch | 12 +- 0041-return-1-when-_lxc_start-fails.patch | 8 +- 0042-lxc-seccomp-adopt-to-lxc3.0.patch | 10 +- ...er-of-handler-to-fix-coredump-of-att.patch | 8 +- ...upport-space-in-volume-mount-and-env.patch | 14 +- ...fifos-Add-terminal-fifos-dynamically.patch | 36 ++--- 0046-Do-not-test-cgroup-writeable.patch | 8 +- ...mory-leak-in-lxc_global_config_value.patch | 10 +- ...r-ONLCR-flag-from-master-of-terminal.patch | 8 +- ...-Add-100ms-timeout-for-console-epoll.patch | 8 +- ...ules-for-specified-architecture-only.patch | 10 +- 0051-if-ocihook-is-empty.patch | 8 +- ...mp-fail-when-all-specified-in-config.patch | 10 +- ...estroy-empty-cgroup-path-return-ture.patch | 8 +- 0054-fix-invalid-log-message.patch | 10 +- 0055-Fix-compile-error.patch | 22 +-- ...INUX_CAPABILITY_VERSION_3-to-set-cap.patch | 10 +- 0057-confile-add-support-umask.patch | 14 +- ...not-check-ppid-when-set-death-signal.patch | 8 +- 0059-delete-unused-variable-ppid.patch | 8 +- ...le-to-write-console-log-of-container.patch | 26 +-- ...e-the-path-args-envs-execvp-dirctory.patch | 8 +- ...fore-set-read-only-path-and-masked-p.patch | 8 +- ...ignore-systemcall-load-failure-error.patch | 8 +- ...-Reduce-seccomp-processing-log-level.patch | 8 +- ...eturn-true-if-storage_init-init-fail.patch | 8 +- ...oes-not-report-an-error-after-execut.patch | 8 +- ...t-error-when-remove-directory-failed.patch | 10 +- ...tdout-stderr-log-of-container-consol.patch | 52 +++--- ...esses-if-container-shared-pid-namesp.patch | 12 +- ...rocess-for-shared-container-when-con.patch | 12 +- ...-path-according-to-cgroup-mountpoint.patch | 16 +- 0072-lxc-adapt-to-docker-18.09.patch | 10 +- 0073-lxc-support-set-additional-groups.patch | 24 +-- 0074-lxc-only-add-valid-fd-to-mainloop.patch | 8 +- 0075-lxc-add-timeout-for-attach.patch | 32 ++-- 0076-lxc-delete-unused-variable.patch | 8 +- ...-files.limit-to-max-and-fix-bug-of-s.patch | 12 +- 0078-Run-pre-start-hook-before-chroot.patch | 12 +- ...inherid-env-from-parent-in-oci-hooks.patch | 8 +- 0080-lxc-fix-compile-error.patch | 8 +- ...c-Change-the-range-of-attach-timeout.patch | 14 +- ...-lxc-fix-memory-leak-cause-by-setenv.patch | 10 +- 0083-lxc-free-lxc-handler.patch | 8 +- 0084-lxc-memory-leak-of-lxc_grow_array.patch | 8 +- 0085-lxc-update-json-file-from-isulad.patch | 26 +-- 0086-confile-add-support-systemd.patch | 14 +- 0087-lxc-adapt-to-spec-of-oci-hook.patch | 8 +- 0088-fix-lxc-build-error.patch | 8 +- ...dd-get-container-processes-pids-func.patch | 20 +-- 0090-lxc-remove-unused-variable.patch | 8 +- ...spaced-kernel-params-can-be-changed-.patch | 10 +- ...put-error-when-create-unified-cgroup.patch | 8 +- 0093-optimize-isulad_kit-operator.patch | 22 +-- 0094-exec-load-uid-gid-and-groups.patch | 14 +- ...e-unified-hierarchy-for-the-systemd-.patch | 8 +- 0096-close-inherited-fd-in-hook-process.patch | 8 +- ...error-when-fork-exec-error-for-hooks.patch | 8 +- ...d-mount-from-host-tmpfs-for-system-c.patch | 8 +- ...al-do-not-close-the-master-fd-of-pty.patch | 8 +- 0100-start-add-check-save-pid-info-file.patch | 14 +- 0101-lxc-fix-code-error.patch | 64 ++++---- 0102-lxc-fix-compile-warnings.patch | 12 +- 0103-lxc-fix-code-error-in-conf.c.patch | 10 +- 0104-lxc-fix-code-error.patch | 18 +-- 0105-lxc-fix-code-error-warnings.patch | 12 +- ...t-to-1s-for-cmds-send-to-lxc-monitor.patch | 8 +- 0107-add-log-for-failure-of-rename-file.patch | 8 +- 0108-check-calloc-input-valid.patch | 8 +- 0109-add-secure-compile-flags-to-lxc.patch | 10 +- 0110-add-doc-for-lxc.patch | 8 +- ...xc-use-safe_strdup-instead-of-strdup.patch | 58 +++---- 0112-fix-secure-errors.patch | 16 +- ...-Malloc-parameter-check-and-judgment.patch | 58 +++---- 0114-lxc-fix-code-errors.patch | 14 +- 0115-fix-compile-error-on-ubuntu.patch | 34 ++-- 0116-lxc-set-base-cgroup-path-to.patch | 8 +- ...ce-with-dir-mode-750-and-set-uid-gid.patch | 10 +- 0118-fix-sscanf-return-value-check.patch | 10 +- 0119-remove-unuse-binary.patch | 8 +- 0120-remove-unuse-unmount-namespace.patch | 8 +- ...timize-log-when-root-path-is-invalid.patch | 8 +- 0122-lxc-fix-code-reivew-errors.patch | 20 +-- ...-in-accordance-with-hook-spec-in-oci.patch | 81 ++++++++++ ...ose-maincmd-fd-before-destroy-cgroup.patch | 102 ++++++++++++ 0125-lxc-fix-strcat-bug-in-cleanpath.patch | 28 ++++ 0126-add-user-option-for-lxc-attach.patch | 134 +++++++++++++++ ...y-write-size-begin-if-buffer-is-full.patch | 26 +++ 0128-link-proc-mounts-to-etc-mtab.patch | 77 +++++++++ 0129-cgfsng-add-retry-for-enter-cgroup.patch | 70 ++++++++ ...intf-create-abstract-socket-name-bug.patch | 26 +++ ...ommands-and-terminal-memory-leak-bug.patch | 43 +++++ lxc.spec | 152 +++--------------- 132 files changed, 1569 insertions(+), 1096 deletions(-) create mode 100644 0123-in-accordance-with-hook-spec-in-oci.patch create mode 100644 0124-lxc-close-maincmd-fd-before-destroy-cgroup.patch create mode 100644 0125-lxc-fix-strcat-bug-in-cleanpath.patch create mode 100644 0126-add-user-option-for-lxc-attach.patch create mode 100644 0127-log-only-write-size-begin-if-buffer-is-full.patch create mode 100644 0128-link-proc-mounts-to-etc-mtab.patch create mode 100644 0129-cgfsng-add-retry-for-enter-cgroup.patch create mode 100644 0130-fix-snprintf-create-abstract-socket-name-bug.patch create mode 100644 0131-fix-commands-and-terminal-memory-leak-bug.patch diff --git a/0001-confile-add-lxc.isulad.init.args-config-interface.patch b/0001-confile-add-lxc.isulad.init.args-config-interface.patch index 66ccc2b..d0f4300 100644 --- a/0001-confile-add-lxc.isulad.init.args-config-interface.patch +++ b/0001-confile-add-lxc.isulad.init.args-config-interface.patch @@ -1,21 +1,21 @@ -From a6f57fc8bbe7b0e2d2d77f300c3c84a2956634b6 Mon Sep 17 00:00:00 2001 +From 093ea5bade9dbe2bf585b3627a21f144a3a9cd35 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 10 Jan 2019 06:54:37 -0500 -Subject: [PATCH 001/122] confile: add lxc.isulad.init.args config interface +Subject: [PATCH 001/131] confile: add lxc.isulad.init.args config interface lxc.isulad.init.args config interface is used to specify the args for the container. Signed-off-by: LiFeng --- - src/lxc/conf.c | 13 +++++++++++ - src/lxc/conf.h | 8 +++++++ - src/lxc/confile.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/lxccontainer.c | 30 +++++++++++++++++++++++++ + src/lxc/conf.c | 13 +++++++++ + src/lxc/conf.h | 8 ++++++ + src/lxc/confile.c | 61 ++++++++++++++++++++++++++++++++++++++++++ + src/lxc/lxccontainer.c | 30 +++++++++++++++++++++ 4 files changed, 112 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index d95bc4c..f20d629 100644 +index d95bc4c7..f20d6297 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4014,6 +4014,18 @@ void lxc_clear_includes(struct lxc_conf *conf) @@ -46,7 +46,7 @@ index d95bc4c..f20d629 100644 free(conf->cgroup_meta.controllers); free(conf); diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 41f67cf..95c3027 100644 +index 41f67cff..95c30270 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -376,6 +376,10 @@ struct lxc_conf { @@ -70,7 +70,7 @@ index 41f67cf..95c3027 100644 + #endif /* __LXC_CONF_H */ diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 05c6823..7297b35 100644 +index 05c68231..7297b358 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -150,6 +150,10 @@ lxc_config_define(tty_dir); @@ -170,7 +170,7 @@ index 05c6823..7297b35 100644 struct lxc_conf *c, void *data) { diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index ad70886..b4cacce 100644 +index ad70886e..b4cacce2 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -847,6 +847,31 @@ static bool wait_on_daemonized_start(struct lxc_handler *handler, int pid) @@ -218,5 +218,5 @@ index ad70886..b4cacce 100644 if (!argv) { if (useinit) { -- -1.8.3.1 +2.23.0 diff --git a/0002-namespace-add-support-share-namespace-by-path.patch b/0002-namespace-add-support-share-namespace-by-path.patch index 87c2c5c..9f0b2a9 100644 --- a/0002-namespace-add-support-share-namespace-by-path.patch +++ b/0002-namespace-add-support-share-namespace-by-path.patch @@ -1,7 +1,7 @@ -From d1e8ab945fadac5ee11eb150b1cdfb6aeec407c2 Mon Sep 17 00:00:00 2001 +From 342207f0766c7937082e0fca7375acd54c77f03b Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 10 Jan 2019 08:42:19 -0500 -Subject: [PATCH 002/122] namespace: add support share namespace by path +Subject: [PATCH 002/131] namespace: add support share namespace by path Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 11 insertions(+) diff --git a/src/lxc/confile_utils.c b/src/lxc/confile_utils.c -index 7280463..9049ce8 100644 +index 7280463f..9049ce82 100644 --- a/src/lxc/confile_utils.c +++ b/src/lxc/confile_utils.c @@ -789,6 +789,17 @@ int lxc_inherit_namespace(const char *lxcname_or_pid, const char *lxcpath, @@ -31,5 +31,5 @@ index 7280463..9049ce8 100644 if (lastslash) { dup = strdup(lxcname_or_pid); -- -1.8.3.1 +2.23.0 diff --git a/0003-confile-add-lxc.isulad.populate.device-interface.patch b/0003-confile-add-lxc.isulad.populate.device-interface.patch index 4dd2ad8..548c73a 100644 --- a/0003-confile-add-lxc.isulad.populate.device-interface.patch +++ b/0003-confile-add-lxc.isulad.populate.device-interface.patch @@ -1,17 +1,17 @@ -From 8a8f3a04e8a6f3494a072ffe0cc9124049c5ba63 Mon Sep 17 00:00:00 2001 +From 5229766b8f1ef3802ae4ae3d44da693b25155113 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Fri, 11 Jan 2019 01:51:25 -0500 -Subject: [PATCH 003/122] confile: add lxc.isulad.populate.device interface +Subject: [PATCH 003/131] confile: add lxc.isulad.populate.device interface Signed-off-by: LiFeng --- - src/lxc/conf.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++--- - src/lxc/conf.h | 28 +++++++++++- - src/lxc/confile.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/conf.c | 125 +++++++++++++++++++++++++++++++++++++++++++--- + src/lxc/conf.h | 28 ++++++++++- + src/lxc/confile.c | 124 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 269 insertions(+), 8 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index f20d629..20b7aba 100644 +index f20d6297..20b7abab 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2745,6 +2745,10 @@ struct lxc_conf *lxc_conf_init(void) @@ -184,13 +184,14 @@ index f20d629..20b7aba 100644 } diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 95c3027..cced868 100644 +index 95c30270..cced868c 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h -@@ -171,6 +171,26 @@ struct lxc_rootfs { +@@ -170,6 +170,26 @@ struct lxc_rootfs { + char *data; }; - /* ++/* + * iSulad: Defines a structure to store the devices which will + * be attached in container + * @name : the target device name in container @@ -210,10 +211,9 @@ index 95c3027..cced868 100644 +}; + + -+/* + /* * Automatic mounts for LXC to perform inside the container */ - enum { @@ -377,9 +397,13 @@ struct lxc_conf { /* procs */ struct lxc_list procs; @@ -239,7 +239,7 @@ index 95c3027..cced868 100644 #endif /* __LXC_CONF_H */ diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 7297b35..e3212d3 100644 +index 7297b358..e3212d3d 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -152,6 +152,7 @@ lxc_config_define(sysctl); @@ -402,5 +402,5 @@ index 7297b35..e3212d3 100644 struct lxc_conf *c, void *data) { -- -1.8.3.1 +2.23.0 diff --git a/0004-support-isulad-fifo-log.patch b/0004-support-isulad-fifo-log.patch index b328314..dd3445c 100644 --- a/0004-support-isulad-fifo-log.patch +++ b/0004-support-isulad-fifo-log.patch @@ -1,7 +1,7 @@ -From e5e1a628b279c604fe5eaf0cc6646e6510dfe6f7 Mon Sep 17 00:00:00 2001 +From 1e2ac640b439da580d364e69ebdd2cfc344c6cd5 Mon Sep 17 00:00:00 2001 From: liuhao Date: Fri, 11 Jan 2019 16:11:34 +0800 -Subject: [PATCH 004/122] support isulad fifo log +Subject: [PATCH 004/131] support isulad fifo log support isulad fifo log in lxc3.0 @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c -index 1e0cc6a..4e74459 100644 +index 1e0cc6a6..4e744599 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -68,6 +68,7 @@ static int syslog_enable = 0; @@ -92,5 +92,5 @@ index 1e0cc6a..4e74459 100644 ERROR("Failed to enable logfile"); return -1; -- -1.8.3.1 +2.23.0 diff --git a/0005-auto-mount-cgroup-sys-and-proc.patch b/0005-auto-mount-cgroup-sys-and-proc.patch index 192542d..7773afb 100644 --- a/0005-auto-mount-cgroup-sys-and-proc.patch +++ b/0005-auto-mount-cgroup-sys-and-proc.patch @@ -1,7 +1,7 @@ -From f3c5a99c7bd1ecef02051489a97cbe0a1def254f Mon Sep 17 00:00:00 2001 +From 5dfe223c483c298557604c2314ef757d4c147b66 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 10 Jan 2019 20:40:19 +0800 -Subject: [PATCH 005/122] auto mount cgroup sys and proc +Subject: [PATCH 005/131] auto mount cgroup sys and proc Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index acc6c30..aff2b5e 100644 +index acc6c309..aff2b5e1 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1648,6 +1648,10 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -36,7 +36,7 @@ index acc6c30..aff2b5e 100644 if (ret < 0) { free(controllerpath); diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 20b7aba..18753d1 100644 +index 20b7abab..18753d18 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -670,8 +670,8 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha @@ -76,5 +76,5 @@ index 20b7aba..18753d1 100644 r = 0; } else if (r < 0) { -- -1.8.3.1 +2.23.0 diff --git a/0006-conf.c-fix-bug-when-set-no-ro-mount-mount-propagatio.patch b/0006-conf.c-fix-bug-when-set-no-ro-mount-mount-propagatio.patch index 2c549ef..9982521 100644 --- a/0006-conf.c-fix-bug-when-set-no-ro-mount-mount-propagatio.patch +++ b/0006-conf.c-fix-bug-when-set-no-ro-mount-mount-propagatio.patch @@ -1,7 +1,7 @@ -From 32f9ca00819b53c1f3bc933da8d489b3766c184d Mon Sep 17 00:00:00 2001 +From d0ea541f9360eed1cb6beb91a0e69f1afa0b5031 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Fri, 11 Jan 2019 16:55:01 +0800 -Subject: [PATCH 006/122] conf.c: fix bug when set no ro mount, mount +Subject: [PATCH 006/131] conf.c: fix bug when set no ro mount, mount propagation will be skipped Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 18753d1..37a5ff7 100644 +index 18753d18..37a5ff79 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2087,6 +2087,9 @@ static int mount_entry(const char *fsname, const char *target, @@ -35,5 +35,5 @@ index 18753d1..37a5ff7 100644 srcpath ? srcpath : "(null)", target, fstype); -- -1.8.3.1 +2.23.0 diff --git a/0007-use-isulad-log-format.patch b/0007-use-isulad-log-format.patch index e71c533..55fcc41 100644 --- a/0007-use-isulad-log-format.patch +++ b/0007-use-isulad-log-format.patch @@ -1,7 +1,7 @@ -From efd10df536bcbfa56369c82bda4adc77b0ea7240 Mon Sep 17 00:00:00 2001 +From 1958525ba64c9f2f255e5e0bc098eeaf7cbfc383 Mon Sep 17 00:00:00 2001 From: liuhao Date: Fri, 11 Jan 2019 17:00:48 +0800 -Subject: [PATCH 007/122] use isulad log format +Subject: [PATCH 007/131] use isulad log format use isulad log format @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c -index 4e74459..91fb7ef 100644 +index 4e744599..91fb7efa 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -139,6 +139,7 @@ static char *lxc_log_get_va_msg(struct lxc_log_event *event) @@ -70,5 +70,5 @@ index 4e74459..91fb7ef 100644 return ret; -- -1.8.3.1 +2.23.0 diff --git a/0008-isulad-modify-exit-code-and-stop-signal.patch b/0008-isulad-modify-exit-code-and-stop-signal.patch index 02516d7..b76dcb2 100644 --- a/0008-isulad-modify-exit-code-and-stop-signal.patch +++ b/0008-isulad-modify-exit-code-and-stop-signal.patch @@ -1,7 +1,7 @@ -From a5754c856857cee09e307e4e8459e8e99167e46a Mon Sep 17 00:00:00 2001 +From ca497ede318c29a609f7d4bfe0747b6253cb77fc Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Fri, 11 Jan 2019 17:44:53 +0800 -Subject: [PATCH 008/122] isulad: modify exit code and stop signal +Subject: [PATCH 008/131] isulad: modify exit code and stop signal 1. modify default stop signal and disable reboot by signal. 2. send '128 + signal' if container is killed by signal. @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index b4cacce..1d7f5be 100644 +index b4cacce2..1d7f5bea 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2069,7 +2069,8 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout) @@ -39,7 +39,7 @@ index b4cacce..1d7f5be 100644 /* Add a new state client before sending the shutdown signal so that we * don't miss a state. diff --git a/src/lxc/start.c b/src/lxc/start.c -index 72e2de2..d64bdac 100644 +index 72e2de27..d64bdac1 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1893,11 +1893,14 @@ out_abort: @@ -102,5 +102,5 @@ index 72e2de2..d64bdac 100644 if (error_num) *error_num = handler->exit_status; -- -1.8.3.1 +2.23.0 diff --git a/0009-lxc_start-add-default-terminal-fifos.patch b/0009-lxc_start-add-default-terminal-fifos.patch index ecc7c0e..58b7837 100644 --- a/0009-lxc_start-add-default-terminal-fifos.patch +++ b/0009-lxc_start-add-default-terminal-fifos.patch @@ -1,23 +1,23 @@ -From ca1b4a1738d4c409ddabbc5e75b8da7438b2792f Mon Sep 17 00:00:00 2001 +From fc179b0e5abb9dfe444343e81ef50e69cbc678cd Mon Sep 17 00:00:00 2001 From: LiFeng Date: Fri, 11 Jan 2019 21:52:11 -0500 -Subject: [PATCH 009/122] lxc_start: add default terminal fifos +Subject: [PATCH 009/131] lxc_start: add default terminal fifos Signed-off-by: LiFeng --- src/lxc/conf.c | 4 + - src/lxc/lxccontainer.c | 30 +++++++ - src/lxc/lxccontainer.h | 10 +++ - src/lxc/terminal.c | 194 +++++++++++++++++++++++++++++++++++++++++++++- + src/lxc/lxccontainer.c | 30 ++++++ + src/lxc/lxccontainer.h | 10 ++ + src/lxc/terminal.c | 194 +++++++++++++++++++++++++++++++++++++- src/lxc/terminal.h | 16 ++++ - src/lxc/tools/arguments.h | 5 ++ + src/lxc/tools/arguments.h | 5 + src/lxc/tools/lxc_start.c | 11 +++ - src/lxc/utils.c | 23 ++++++ + src/lxc/utils.c | 23 +++++ src/lxc/utils.h | 4 + 9 files changed, 294 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 37a5ff7..7b7f95b 100644 +index 37a5ff79..7b7f95b7 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2714,6 +2714,10 @@ struct lxc_conf *lxc_conf_init(void) @@ -32,7 +32,7 @@ index 37a5ff7..7b7f95b 100644 new->nbd_idx = -1; new->rootfs.mount = strdup(default_rootfs_mount); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 1d7f5be..318c71e 100644 +index 1d7f5bea..318c71e6 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -4961,6 +4961,33 @@ out: @@ -80,7 +80,7 @@ index 1d7f5be..318c71e 100644 err: diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 9e06215..486531e 100644 +index 9e06215c..486531e5 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -847,6 +847,16 @@ struct lxc_container { @@ -101,7 +101,7 @@ index 9e06215..486531e 100644 /*! diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 4060e7f..c507712 100644 +index 4060e7f9..c5077122 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -364,6 +364,20 @@ static int lxc_terminal_write_log_file(struct lxc_terminal *terminal, char *buf, @@ -382,7 +382,7 @@ index 4060e7f..c507712 100644 int lxc_terminal_map_ids(struct lxc_conf *c, struct lxc_terminal *terminal) diff --git a/src/lxc/terminal.h b/src/lxc/terminal.h -index bfd271f..d25da65 100644 +index bfd271f4..d25da657 100644 --- a/src/lxc/terminal.h +++ b/src/lxc/terminal.h @@ -115,6 +115,17 @@ struct lxc_terminal { @@ -414,7 +414,7 @@ index bfd271f..d25da65 100644 + #endif /* __LXC_TERMINAL_H */ diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index 810050a..b7af2b5 100644 +index 810050ad..b7af2b51 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -62,6 +62,7 @@ struct lxc_arguments { @@ -437,7 +437,7 @@ index 810050a..b7af2b5 100644 extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, char *const argv[]); diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 4553cb5..8f03f11 100644 +index 4553cb5c..8f03f111 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -69,6 +69,8 @@ static const struct option my_longopts[] = { @@ -473,7 +473,7 @@ index 4553cb5..8f03f11 100644 err = c->start(c, 0, NULL) ? EXIT_SUCCESS : EXIT_FAILURE; else diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 6e9165a..67c3b3e 100644 +index 6e9165ae..67c3b3ef 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -611,6 +611,19 @@ bool dir_exists(const char *path) @@ -514,7 +514,7 @@ index 6e9165a..67c3b3e 100644 { int ret; diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 94196d0..2d38178 100644 +index 94196d09..2d38178c 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -147,6 +147,8 @@ extern gid_t get_ns_gid(gid_t orig); @@ -534,5 +534,5 @@ index 94196d0..2d38178 100644 + #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0010-Save-pid-ppid-info-into-file-for-isulad.patch b/0010-Save-pid-ppid-info-into-file-for-isulad.patch index b36818a..20da2a9 100644 --- a/0010-Save-pid-ppid-info-into-file-for-isulad.patch +++ b/0010-Save-pid-ppid-info-into-file-for-isulad.patch @@ -1,23 +1,23 @@ -From 25c94a75d742ee2c66d431ebf73c9cd0fc2e4f42 Mon Sep 17 00:00:00 2001 +From 091e9a9121c04a96a3d8a227a133ca6616f0b86f Mon Sep 17 00:00:00 2001 From: LiFeng Date: Fri, 11 Jan 2019 22:53:56 -0500 -Subject: [PATCH 010/122] Save pid/ppid info into file for isulad +Subject: [PATCH 010/131] Save pid/ppid info into file for isulad Signed-off-by: LiFeng --- src/lxc/conf.c | 1 + src/lxc/conf.h | 2 + - src/lxc/lxccontainer.c | 24 ++++++++++ + src/lxc/lxccontainer.c | 24 ++++++++ src/lxc/lxccontainer.h | 10 ++++ - src/lxc/start.c | 41 +++++++++++++++++ + src/lxc/start.c | 41 ++++++++++++++ src/lxc/tools/arguments.h | 2 + - src/lxc/tools/lxc_start.c | 20 ++++++++ - src/lxc/utils.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/utils.h | 66 +++++++++++++++++++++++++++ + src/lxc/tools/lxc_start.c | 20 +++++++ + src/lxc/utils.c | 114 ++++++++++++++++++++++++++++++++++++++ + src/lxc/utils.h | 66 ++++++++++++++++++++++ 9 files changed, 280 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 7b7f95b..0b4b63b 100644 +index 7b7f95b7..0b4b63b8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4194,6 +4194,7 @@ void lxc_conf_free(struct lxc_conf *conf) @@ -29,7 +29,7 @@ index 7b7f95b..0b4b63b 100644 free(conf); } diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index cced868..e0954f9 100644 +index cced868c..e0954f92 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -403,6 +403,8 @@ struct lxc_conf { @@ -42,7 +42,7 @@ index cced868..e0954f9 100644 }; diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 318c71e..5679b9b 100644 +index 318c71e6..5679b9b4 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -4988,6 +4988,29 @@ static bool do_lxcapi_set_terminal_default_fifos(struct lxc_container *c, const @@ -84,7 +84,7 @@ index 318c71e..5679b9b 100644 return c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 486531e..3c845fe 100644 +index 486531e5..3c845fea 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -857,6 +857,16 @@ struct lxc_container { @@ -105,7 +105,7 @@ index 486531e..3c845fe 100644 /*! diff --git a/src/lxc/start.c b/src/lxc/start.c -index d64bdac..9d71dd7 100644 +index d64bdac1..9d71dd79 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1553,6 +1553,39 @@ static inline int do_share_ns(void *arg) @@ -164,7 +164,7 @@ index d64bdac..9d71dd7 100644 if (handler->ns_on_clone_flags & ns_info[i].clone_flag) INFO("Cloned %s", ns_info[i].flag_name); diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index b7af2b5..b6df23f 100644 +index b7af2b51..b6df23f8 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -63,6 +63,7 @@ struct lxc_arguments { @@ -184,7 +184,7 @@ index b7af2b5..b6df23f 100644 extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 8f03f11..2f94d67 100644 +index 8f03f111..2f94d671 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -69,8 +69,11 @@ static const struct option my_longopts[] = { @@ -244,7 +244,7 @@ index 8f03f11..2f94d67 100644 exit(err); } diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 67c3b3e..4728284 100644 +index 67c3b3ef..4728284f 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1828,3 +1828,117 @@ int lxc_setup_keyring(void) @@ -366,7 +366,7 @@ index 67c3b3e..4728284 100644 +} + diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 2d38178..8e4ed89 100644 +index 2d38178c..8e4ed894 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -56,6 +56,71 @@ extern char *get_rundir(void); @@ -449,5 +449,5 @@ index 2d38178..8e4ed89 100644 #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0011-Add-exit-FIFO-to-monitor-state-of-lxc-monitor.patch b/0011-Add-exit-FIFO-to-monitor-state-of-lxc-monitor.patch index 5e2454a..954178a 100644 --- a/0011-Add-exit-FIFO-to-monitor-state-of-lxc-monitor.patch +++ b/0011-Add-exit-FIFO-to-monitor-state-of-lxc-monitor.patch @@ -1,7 +1,7 @@ -From dab4938915c64b201434719712dd5222a11b9dcf Mon Sep 17 00:00:00 2001 +From 8d93081e3d8384dbb2b2b5dd14d02b0394af8c15 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Sat, 12 Jan 2019 02:07:15 -0500 -Subject: [PATCH 011/122] Add exit FIFO to monitor state of [lxc monitor] +Subject: [PATCH 011/131] Add exit FIFO to monitor state of [lxc monitor] Signed-off-by: LiFeng --- @@ -18,7 +18,7 @@ Signed-off-by: LiFeng 10 files changed, 59 insertions(+), 7 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 0b4b63b..bc45e44 100644 +index 0b4b63b8..bc45e448 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2759,6 +2759,7 @@ struct lxc_conf *lxc_conf_init(void) @@ -39,7 +39,7 @@ index 0b4b63b..bc45e44 100644 free(conf); } diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index e0954f9..2d939cd 100644 +index e0954f92..2d939cd2 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -405,6 +405,8 @@ struct lxc_conf { @@ -52,7 +52,7 @@ index e0954f9..2d939cd 100644 }; diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index e3212d3..cbef2e2 100644 +index e3212d3d..cbef2e21 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -240,10 +240,10 @@ static struct lxc_config_t config_jump_table[] = { @@ -71,7 +71,7 @@ index e3212d3..cbef2e2 100644 static const size_t config_jump_table_size = sizeof(config_jump_table) / sizeof(struct lxc_config_t); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 5679b9b..8029f33 100644 +index 5679b9b4..8029f339 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -295,6 +295,10 @@ static void lxc_container_free(struct lxc_container *c) @@ -123,7 +123,7 @@ index 5679b9b..8029f33 100644 sizeof(keepfds) / sizeof(keepfds[0])); if (ret < 0) { diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 3c845fe..503038a 100644 +index 3c845fea..503038af 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -81,6 +81,12 @@ struct lxc_container { @@ -140,7 +140,7 @@ index 3c845fe..503038a 100644 * \private * Container semaphore lock. diff --git a/src/lxc/start.c b/src/lxc/start.c -index 9d71dd7..9365d11 100644 +index 9d71dd79..9365d116 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -730,6 +730,7 @@ struct lxc_handler *lxc_init_handler(const char *name, struct lxc_conf *conf, @@ -175,7 +175,7 @@ index 9d71dd7..9365d11 100644 out_fini: lxc_delete_network(handler); diff --git a/src/lxc/start.h b/src/lxc/start.h -index df987dc..f59bf54 100644 +index df987dcb..f59bf549 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -133,6 +133,8 @@ struct lxc_handler { @@ -188,7 +188,7 @@ index df987dc..f59bf54 100644 struct execute_args { diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index c507712..508e2e6 100644 +index c5077122..508e2e67 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -1004,8 +1004,8 @@ static int lxc_terminal_set_fifo(struct lxc_terminal *console, const char *in, c @@ -203,7 +203,7 @@ index c507712..508e2e6 100644 return lxc_terminal_set_fifo(terminal, terminal->init_fifo[0], terminal->init_fifo[1]); diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index b6df23f..61f4a0a 100644 +index b6df23f8..61f4a0a7 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -64,6 +64,7 @@ struct lxc_arguments { @@ -223,7 +223,7 @@ index b6df23f..61f4a0a 100644 extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 2f94d67..60c7d70 100644 +index 2f94d671..60c7d70b 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -73,6 +73,7 @@ static const struct option my_longopts[] = { @@ -257,5 +257,5 @@ index 2f94d67..60c7d70 100644 if (!c->set_config_item(c, "lxc.console.path", my_args.console)) goto out; -- -1.8.3.1 +2.23.0 diff --git a/0012-Init-fifos-in-lxc_attach_terminal.patch b/0012-Init-fifos-in-lxc_attach_terminal.patch index 1e2815a..2a6babf 100644 --- a/0012-Init-fifos-in-lxc_attach_terminal.patch +++ b/0012-Init-fifos-in-lxc_attach_terminal.patch @@ -1,7 +1,7 @@ -From 1ea4f8a2c3d3070fa9aafd9f055bed3b9018198b Mon Sep 17 00:00:00 2001 +From bcd44e3419e34357a47e54ed30b2091648aabb03 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Sat, 12 Jan 2019 03:23:53 -0500 -Subject: [PATCH 012/122] Init fifos in lxc_attach_terminal +Subject: [PATCH 012/131] Init fifos in lxc_attach_terminal Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 508e2e6..410f643 100644 +index 508e2e67..410f643c 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -1341,6 +1341,10 @@ void lxc_terminal_init(struct lxc_terminal *terminal) @@ -24,5 +24,5 @@ index 508e2e6..410f643 100644 /* isulad: judge the fd whether is fifo */ -- -1.8.3.1 +2.23.0 diff --git a/0013-isulad-set-env-home-in-container.patch b/0013-isulad-set-env-home-in-container.patch index c78deaf..c7a6e23 100644 --- a/0013-isulad-set-env-home-in-container.patch +++ b/0013-isulad-set-env-home-in-container.patch @@ -1,7 +1,7 @@ -From 4fad66dc56b5863b3e272408b265eddf244434ef Mon Sep 17 00:00:00 2001 +From 7c8ec2cca91b15442f58a32c986f00b7064253ca Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sat, 12 Jan 2019 14:42:27 +0800 -Subject: [PATCH 013/122] isulad: set env home in container +Subject: [PATCH 013/131] isulad: set env home in container Signed-off-by: LiFeng --- @@ -14,7 +14,7 @@ Signed-off-by: LiFeng 6 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index e7ba705..2bbf1eb 100644 +index e7ba705c..2bbf1eb5 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -876,6 +876,11 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -30,7 +30,7 @@ index e7ba705..2bbf1eb 100644 init_ctx->container->lxc_conf->no_new_privs) || (options->attach_flags & LXC_ATTACH_NO_NEW_PRIVS)) { diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index aff2b5e..3e702b3 100644 +index aff2b5e1..3e702b34 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1704,8 +1704,9 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -46,7 +46,7 @@ index aff2b5e..3e702b3 100644 if (ret < 0) { free(controllerpath); diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index bc45e44..5065e69 100644 +index bc45e448..5065e697 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3680,7 +3680,7 @@ int lxc_setup(struct lxc_handler *handler) @@ -59,7 +59,7 @@ index bc45e44..5065e69 100644 ret = setup_mount_entries(lxc_conf, &lxc_conf->rootfs, &lxc_conf->mount_list, name, lxcpath); diff --git a/src/lxc/start.c b/src/lxc/start.c -index 9365d11..b13326c 100644 +index 9365d116..b13326ce 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1398,6 +1398,10 @@ static int do_start(void *data) @@ -74,7 +74,7 @@ index 9365d11..b13326c 100644 if (new_uid == nsuid) new_uid = LXC_INVALID_UID; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 4728284..74e74a1 100644 +index 4728284f..74e74a15 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -45,6 +45,7 @@ @@ -121,7 +121,7 @@ index 4728284..74e74a1 100644 static int lxc_file2str(const char *filename, char ret[], int cap) { diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 8e4ed89..364bf67 100644 +index 8e4ed894..364bf672 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -309,6 +309,9 @@ extern int fd_cloexec(int fd, bool cloexec); @@ -135,5 +135,5 @@ index 8e4ed89..364bf67 100644 extern int unsigned long long lxc_get_process_startat(pid_t pid); -- -1.8.3.1 +2.23.0 diff --git a/0014-support-rotate-for-container-log-file.patch b/0014-support-rotate-for-container-log-file.patch index 318276c..f52b57b 100644 --- a/0014-support-rotate-for-container-log-file.patch +++ b/0014-support-rotate-for-container-log-file.patch @@ -1,7 +1,7 @@ -From e30d1a025a5f74c90a60a36fb6b61ccce18b88cf Mon Sep 17 00:00:00 2001 +From e5a0cdcd196da8697a2a83f8122245d29c90247c Mon Sep 17 00:00:00 2001 From: liuhao Date: Sat, 12 Jan 2019 15:29:56 +0800 -Subject: [PATCH 014/122] support rotate for container log file +Subject: [PATCH 014/131] support rotate for container log file support rotate for container log file @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 2 files changed, 43 insertions(+) diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index cbef2e2..e782211 100644 +index cbef2e21..e7822115 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -1802,11 +1802,14 @@ static int set_config_console_rotate(const char *key, const char *value, @@ -31,7 +31,7 @@ index cbef2e2..e782211 100644 return 0; } diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 410f643..3bb3a52 100644 +index 410f643c..3bb3a52a 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -229,6 +229,39 @@ static int lxc_terminal_truncate_log_file(struct lxc_terminal *terminal) @@ -89,5 +89,5 @@ index 410f643..3bb3a52 100644 tmp = alloca(len); -- -1.8.3.1 +2.23.0 diff --git a/0015-fix-high-gcc-compile-bug.patch b/0015-fix-high-gcc-compile-bug.patch index af55a22..4dbd698 100644 --- a/0015-fix-high-gcc-compile-bug.patch +++ b/0015-fix-high-gcc-compile-bug.patch @@ -1,7 +1,7 @@ -From d4c2a04690f61c6d42c69f53b96cc039e94d5256 Mon Sep 17 00:00:00 2001 +From 887c38c0198592051e2323d8c2921f5ec4c22741 Mon Sep 17 00:00:00 2001 From: liuhao Date: Sat, 12 Jan 2019 16:28:41 +0800 -Subject: [PATCH 015/122] fix high gcc compile bug +Subject: [PATCH 015/131] fix high gcc compile bug fix high gcc compile bug @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 3bb3a52..7aa4730 100644 +index 3bb3a52a..7aa47309 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -235,18 +235,18 @@ static int lxc_terminal_truncate_log_file(struct lxc_terminal *terminal) @@ -37,5 +37,5 @@ index 3bb3a52..7aa4730 100644 free(rename_fname); return -EFBIG; -- -1.8.3.1 +2.23.0 diff --git a/0016-add-masked-paths-and-ro-paths.patch b/0016-add-masked-paths-and-ro-paths.patch index 373a8a0..f845ba1 100644 --- a/0016-add-masked-paths-and-ro-paths.patch +++ b/0016-add-masked-paths-and-ro-paths.patch @@ -1,17 +1,17 @@ -From 478dfb4eadd6812bd63fc0d37cf1acad21a58e6a Mon Sep 17 00:00:00 2001 +From 8ae551897a4ab1c56019767640d0600eaebc993d Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sat, 12 Jan 2019 15:55:52 +0800 -Subject: [PATCH 016/122] add masked paths and ro paths +Subject: [PATCH 016/131] add masked paths and ro paths Signed-off-by: LiFeng --- - src/lxc/conf.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/conf.h | 8 ++++ - src/lxc/confile.c | 113 ++++++++++++++++++++++++++++++++++++++++++++- + src/lxc/conf.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/conf.h | 8 +++ + src/lxc/confile.c | 113 +++++++++++++++++++++++++++++++++++++- 3 files changed, 255 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 5065e69..537f956 100644 +index 5065e697..537f956c 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1343,6 +1343,95 @@ static int lxc_mount_rootfs(struct lxc_conf *conf) @@ -185,7 +185,7 @@ index 5065e69..537f956 100644 if (conf->exit_fd != -1) close(conf->exit_fd); diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 2d939cd..7927812 100644 +index 2d939cd2..79278128 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -160,6 +160,8 @@ struct lxc_tty_info { @@ -218,7 +218,7 @@ index 2d939cd..7927812 100644 /* isulad add end */ diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index e782211..e199965 100644 +index e7822115..e1999656 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -139,6 +139,8 @@ lxc_config_define(pty_max); @@ -377,5 +377,5 @@ index e782211..e199965 100644 struct lxc_conf *c, void *data) { -- -1.8.3.1 +2.23.0 diff --git a/0017-isulad-check-cgroup-cpu.shares-after-setted.patch b/0017-isulad-check-cgroup-cpu.shares-after-setted.patch index 46330e8..57d4d42 100644 --- a/0017-isulad-check-cgroup-cpu.shares-after-setted.patch +++ b/0017-isulad-check-cgroup-cpu.shares-after-setted.patch @@ -1,15 +1,15 @@ -From b4cf90f64f23198555372e4d1ca1a1a7ea0ee81f Mon Sep 17 00:00:00 2001 +From 7b916ae46720ce394cc49ee605ae678c73d62640 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 11:03:03 +0800 -Subject: [PATCH 017/122] isulad: check cgroup cpu.shares after setted +Subject: [PATCH 017/131] isulad: check cgroup cpu.shares after setted Signed-off-by: LiFeng --- - src/lxc/cgroups/cgfsng.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/cgroups/cgfsng.c | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 3e702b3..ab5732b 100644 +index 3e702b34..ab5732ba 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2204,6 +2204,42 @@ static int cg_legacy_set_data(struct cgroup_ops *ops, const char *filename, @@ -95,5 +95,5 @@ index 3e702b3..ab5732b 100644 ret = true; -- -1.8.3.1 +2.23.0 diff --git a/0018-lxc-attach-add-support-terminal-fifos.patch b/0018-lxc-attach-add-support-terminal-fifos.patch index a6f8b6e..fe77ed7 100644 --- a/0018-lxc-attach-add-support-terminal-fifos.patch +++ b/0018-lxc-attach-add-support-terminal-fifos.patch @@ -1,22 +1,22 @@ -From d6a38c35cb5986f1263e3dd1b6206217e34a2ec8 Mon Sep 17 00:00:00 2001 +From 1f5b601dcc5ccd9f2699495134d1adfc0473cb18 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 14 Jan 2019 02:18:26 -0500 -Subject: [PATCH 018/122] lxc-attach: add support terminal fifos +Subject: [PATCH 018/131] lxc-attach: add support terminal fifos 1. support terminal fifos to redirect terminal 2. support lxc-attach run in background Signed-off-by: LiFeng --- - src/lxc/attach.c | 18 ++++- + src/lxc/attach.c | 18 +++- src/lxc/attach_options.h | 3 + - src/lxc/terminal.c | 27 +++++-- + src/lxc/terminal.c | 27 ++++-- src/lxc/tools/arguments.h | 2 +- - src/lxc/tools/lxc_attach.c | 181 +++++++++++++++++++++++++++++++++++++++++---- + src/lxc/tools/lxc_attach.c | 181 +++++++++++++++++++++++++++++++++---- 5 files changed, 204 insertions(+), 27 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 2bbf1eb..1886bde 100644 +index 2bbf1eb5..1886bdef 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -988,12 +988,23 @@ on_error: @@ -71,7 +71,7 @@ index 2bbf1eb..1886bde 100644 if (ret < 0) ERROR("Failed to exec"); diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h -index 193fd7e..081618c 100644 +index 193fd7e7..081618cd 100644 --- a/src/lxc/attach_options.h +++ b/src/lxc/attach_options.h @@ -135,6 +135,8 @@ typedef struct lxc_attach_options_t { @@ -92,7 +92,7 @@ index 193fd7e..081618c 100644 /*! diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 7aa4730..ee3aef2 100644 +index 7aa47309..ee3aef21 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -514,7 +514,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_terminal *terminal) @@ -155,7 +155,7 @@ index 7aa4730..ee3aef2 100644 return -1; diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index 61f4a0a..047e9f1 100644 +index 61f4a0a7..047e9f16 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -62,7 +62,7 @@ struct lxc_arguments { @@ -168,7 +168,7 @@ index 61f4a0a..047e9f1 100644 const char *exit_monitor_fifo; /* isulad: fifo used to monitor state of monitor process */ diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 8c8e7d3..6d0ffe5 100644 +index 8c8e7d39..6d0ffe57 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -75,6 +75,8 @@ static const struct option my_longopts[] = { @@ -406,5 +406,5 @@ index 8c8e7d3..6d0ffe5 100644 exit(EXIT_FAILURE); -- -1.8.3.1 +2.23.0 diff --git a/0019-remount-cgroup-readonly-and-make-soft-link-of-subcgr.patch b/0019-remount-cgroup-readonly-and-make-soft-link-of-subcgr.patch index 055fd2f..8a4b4be 100644 --- a/0019-remount-cgroup-readonly-and-make-soft-link-of-subcgr.patch +++ b/0019-remount-cgroup-readonly-and-make-soft-link-of-subcgr.patch @@ -1,16 +1,16 @@ -From bd056022ef54a8dc6a859495f0edde96471bd7e5 Mon Sep 17 00:00:00 2001 +From 9a6ef0c1f9a7d91b7b4362082ad7ae05cc8a1e6b Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 13:51:01 +0800 -Subject: [PATCH 019/122] remount cgroup readonly and make soft link of +Subject: [PATCH 019/131] remount cgroup readonly and make soft link of subcgroup Signed-off-by: LiFeng --- - src/lxc/cgroups/cgfsng.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/cgroups/cgfsng.c | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index ab5732b..705985f 100644 +index ab5732ba..705985f2 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1621,6 +1621,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -83,5 +83,5 @@ index ab5732b..705985f 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0020-fix-log-error-when-symlink-subcgroup.patch b/0020-fix-log-error-when-symlink-subcgroup.patch index ce875dc..3ee1008 100644 --- a/0020-fix-log-error-when-symlink-subcgroup.patch +++ b/0020-fix-log-error-when-symlink-subcgroup.patch @@ -1,7 +1,7 @@ -From ab9da60c84c2b37049e514d7a597fc8747dbc52f Mon Sep 17 00:00:00 2001 +From 43ea109da4ebe985fa1990b0289f41f3ec30c747 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 15:33:12 +0800 -Subject: [PATCH 020/122] fix log error when symlink subcgroup +Subject: [PATCH 020/131] fix log error when symlink subcgroup Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 705985f..7f2a200 100644 +index 705985f2..7f2a200a 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1736,21 +1736,21 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -40,5 +40,5 @@ index 705985f..7f2a200 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0021-lxc-attch-add-error-message.patch b/0021-lxc-attch-add-error-message.patch index f0d7687..cddb831 100644 --- a/0021-lxc-attch-add-error-message.patch +++ b/0021-lxc-attch-add-error-message.patch @@ -1,24 +1,24 @@ -From 54f592ec7a2a79b7e5ecdec5b9bf484536e90438 Mon Sep 17 00:00:00 2001 +From df2061c420b0ca9af3f3248a249458e64d399c12 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 14 Jan 2019 04:29:40 -0500 -Subject: [PATCH 021/122] lxc-attch: add error message +Subject: [PATCH 021/131] lxc-attch: add error message Signed-off-by: LiFeng --- - src/lxc/attach.c | 49 +++++++++++++++++++++++++++++++++++++++++----- + src/lxc/attach.c | 49 ++++++++++++++++++++++++++++++++++---- src/lxc/attach.h | 4 ++-- - src/lxc/attach_options.h | 6 +++--- - src/lxc/conf.c | 27 +++++++++++++++++++++---- + src/lxc/attach_options.h | 6 ++--- + src/lxc/conf.c | 27 +++++++++++++++++---- src/lxc/conf.h | 3 +++ src/lxc/lxccontainer.c | 4 ++-- - src/lxc/tools/lxc_attach.c | 8 ++++---- + src/lxc/tools/lxc_attach.c | 8 +++---- src/lxc/tools/lxc_ls.c | 4 ++-- - src/lxc/utils.c | 21 ++++++++++++++++++++ + src/lxc/utils.c | 21 ++++++++++++++++ src/lxc/utils.h | 1 + 10 files changed, 105 insertions(+), 22 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 1886bde..570b9d0 100644 +index 1886bdef..570b9d0e 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -757,10 +757,15 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -142,7 +142,7 @@ index 1886bde..570b9d0 100644 uid_t uid; struct passwd pwent; diff --git a/src/lxc/attach.h b/src/lxc/attach.h -index 4bf9578..e62b98b 100644 +index 4bf9578e..e62b98bc 100644 --- a/src/lxc/attach.h +++ b/src/lxc/attach.h @@ -42,7 +42,7 @@ struct lxc_proc_context_info { @@ -156,7 +156,7 @@ index 4bf9578..e62b98b 100644 #endif /* __LXC_ATTACH_H */ diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h -index 081618c..7b0a8cb 100644 +index 081618cd..7b0a8cb3 100644 --- a/src/lxc/attach_options.h +++ b/src/lxc/attach_options.h @@ -71,7 +71,7 @@ enum { @@ -187,7 +187,7 @@ index 081618c..7b0a8cb 100644 #ifdef __cplusplus } diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 537f956..8d8230f 100644 +index 537f956c..8d8230fb 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2803,10 +2803,6 @@ struct lxc_conf *lxc_conf_init(void) @@ -246,7 +246,7 @@ index 537f956..8d8230f 100644 free(conf); } diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 7927812..db474e1 100644 +index 79278128..db474e11 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -413,6 +413,9 @@ struct lxc_conf { @@ -260,7 +260,7 @@ index 7927812..db474e1 100644 }; diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 8029f33..31f4819 100644 +index 8029f339..31f4819e 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -4063,7 +4063,7 @@ static int lxcapi_attach(struct lxc_container *c, lxc_attach_exec_t exec_functio @@ -282,7 +282,7 @@ index 8029f33..31f4819 100644 ERROR("ups"); return r; diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 6d0ffe5..a590fd1 100644 +index 6d0ffe57..a590fd12 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -295,8 +295,8 @@ static int do_attach_foreground(struct lxc_container *c, lxc_attach_command_t *c @@ -308,7 +308,7 @@ index 6d0ffe5..a590fd1 100644 msgpipe[1] = -1; ret = -1; diff --git a/src/lxc/tools/lxc_ls.c b/src/lxc/tools/lxc_ls.c -index cb3eb1e..e261c7b 100644 +index cb3eb1e5..e261c7bf 100644 --- a/src/lxc/tools/lxc_ls.c +++ b/src/lxc/tools/lxc_ls.c @@ -122,7 +122,7 @@ struct wrapargs { @@ -330,7 +330,7 @@ index cb3eb1e..e261c7b 100644 int ret = -1; size_t len = 0; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 74e74a1..8ec9f46 100644 +index 74e74a15..8ec9f461 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1971,3 +1971,24 @@ out: @@ -359,7 +359,7 @@ index 74e74a1..8ec9f46 100644 +} + diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 364bf67..3d56fd9 100644 +index 364bf672..3d56fd93 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -314,5 +314,6 @@ extern int lxc_setup_env_home(uid_t uid); @@ -370,5 +370,5 @@ index 364bf67..3d56fd9 100644 #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0022-support-rootfs-mount-propagation.patch b/0022-support-rootfs-mount-propagation.patch index f3153e0..35b56ad 100644 --- a/0022-support-rootfs-mount-propagation.patch +++ b/0022-support-rootfs-mount-propagation.patch @@ -1,11 +1,11 @@ -From daa98c9452fcebe022bd6dcad29633719ef6917e Mon Sep 17 00:00:00 2001 +From f266297dbbc4a0278ca993946656fb664a674336 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 17:02:02 +0800 -Subject: [PATCH 022/122] support rootfs mount propagation +Subject: [PATCH 022/131] support rootfs mount propagation Signed-off-by: LiFeng --- - src/lxc/conf.c | 230 ++++++++++++++++++++++++++-------------- + src/lxc/conf.c | 230 +++++++++++++++++++++----------- src/lxc/conf.h | 2 +- src/lxc/confile.c | 8 +- src/lxc/criu.c | 4 +- @@ -17,7 +17,7 @@ Signed-off-by: LiFeng 9 files changed, 165 insertions(+), 104 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 8d8230f..55d1e45 100644 +index 8d8230fb..55d1e453 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1296,11 +1296,102 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs) @@ -338,7 +338,7 @@ index 8d8230f..55d1e45 100644 ret = run_lxc_hooks(name, "pre-mount", conf, NULL); if (ret < 0) { diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index db474e1..7393dbf 100644 +index db474e11..7393dbfe 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -463,7 +463,7 @@ extern int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data, @@ -351,7 +351,7 @@ index db474e1..7393dbf 100644 extern void tmp_proc_unmount(struct lxc_conf *lxc_conf); extern void remount_all_slave(void); diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index e199965..db63b55 100644 +index e1999656..db63b550 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2065,16 +2065,10 @@ static int set_config_rootfs_options(const char *key, const char *value, @@ -373,7 +373,7 @@ index e199965..db63b55 100644 if (ret < 0) { free(mdata); diff --git a/src/lxc/criu.c b/src/lxc/criu.c -index 31c1940..bb97859 100644 +index 31c19407..bb97859b 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -389,9 +389,9 @@ static void exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf, @@ -389,7 +389,7 @@ index 31c1940..bb97859 100644 free(mntdata); diff --git a/src/lxc/storage/btrfs.c b/src/lxc/storage/btrfs.c -index bbfce61..a02c215 100644 +index bbfce61b..a02c2150 100644 --- a/src/lxc/storage/btrfs.c +++ b/src/lxc/storage/btrfs.c @@ -212,7 +212,7 @@ bool btrfs_detect(const char *path) @@ -411,7 +411,7 @@ index bbfce61..a02c215 100644 return -22; } diff --git a/src/lxc/storage/dir.c b/src/lxc/storage/dir.c -index 79b6469..c7b5ee2 100644 +index 79b64696..c7b5ee27 100644 --- a/src/lxc/storage/dir.c +++ b/src/lxc/storage/dir.c @@ -170,20 +170,13 @@ int dir_mount(struct lxc_storage *bdev) @@ -437,7 +437,7 @@ index 79b6469..c7b5ee2 100644 ret = mount(src, bdev->dest, "bind", MS_BIND | MS_REC | mntflags | pflags, mntdata); diff --git a/src/lxc/storage/overlay.c b/src/lxc/storage/overlay.c -index 01546b1..90408a3 100644 +index 01546b1b..90408a3b 100644 --- a/src/lxc/storage/overlay.c +++ b/src/lxc/storage/overlay.c @@ -495,7 +495,7 @@ int ovl_mount(struct lxc_storage *bdev) @@ -459,7 +459,7 @@ index 01546b1..90408a3 100644 ERROR("Failed to parse mount options"); free(mntdata); diff --git a/src/lxc/storage/storage_utils.c b/src/lxc/storage/storage_utils.c -index fa4e727..46e08a3 100644 +index fa4e7270..46e08a35 100644 --- a/src/lxc/storage/storage_utils.c +++ b/src/lxc/storage/storage_utils.c @@ -396,7 +396,7 @@ int find_fstype_cb(char *buffer, void *data) @@ -481,7 +481,7 @@ index fa4e727..46e08a3 100644 return 0; } diff --git a/src/lxc/storage/zfs.c b/src/lxc/storage/zfs.c -index ba104da..752b0c5 100644 +index ba104da5..752b0c50 100644 --- a/src/lxc/storage/zfs.c +++ b/src/lxc/storage/zfs.c @@ -184,7 +184,7 @@ int zfs_mount(struct lxc_storage *bdev) @@ -503,5 +503,5 @@ index ba104da..752b0c5 100644 ERROR("Failed to parse mount options"); free(mntdata); -- -1.8.3.1 +2.23.0 diff --git a/0023-attach.c-change-uid-and-gid-from-lxc-container-confi.patch b/0023-attach.c-change-uid-and-gid-from-lxc-container-confi.patch index 4e32882..03f63a5 100644 --- a/0023-attach.c-change-uid-and-gid-from-lxc-container-confi.patch +++ b/0023-attach.c-change-uid-and-gid-from-lxc-container-confi.patch @@ -1,7 +1,7 @@ -From 37203bfbe3ff71fb158175bb436e0748e84415ef Mon Sep 17 00:00:00 2001 +From 4952a0eadbe150322b295c124db10e02518d0515 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 17:09:57 +0800 -Subject: [PATCH 023/122] attach.c: change uid and gid from lxc container +Subject: [PATCH 023/131] attach.c: change uid and gid from lxc container config Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 6 insertions(+) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 570b9d0..e6e4b0d 100644 +index 570b9d0e..e6e4b0d1 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1146,6 +1146,12 @@ int lxc_attach(const char *name, const char *lxcpath, @@ -27,5 +27,5 @@ index 570b9d0..e6e4b0d 100644 WARN("Failed to get seccomp policy"); -- -1.8.3.1 +2.23.0 diff --git a/0024-isulad-support-symlink-in-mount-entry-and-not-permit.patch b/0024-isulad-support-symlink-in-mount-entry-and-not-permit.patch index 2469900..73066ce 100644 --- a/0024-isulad-support-symlink-in-mount-entry-and-not-permit.patch +++ b/0024-isulad-support-symlink-in-mount-entry-and-not-permit.patch @@ -1,21 +1,21 @@ -From 205213bbf95886772aa0b8974507741d5012dd45 Mon Sep 17 00:00:00 2001 +From 472aa08222783b4255b60a4dd7a10197711bf703 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 20:12:06 +0800 -Subject: [PATCH 024/122] isulad: support symlink in mount entry, and not +Subject: [PATCH 024/131] isulad: support symlink in mount entry, and not permit mount to /proc Signed-off-by: LiFeng --- src/lxc/Makefile.am | 2 + - src/lxc/conf.c | 108 ++++++++++- - src/lxc/path.c | 546 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/path.h | 70 +++++++ + src/lxc/conf.c | 108 ++++++++- + src/lxc/path.c | 546 ++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/path.h | 70 ++++++ 4 files changed, 721 insertions(+), 5 deletions(-) create mode 100644 src/lxc/path.c create mode 100644 src/lxc/path.h diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 08e2fab..f2928b7 100644 +index 08e2fab6..f2928b7d 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -12,6 +12,7 @@ noinst_HEADERS = attach.h \ @@ -35,7 +35,7 @@ index 08e2fab..f2928b7 100644 criu.c criu.h \ error.c error.h \ diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 55d1e45..800573a 100644 +index 55d1e453..800573a8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -77,6 +77,7 @@ @@ -189,7 +189,7 @@ index 55d1e45..800573a 100644 diff --git a/src/lxc/path.c b/src/lxc/path.c new file mode 100644 -index 0000000..e917dcb +index 00000000..e917dcb8 --- /dev/null +++ b/src/lxc/path.c @@ -0,0 +1,546 @@ @@ -742,7 +742,7 @@ index 0000000..e917dcb \ No newline at end of file diff --git a/src/lxc/path.h b/src/lxc/path.h new file mode 100644 -index 0000000..e3a04cc +index 00000000..e3a04cc5 --- /dev/null +++ b/src/lxc/path.h @@ -0,0 +1,70 @@ @@ -817,5 +817,5 @@ index 0000000..e3a04cc + +#endif -- -1.8.3.1 +2.23.0 diff --git a/0025-support-oci-hooks.patch b/0025-support-oci-hooks.patch index 9001974..e089eb9 100644 --- a/0025-support-oci-hooks.patch +++ b/0025-support-oci-hooks.patch @@ -1,7 +1,7 @@ -From a32efb4b476da94f343aa56e400b180a7686079e Mon Sep 17 00:00:00 2001 +From 6ebea2ab8e91d294ba2d8d2821937a770f27fcb4 Mon Sep 17 00:00:00 2001 From: liuhao Date: Mon, 14 Jan 2019 17:47:17 +0800 -Subject: [PATCH 025/122] support oci hooks +Subject: [PATCH 025/131] support oci hooks support oci hooks @@ -9,22 +9,22 @@ Signed-off-by: LiFeng --- configure.ac | 3 + src/lxc/Makefile.am | 13 +- - src/lxc/conf.c | 528 ++++++++++++++++- + src/lxc/conf.c | 528 ++++++++++++- src/lxc/conf.h | 9 + - src/lxc/json/defs.c | 198 +++++++ - src/lxc/json/defs.h | 37 ++ - src/lxc/json/json_common.c | 1196 ++++++++++++++++++++++++++++++++++++++ - src/lxc/json/json_common.h | 185 ++++++ + src/lxc/json/defs.c | 198 +++++ + src/lxc/json/defs.h | 37 + + src/lxc/json/json_common.c | 1196 ++++++++++++++++++++++++++++++ + src/lxc/json/json_common.h | 185 +++++ src/lxc/json/oci_runtime_hooks.c | 53 ++ src/lxc/json/oci_runtime_hooks.h | 15 + - src/lxc/json/oci_runtime_spec.c | 196 +++++++ - src/lxc/json/oci_runtime_spec.h | 37 ++ + src/lxc/json/oci_runtime_spec.c | 196 +++++ + src/lxc/json/oci_runtime_spec.h | 37 + src/lxc/json/read-file.c | 94 +++ src/lxc/json/read-file.h | 11 + - src/lxc/lxccontainer.c | 66 +++ + src/lxc/lxccontainer.c | 66 ++ src/lxc/lxccontainer.h | 7 + src/lxc/start.c | 17 + - src/lxc/utils.c | 66 ++- + src/lxc/utils.c | 66 +- src/lxc/utils.h | 2 + 19 files changed, 2716 insertions(+), 17 deletions(-) create mode 100644 src/lxc/json/defs.c @@ -39,7 +39,7 @@ Signed-off-by: LiFeng create mode 100644 src/lxc/json/read-file.h diff --git a/configure.ac b/configure.ac -index 950c8dd..4da52a2 100644 +index 950c8dde..4da52a27 100644 --- a/configure.ac +++ b/configure.ac @@ -120,6 +120,9 @@ AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"]) @@ -53,7 +53,7 @@ index 950c8dd..4da52a2 100644 AC_MSG_CHECKING([for init system type]) AC_ARG_WITH([init-script], diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index f2928b7..5678b8d 100644 +index f2928b7d..5678b8da 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -43,6 +43,11 @@ noinst_HEADERS = attach.h \ @@ -98,7 +98,7 @@ index f2928b7..5678b8d 100644 liblxc_la_LIBADD = $(CAP_LIBS) \ $(GNUTLS_LIBS) \ diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 800573a..6a14de1 100644 +index 800573a8..6a14de1f 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -53,6 +53,7 @@ @@ -664,7 +664,7 @@ index 800573a..6a14de1 100644 free(conf->rootfs.mount); free(conf->rootfs.bdev_type); diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 7393dbf..2263e47 100644 +index 7393dbfe..2263e47e 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -35,6 +35,7 @@ @@ -699,7 +699,7 @@ index 7393dbf..2263e47 100644 char *lsm_se_context; diff --git a/src/lxc/json/defs.c b/src/lxc/json/defs.c new file mode 100644 -index 0000000..38df2f7 +index 00000000..38df2f7a --- /dev/null +++ b/src/lxc/json/defs.c @@ -0,0 +1,198 @@ @@ -903,7 +903,7 @@ index 0000000..38df2f7 +} diff --git a/src/lxc/json/defs.h b/src/lxc/json/defs.h new file mode 100644 -index 0000000..0bbd8ac +index 00000000..0bbd8ac8 --- /dev/null +++ b/src/lxc/json/defs.h @@ -0,0 +1,37 @@ @@ -946,7 +946,7 @@ index 0000000..0bbd8ac +#endif diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c new file mode 100755 -index 0000000..8b91844 +index 00000000..8b91844d --- /dev/null +++ b/src/lxc/json/json_common.c @@ -0,0 +1,1196 @@ @@ -2148,7 +2148,7 @@ index 0000000..8b91844 +} diff --git a/src/lxc/json/json_common.h b/src/lxc/json/json_common.h new file mode 100755 -index 0000000..904fe3c +index 00000000..904fe3cd --- /dev/null +++ b/src/lxc/json/json_common.h @@ -0,0 +1,185 @@ @@ -2340,7 +2340,7 @@ index 0000000..904fe3c \ No newline at end of file diff --git a/src/lxc/json/oci_runtime_hooks.c b/src/lxc/json/oci_runtime_hooks.c new file mode 100644 -index 0000000..3aa134e +index 00000000..3aa134ef --- /dev/null +++ b/src/lxc/json/oci_runtime_hooks.c @@ -0,0 +1,53 @@ @@ -2399,7 +2399,7 @@ index 0000000..3aa134e +} diff --git a/src/lxc/json/oci_runtime_hooks.h b/src/lxc/json/oci_runtime_hooks.h new file mode 100644 -index 0000000..bf570c9 +index 00000000..bf570c9e --- /dev/null +++ b/src/lxc/json/oci_runtime_hooks.h @@ -0,0 +1,15 @@ @@ -2420,7 +2420,7 @@ index 0000000..bf570c9 +#endif diff --git a/src/lxc/json/oci_runtime_spec.c b/src/lxc/json/oci_runtime_spec.c new file mode 100644 -index 0000000..1f6073c +index 00000000..1f6073c9 --- /dev/null +++ b/src/lxc/json/oci_runtime_spec.c @@ -0,0 +1,196 @@ @@ -2622,7 +2622,7 @@ index 0000000..1f6073c +} diff --git a/src/lxc/json/oci_runtime_spec.h b/src/lxc/json/oci_runtime_spec.h new file mode 100644 -index 0000000..ef3f161 +index 00000000..ef3f1619 --- /dev/null +++ b/src/lxc/json/oci_runtime_spec.h @@ -0,0 +1,37 @@ @@ -2665,7 +2665,7 @@ index 0000000..ef3f161 +#endif diff --git a/src/lxc/json/read-file.c b/src/lxc/json/read-file.c new file mode 100644 -index 0000000..ad0eda1 +index 00000000..ad0eda1e --- /dev/null +++ b/src/lxc/json/read-file.c @@ -0,0 +1,94 @@ @@ -2765,7 +2765,7 @@ index 0000000..ad0eda1 +} diff --git a/src/lxc/json/read-file.h b/src/lxc/json/read-file.h new file mode 100644 -index 0000000..5d6e0eb +index 00000000..5d6e0eb6 --- /dev/null +++ b/src/lxc/json/read-file.h @@ -0,0 +1,11 @@ @@ -2781,7 +2781,7 @@ index 0000000..5d6e0eb + +#endif diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 31f4819..68134d8 100644 +index 31f4819e..68134d87 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -271,6 +271,9 @@ static void lxc_container_free(struct lxc_container *c) @@ -2886,25 +2886,25 @@ index 31f4819..68134d8 100644 fprintf(stderr, "Failed to load config for %s\n", name); goto err; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 503038a..5d23cc7 100644 +index 503038af..5d23cc7e 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h -@@ -77,6 +77,13 @@ struct lxc_container { +@@ -75,6 +75,13 @@ struct lxc_container { + */ + char *configfile; - /*! - * \private ++ /*! ++ * \private + * isulad: support oci hook from json file + * full path of json file + * */ + char *ocihookfile; + -+ /*! -+ * \private + /*! + * \private * File to store pid. - */ - char *pidfile; diff --git a/src/lxc/start.c b/src/lxc/start.c -index b13326c..63f5af8 100644 +index b13326ce..63f5af88 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1887,6 +1887,16 @@ static int lxc_spawn(struct lxc_handler *handler) @@ -2939,7 +2939,7 @@ index b13326c..63f5af8 100644 if (ret < 0) { ERROR("Failed to set state to \"%s\"", lxc_state2str(RUNNING)); diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 8ec9f46..d1a22f7 100644 +index 8ec9f461..d1a22f73 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1864,11 +1864,11 @@ static int lxc_file2str(const char *filename, char ret[], int cap) @@ -3072,7 +3072,7 @@ index 8ec9f46..d1a22f7 100644 + return alive; +} diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 3d56fd9..abc88ca 100644 +index 3d56fd93..abc88ca5 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -316,4 +316,6 @@ extern int fd_nonblock(int fd); @@ -3083,5 +3083,5 @@ index 3d56fd9..abc88ca 100644 + #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0026-remove-filelock-and-do-not-destroy-directory-when-de.patch b/0026-remove-filelock-and-do-not-destroy-directory-when-de.patch index a786d69..56f6b47 100644 --- a/0026-remove-filelock-and-do-not-destroy-directory-when-de.patch +++ b/0026-remove-filelock-and-do-not-destroy-directory-when-de.patch @@ -1,7 +1,7 @@ -From 693b1ab25741606299037bc660387a5d109f238c Mon Sep 17 00:00:00 2001 +From bb6ce8063c801154eae7f2d6f22c016811c1694b Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 21:13:00 +0800 -Subject: [PATCH 026/122] remove filelock and do not destroy directory when +Subject: [PATCH 026/131] remove filelock and do not destroy directory when destroy container Signed-off-by: LiFeng @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 68134d8..81c0ec3 100644 +index 68134d87..81c0ec35 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2996,8 +2996,14 @@ static bool container_destroy(struct lxc_container *c, @@ -51,7 +51,7 @@ index 68134d8..81c0ec3 100644 if (has_snapshots(c)) { diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c -index e3d4654..8890968 100644 +index e3d4654b..8890968f 100644 --- a/src/lxc/lxclock.c +++ b/src/lxc/lxclock.c @@ -198,6 +198,21 @@ on_error: @@ -91,7 +91,7 @@ index e3d4654..8890968 100644 + return lxc_removelock(c->privlock); +} diff --git a/src/lxc/lxclock.h b/src/lxc/lxclock.h -index 364a71b..e86bc34 100644 +index 364a71b8..e86bc340 100644 --- a/src/lxc/lxclock.h +++ b/src/lxc/lxclock.h @@ -174,4 +174,9 @@ extern int container_disk_lock(struct lxc_container *c); @@ -105,7 +105,7 @@ index 364a71b..e86bc34 100644 + #endif diff --git a/src/lxc/storage/dir.c b/src/lxc/storage/dir.c -index c7b5ee2..deeecec 100644 +index c7b5ee27..deeecec2 100644 --- a/src/lxc/storage/dir.c +++ b/src/lxc/storage/dir.c @@ -123,17 +123,7 @@ int dir_create(struct lxc_storage *bdev, const char *dest, const char *n, @@ -128,5 +128,5 @@ index c7b5ee2..deeecec 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0027-fix-bug-of-memory-leak.patch b/0027-fix-bug-of-memory-leak.patch index 40c3e7c..b0cf110 100644 --- a/0027-fix-bug-of-memory-leak.patch +++ b/0027-fix-bug-of-memory-leak.patch @@ -1,7 +1,7 @@ -From 4f4a8726feb02b846d9602feac517fc4dfbe1ede Mon Sep 17 00:00:00 2001 +From 8cd813403960ae2038ec49bcc22c3a49af9c3664 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 14 Jan 2019 21:24:25 +0800 -Subject: [PATCH 027/122] fix bug of memory leak +Subject: [PATCH 027/131] fix bug of memory leak Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 6a14de1..e076bf2 100644 +index 6a14de1f..e076bf28 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4822,6 +4822,16 @@ int lxc_clear_procs(struct lxc_conf *c, const char *key) @@ -40,7 +40,7 @@ index 6a14de1..e076bf2 100644 free(conf->cgroup_meta.controllers); /* isulad add begin */ diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 2263e47..44feb98 100644 +index 2263e47e..44feb986 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -491,6 +491,7 @@ extern int setup_sysctl_parameters(struct lxc_list *sysctls); @@ -52,7 +52,7 @@ index 2263e47..44feb98 100644 /* isulad add begin */ int lxc_clear_init_args(struct lxc_conf *lxc_conf); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 81c0ec3..e6272fc 100644 +index 81c0ec35..e6272fcd 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -5418,10 +5418,13 @@ int list_active_containers(const char *lxcpath, char ***nret, @@ -74,5 +74,5 @@ index 81c0ec3..e6272fc 100644 if (!add_to_array(&ct_name, p, ct_name_cnt)) { -- -1.8.3.1 +2.23.0 diff --git a/0028-support-rootfs-for-container.patch b/0028-support-rootfs-for-container.patch index 996cd47..3a5ddf4 100644 --- a/0028-support-rootfs-for-container.patch +++ b/0028-support-rootfs-for-container.patch @@ -1,15 +1,15 @@ -From 53fa77bebc3e896396036cb3a482f75f138da788 Mon Sep 17 00:00:00 2001 +From 79e621410a8969949f8d4e4fe9994603225d6fca Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 15 Jan 2019 09:45:44 +0800 -Subject: [PATCH 028/122] support rootfs / for container +Subject: [PATCH 028/131] support rootfs / for container Signed-off-by: LiFeng --- - src/lxc/conf.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- + src/lxc/conf.c | 61 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index e076bf2..f429491 100644 +index e076bf28..f429491e 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -888,9 +888,6 @@ static int lxc_setup_ttys(struct lxc_conf *conf) @@ -119,5 +119,5 @@ index e076bf2..f429491 100644 { int ret; -- -1.8.3.1 +2.23.0 diff --git a/0029-add-start-timeout-to-limit-start-time.patch b/0029-add-start-timeout-to-limit-start-time.patch index fcb2344..36bb38e 100644 --- a/0029-add-start-timeout-to-limit-start-time.patch +++ b/0029-add-start-timeout-to-limit-start-time.patch @@ -1,23 +1,23 @@ -From 96dc86e154cd49f9a999409e4fb679ed78e16af6 Mon Sep 17 00:00:00 2001 +From 9e139dac0cbfc7252b672a23cfc54d62e1989223 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 14 Jan 2019 21:38:07 -0500 -Subject: [PATCH 029/122] add start timeout to limit start time +Subject: [PATCH 029/131] add start timeout to limit start time Signed-off-by: LiFeng --- src/lxc/conf.c | 6 +-- src/lxc/execute.c | 4 +- - src/lxc/lxc.h | 8 ++-- - src/lxc/lxccontainer.c | 21 ++++++++- - src/lxc/lxccontainer.h | 16 +++++++ - src/lxc/start.c | 106 +++++++++++++++++++++++++++++++++++++++++++--- + src/lxc/lxc.h | 8 +-- + src/lxc/lxccontainer.c | 21 +++++++- + src/lxc/lxccontainer.h | 16 ++++++ + src/lxc/start.c | 106 ++++++++++++++++++++++++++++++++++++-- src/lxc/start.h | 6 +-- src/lxc/tools/arguments.h | 2 + - src/lxc/tools/lxc_start.c | 26 ++++++++++++ + src/lxc/tools/lxc_start.c | 26 ++++++++++ 9 files changed, 175 insertions(+), 20 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index f429491..439353b 100644 +index f429491e..439353b2 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4381,14 +4381,12 @@ void* wait_ocihook_timeout(void *arg) @@ -38,7 +38,7 @@ index f429491..439353b 100644 } diff --git a/src/lxc/execute.c b/src/lxc/execute.c -index 45ca67e..d388e63 100644 +index 45ca67e3..d388e633 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -111,12 +111,12 @@ static struct lxc_operations execute_start_ops = { @@ -57,7 +57,7 @@ index 45ca67e..d388e63 100644 + daemonize, error_num, start_timeout); } diff --git a/src/lxc/lxc.h b/src/lxc/lxc.h -index 22e3509..687b4b2 100644 +index 22e35096..687b4b28 100644 --- a/src/lxc/lxc.h +++ b/src/lxc/lxc.h @@ -55,7 +55,7 @@ struct lxc_handler; @@ -83,7 +83,7 @@ index 22e3509..687b4b2 100644 /* * Close the fd associated with the monitoring diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index e6272fc..beae459 100644 +index e6272fcd..beae459b 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1169,10 +1169,10 @@ reboot: @@ -131,7 +131,7 @@ index e6272fc..beae459 100644 return c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 5d23cc7..77de704 100644 +index 5d23cc7e..77de7040 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -94,6 +94,12 @@ struct lxc_container { @@ -165,7 +165,7 @@ index 5d23cc7..77de704 100644 /*! diff --git a/src/lxc/start.c b/src/lxc/start.c -index 63f5af8..f7be9e4 100644 +index 63f5af88..f7be9e43 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -93,7 +93,22 @@ extern void mod_all_rdeps(struct lxc_container *c, bool inc); @@ -330,7 +330,7 @@ index 63f5af8..f7be9e4 100644 static void lxc_destroy_container_on_signal(struct lxc_handler *handler, diff --git a/src/lxc/start.h b/src/lxc/start.h -index f59bf54..a96f2ae 100644 +index f59bf549..a96f2aed 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -174,9 +174,9 @@ extern void lxc_fini(const char *name, struct lxc_handler *handler); @@ -347,7 +347,7 @@ index f59bf54..a96f2ae 100644 extern int resolve_clone_flags(struct lxc_handler *handler); diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index 047e9f1..afab9f5 100644 +index 047e9f16..afab9f54 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -65,6 +65,7 @@ struct lxc_arguments { @@ -367,7 +367,7 @@ index 047e9f1..afab9f5 100644 extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 60c7d70..f37f8a6 100644 +index 60c7d70b..f37f8a6a 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -40,6 +40,7 @@ @@ -432,5 +432,5 @@ index 60c7d70..f37f8a6 100644 if (!c->set_config_item(c, "lxc.console.path", my_args.console)) goto out; -- -1.8.3.1 +2.23.0 diff --git a/0030-support-block-device-as-rootfs.patch b/0030-support-block-device-as-rootfs.patch index 4f2f3b4..0c7eb94 100644 --- a/0030-support-block-device-as-rootfs.patch +++ b/0030-support-block-device-as-rootfs.patch @@ -1,23 +1,23 @@ -From 3d30577047030ebf63101324509f1d1ecfb837b8 Mon Sep 17 00:00:00 2001 +From 9eb3f03ff4604a61dae9f587294599ef7f68da64 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 15 Jan 2019 16:00:30 +0800 -Subject: [PATCH 030/122] support block device as rootfs +Subject: [PATCH 030/131] support block device as rootfs Signed-off-by: LiFeng --- src/lxc/Makefile.am | 1 + - src/lxc/conf.c | 10 ++--- - src/lxc/storage/block.c | 86 +++++++++++++++++++++++++++++++++++++++++ - src/lxc/storage/block.h | 41 ++++++++++++++++++++ - src/lxc/storage/dir.c | 10 +---- - src/lxc/storage/storage.c | 18 +++++++++ + src/lxc/conf.c | 10 ++-- + src/lxc/storage/block.c | 86 +++++++++++++++++++++++++++++++++ + src/lxc/storage/block.h | 41 ++++++++++++++++ + src/lxc/storage/dir.c | 10 +--- + src/lxc/storage/storage.c | 18 +++++++ src/lxc/storage/storage_utils.c | 2 +- 7 files changed, 153 insertions(+), 15 deletions(-) create mode 100644 src/lxc/storage/block.c create mode 100644 src/lxc/storage/block.h diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 5678b8d..260a7eb 100644 +index 5678b8da..260a7eb0 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -130,6 +130,7 @@ liblxc_la_SOURCES = af_unix.c af_unix.h \ @@ -29,7 +29,7 @@ index 5678b8d..260a7eb 100644 storage/lvm.c storage/lvm.h \ storage/nbd.c storage/nbd.h \ diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 439353b..88763ee 100644 +index 439353b2..88763ee2 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3865,13 +3865,10 @@ static int setup_populate_devs(const struct lxc_rootfs *rootfs, struct lxc_list @@ -61,7 +61,7 @@ index 439353b..88763ee 100644 } diff --git a/src/lxc/storage/block.c b/src/lxc/storage/block.c new file mode 100644 -index 0000000..eb75e70 +index 00000000..eb75e706 --- /dev/null +++ b/src/lxc/storage/block.c @@ -0,0 +1,86 @@ @@ -153,7 +153,7 @@ index 0000000..eb75e70 +} diff --git a/src/lxc/storage/block.h b/src/lxc/storage/block.h new file mode 100644 -index 0000000..2fa7565 +index 00000000..2fa7565f --- /dev/null +++ b/src/lxc/storage/block.h @@ -0,0 +1,41 @@ @@ -199,7 +199,7 @@ index 0000000..2fa7565 + +#endif /* __LXC_BLK_H */ diff --git a/src/lxc/storage/dir.c b/src/lxc/storage/dir.c -index deeecec..2b548d0 100644 +index deeecec2..2b548d0f 100644 --- a/src/lxc/storage/dir.c +++ b/src/lxc/storage/dir.c @@ -150,7 +150,7 @@ bool dir_detect(const char *path) @@ -227,7 +227,7 @@ index deeecec..2b548d0 100644 if (ret < 0) { SYSERROR("Failed to mount \"%s\" on \"%s\"", src, bdev->dest); diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c -index c4f4c2e..18f754a 100644 +index c4f4c2ea..18f754a4 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -61,6 +61,7 @@ @@ -270,7 +270,7 @@ index c4f4c2e..18f754a 100644 static const size_t numbdevs = sizeof(bdevs) / sizeof(struct lxc_storage_type); diff --git a/src/lxc/storage/storage_utils.c b/src/lxc/storage/storage_utils.c -index 46e08a3..b4dcb57 100644 +index 46e08a35..b4dcb57c 100644 --- a/src/lxc/storage/storage_utils.c +++ b/src/lxc/storage/storage_utils.c @@ -416,7 +416,7 @@ int find_fstype_cb(char *buffer, void *data) @@ -283,5 +283,5 @@ index 46e08a3..b4dcb57 100644 free(mntdata); return 0; -- -1.8.3.1 +2.23.0 diff --git a/0031-clean-add-clean-resources-api.patch b/0031-clean-add-clean-resources-api.patch index 755910f..c607b80 100644 --- a/0031-clean-add-clean-resources-api.patch +++ b/0031-clean-add-clean-resources-api.patch @@ -1,21 +1,21 @@ -From 37d787b93122a6b61d99a3d71f6101f405031a95 Mon Sep 17 00:00:00 2001 +From 136011fb9e859ce315139d2c176d9db505d591c6 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 15 Jan 2019 04:20:57 -0500 -Subject: [PATCH 031/122] clean: add clean resources api +Subject: [PATCH 031/131] clean: add clean resources api Signed-off-by: LiFeng --- - src/lxc/cgroups/cgfsng.c | 124 +++++++++++++++++------------------------ + src/lxc/cgroups/cgfsng.c | 124 +++++++++++++++------------------- src/lxc/cgroups/cgroup.c | 2 +- src/lxc/cgroups/cgroup.h | 4 +- - src/lxc/lxccontainer.c | 18 ++++++ - src/lxc/lxccontainer.h | 10 ++++ - src/lxc/start.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/lxccontainer.c | 18 +++++ + src/lxc/lxccontainer.h | 10 +++ + src/lxc/start.c | 141 +++++++++++++++++++++++++++++++++++++++ src/lxc/start.h | 4 ++ 7 files changed, 228 insertions(+), 75 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 7f2a200..8b913a6 100644 +index 7f2a200a..8b913a6b 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1050,12 +1050,15 @@ static int cgroup_rmdir(struct hierarchy **hierarchies, @@ -230,7 +230,7 @@ index 7f2a200..8b913a6 100644 cgfsng_ops->payload_enter = cgfsng_payload_enter; cgfsng_ops->escape = cgfsng_escape; diff --git a/src/lxc/cgroups/cgroup.c b/src/lxc/cgroups/cgroup.c -index 04e0311..8e7aef9 100644 +index 04e0311d..8e7aef96 100644 --- a/src/lxc/cgroups/cgroup.c +++ b/src/lxc/cgroups/cgroup.c @@ -50,7 +50,7 @@ struct cgroup_ops *cgroup_init(struct lxc_handler *handler) @@ -243,7 +243,7 @@ index 04e0311..8e7aef9 100644 TRACE("Initialized cgroup driver %s", cgroup_ops->driver); diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h -index ba4c153..fa4871e 100644 +index ba4c1532..fa4871ed 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -123,8 +123,8 @@ struct cgroup_ops { @@ -258,7 +258,7 @@ index ba4c153..fa4871e 100644 bool (*payload_enter)(struct cgroup_ops *ops, pid_t pid); const char *(*get_cgroup)(struct cgroup_ops *ops, const char *controller); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index beae459..38059fa 100644 +index beae459b..38059faf 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -5116,6 +5116,23 @@ static bool do_lxcapi_set_start_timeout(struct lxc_container *c, unsigned int s @@ -294,7 +294,7 @@ index beae459..38059fa 100644 return c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 77de704..679ca42 100644 +index 77de7040..679ca42c 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -896,6 +896,16 @@ struct lxc_container { @@ -315,7 +315,7 @@ index 77de704..679ca42 100644 /*! diff --git a/src/lxc/start.c b/src/lxc/start.c -index f7be9e4..08d753a 100644 +index f7be9e43..08d753ab 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1895,6 +1895,11 @@ static int lxc_spawn(struct lxc_handler *handler) @@ -471,7 +471,7 @@ index f7be9e4..08d753a 100644 +} + diff --git a/src/lxc/start.h b/src/lxc/start.h -index a96f2ae..1d84325 100644 +index a96f2aed..1d84325b 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -180,4 +180,8 @@ extern int __lxc_start(const char *name, struct lxc_handler *handler, @@ -484,5 +484,5 @@ index a96f2ae..1d84325 100644 + #endif -- -1.8.3.1 +2.23.0 diff --git a/0032-Drop-all-caps-when-cap.keep-ISULAD_KEEP_NONE.patch b/0032-Drop-all-caps-when-cap.keep-ISULAD_KEEP_NONE.patch index a93a188..6f658c5 100644 --- a/0032-Drop-all-caps-when-cap.keep-ISULAD_KEEP_NONE.patch +++ b/0032-Drop-all-caps-when-cap.keep-ISULAD_KEEP_NONE.patch @@ -1,7 +1,7 @@ -From 37c5a4630e798ff4a24f1336560c41b2b8fec01b Mon Sep 17 00:00:00 2001 +From 40bb25ecfda607f2a42659843a99c2c1447e31a3 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 15 Jan 2019 05:39:39 -0500 -Subject: [PATCH 032/122] Drop all caps when cap.keep=ISULAD_KEEP_NONE +Subject: [PATCH 032/131] Drop all caps when cap.keep=ISULAD_KEEP_NONE Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 9 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 88763ee..54b967b 100644 +index 88763ee2..54b967b4 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2805,6 +2805,15 @@ static int dropcaps_except(struct lxc_list *caps) @@ -29,5 +29,5 @@ index 88763ee..54b967b 100644 if (capid == -2) continue; -- -1.8.3.1 +2.23.0 diff --git a/0033-support-mount-squashfs-in-mount-entry.patch b/0033-support-mount-squashfs-in-mount-entry.patch index 5354551..c0a058e 100644 --- a/0033-support-mount-squashfs-in-mount-entry.patch +++ b/0033-support-mount-squashfs-in-mount-entry.patch @@ -1,19 +1,19 @@ -From e7f83b7c8b21942051e86e094d867cc79ff93524 Mon Sep 17 00:00:00 2001 +From fcfc10ab645e152899225bdfa9d74acedb739afd Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 15 Jan 2019 19:54:13 +0800 -Subject: [PATCH 033/122] support mount squashfs in mount entry +Subject: [PATCH 033/131] support mount squashfs in mount entry Signed-off-by: LiFeng --- - src/lxc/conf.c | 88 +++++++++++++++++++++++++++++++++++++++-- - src/lxc/storage/loop.c | 36 ++++++++++++++--- - src/lxc/storage/storage_utils.c | 36 ++++++++++++++++- - src/lxc/utils.c | 33 ++++++++++++++-- + src/lxc/conf.c | 88 +++++++++++++++++++++++++++++++-- + src/lxc/storage/loop.c | 36 ++++++++++++-- + src/lxc/storage/storage_utils.c | 36 +++++++++++++- + src/lxc/utils.c | 33 +++++++++++-- src/lxc/utils.h | 1 + 5 files changed, 181 insertions(+), 13 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 54b967b..fea0f59 100644 +index 54b967b4..fea0f592 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -78,6 +78,7 @@ @@ -133,7 +133,7 @@ index 54b967b..fea0f59 100644 { int ret; diff --git a/src/lxc/storage/loop.c b/src/lxc/storage/loop.c -index 35cb13e..760def8 100644 +index 35cb13e0..760def81 100644 --- a/src/lxc/storage/loop.c +++ b/src/lxc/storage/loop.c @@ -41,6 +41,7 @@ @@ -214,7 +214,7 @@ index 35cb13e..760def8 100644 int loop_umount(struct lxc_storage *bdev) diff --git a/src/lxc/storage/storage_utils.c b/src/lxc/storage/storage_utils.c -index b4dcb57..0a87778 100644 +index b4dcb57c..0a87778e 100644 --- a/src/lxc/storage/storage_utils.c +++ b/src/lxc/storage/storage_utils.c @@ -339,10 +339,14 @@ int is_blktype(struct lxc_storage *b) @@ -293,7 +293,7 @@ index b4dcb57..0a87778 100644 } diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index d1a22f7..120a13d 100644 +index d1a22f73..120a13d7 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1053,7 +1053,7 @@ static int open_if_safe(int dirfd, const char *nextpath) @@ -353,7 +353,7 @@ index d1a22f7..120a13d 100644 on_error: close(fd_ctl); diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index abc88ca..4313942 100644 +index abc88ca5..43139424 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -224,6 +224,7 @@ extern bool cgns_supported(void); @@ -365,5 +365,5 @@ index abc88ca..4313942 100644 unsigned long flags, const void *data, const char *rootfs); -- -1.8.3.1 +2.23.0 diff --git a/0034-some-small-bugfix.patch b/0034-some-small-bugfix.patch index b3bf1b2..a7138fd 100644 --- a/0034-some-small-bugfix.patch +++ b/0034-some-small-bugfix.patch @@ -1,7 +1,7 @@ -From 8e7742314071cbb163c1fc6ab4eb96bffd6bc64a Mon Sep 17 00:00:00 2001 +From ad4a2433846406dd288b31589dc9bc468749918e Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 15 Jan 2019 20:39:11 +0800 -Subject: [PATCH 034/122] some small bugfix +Subject: [PATCH 034/131] some small bugfix 1. support new container without load config to save time 2. try to create workdir if not exist @@ -16,7 +16,7 @@ Signed-off-by: LiFeng 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index e6e4b0d..8cbbf96 100644 +index e6e4b0d1..8cbbf962 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -806,6 +806,22 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -43,23 +43,23 @@ index e6e4b0d..8cbbf96 100644 * if you want this to be a no-op). */ diff --git a/src/lxc/lxc.h b/src/lxc/lxc.h -index 687b4b2..5df5080 100644 +index 687b4b28..5df5080a 100644 --- a/src/lxc/lxc.h +++ b/src/lxc/lxc.h -@@ -104,6 +104,11 @@ extern lxc_state_t lxc_state(const char *name, const char *lxcpath); +@@ -103,6 +103,11 @@ extern lxc_state_t lxc_state(const char *name, const char *lxcpath); + */ extern struct lxc_container *lxc_container_new(const char *name, const char *configpath); - /* ++/* + * Create a new container without loading config. + */ +extern struct lxc_container *lxc_container_without_config_new(const char *name, const char *configpath); + -+/* + /* * Returns 1 on success, 0 on failure. */ - extern int lxc_container_get(struct lxc_container *c); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 38059fa..e99c41c 100644 +index 38059faf..e99c41cb 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -5133,7 +5133,7 @@ static bool do_lxcapi_clean_container_resource(struct lxc_container *c, pid_t pi @@ -105,13 +105,14 @@ index 38059fa..e99c41c 100644 { int i; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index 679ca42..a00e0ec 100644 +index 679ca42c..a00e0ece 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h -@@ -1040,6 +1040,18 @@ struct lxc_console_log { +@@ -1039,6 +1039,18 @@ struct lxc_console_log { + */ struct lxc_container *lxc_container_new(const char *name, const char *configpath); - /*! ++/*! + * \brief Create a new container without loading config. + * + * \param name Name to use for container. @@ -123,12 +124,11 @@ index 679ca42..a00e0ec 100644 + */ +struct lxc_container *lxc_container_without_config_new(const char *name, const char *configpath); + -+/*! + /*! * \brief Add a reference to the specified container. * - * \param c Container. diff --git a/src/lxc/start.c b/src/lxc/start.c -index 08d753a..040909c 100644 +index 08d753ab..040909c3 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1364,10 +1364,14 @@ static int do_start(void *data) @@ -151,5 +151,5 @@ index 08d753a..040909c 100644 } } -- -1.8.3.1 +2.23.0 diff --git a/0035-lxc-fixup-builds-with-newer-glibc.patch b/0035-lxc-fixup-builds-with-newer-glibc.patch index 15a2a4e..68d5500 100644 --- a/0035-lxc-fixup-builds-with-newer-glibc.patch +++ b/0035-lxc-fixup-builds-with-newer-glibc.patch @@ -1,7 +1,7 @@ -From b84e0641198d562f8da88dcf98e24f55358523c7 Mon Sep 17 00:00:00 2001 +From ff2e749f043f49a4a10d849a56de258a8bfebb56 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 16 Jan 2019 20:53:25 +0800 -Subject: [PATCH 035/122] lxc: fixup builds with newer glibc +Subject: [PATCH 035/131] lxc: fixup builds with newer glibc Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 120a13d..c8fb993 100644 +index 120a13d7..c8fb9931 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -44,6 +44,7 @@ @@ -21,5 +21,5 @@ index 120a13d..c8fb993 100644 #include -- -1.8.3.1 +2.23.0 diff --git a/0036-drop_caps-add-drop-caps-of-current-process.patch b/0036-drop_caps-add-drop-caps-of-current-process.patch index cd4641d..2e84595 100644 --- a/0036-drop_caps-add-drop-caps-of-current-process.patch +++ b/0036-drop_caps-add-drop-caps-of-current-process.patch @@ -1,19 +1,19 @@ -From 191cff886b75864a9304eb5e56fa29662978ffec Mon Sep 17 00:00:00 2001 +From d891502489641740373c74e761e3b615845e11a0 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 15 Jan 2019 22:55:06 -0500 -Subject: [PATCH 036/122] drop_caps: add drop caps of current process +Subject: [PATCH 036/131] drop_caps: add drop caps of current process Signed-off-by: LiFeng --- - src/lxc/attach.c | 26 +++++++++++++--- - src/lxc/cgroups/cgfsng.c | 35 ++++++++++----------- - src/lxc/conf.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/attach.c | 26 ++++++++++--- + src/lxc/cgroups/cgfsng.c | 35 +++++++++--------- + src/lxc/conf.c | 79 ++++++++++++++++++++++++++++++++++++++++ src/lxc/conf.h | 1 + - src/lxc/start.c | 16 ++++++++++ + src/lxc/start.c | 16 ++++++++ 5 files changed, 135 insertions(+), 22 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 8cbbf96..3f60fe1 100644 +index 8cbbf962..3f60fe10 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -936,11 +936,6 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -60,7 +60,7 @@ index 8cbbf96..3f60fe1 100644 _exit(payload->exec_function(payload->exec_payload, msg_fd)); diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 8b913a6..bc1481d 100644 +index 8b913a6b..bc1481d4 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2664,11 +2664,11 @@ __cgfsng_ops static bool cgfsng_data_init(struct cgroup_ops *ops, struct lxc_han @@ -116,7 +116,7 @@ index 8b913a6..bc1481d 100644 } diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index fea0f59..6134ed3 100644 +index fea0f592..6134ed3b 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4220,6 +4220,85 @@ int lxc_setup(struct lxc_handler *handler) @@ -206,7 +206,7 @@ index fea0f59..6134ed3 100644 defs_hook *ocihook; diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 44feb98..b92c48e 100644 +index 44feb986..b92c48e1 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -498,6 +498,7 @@ int lxc_clear_init_args(struct lxc_conf *lxc_conf); @@ -218,7 +218,7 @@ index 44feb98..b92c48e 100644 /* isulad add end */ diff --git a/src/lxc/start.c b/src/lxc/start.c -index 040909c..357e81d 100644 +index 040909c3..357e81d2 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1411,6 +1411,11 @@ static int do_start(void *data) @@ -252,5 +252,5 @@ index 040909c..357e81d 100644 * as it execs. */ -- -1.8.3.1 +2.23.0 diff --git a/0037-restore-default-signal-handlers-and-set-umask-0027.patch b/0037-restore-default-signal-handlers-and-set-umask-0027.patch index 6ae6146..e63fc99 100644 --- a/0037-restore-default-signal-handlers-and-set-umask-0027.patch +++ b/0037-restore-default-signal-handlers-and-set-umask-0027.patch @@ -1,7 +1,7 @@ -From 9eadf4f23de1863de62710b08b624a468048a773 Mon Sep 17 00:00:00 2001 +From 3c281973b8d068164a2276a823f06a5087b285c1 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 15 Jan 2019 23:14:14 -0500 -Subject: [PATCH 037/122] restore default signal handlers and set umask 0027 +Subject: [PATCH 037/131] restore default signal handlers and set umask 0027 Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 3f60fe1..4ccdd74 100644 +index 3f60fe10..4ccdd74b 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -750,7 +750,7 @@ static void lxc_put_attach_clone_payload(struct attach_clone_payload *p) @@ -56,7 +56,7 @@ index 3f60fe1..4ccdd74 100644 * lxc-attach(1) manual page. We have to remount here and not in the * parent process, otherwise /proc may not properly reflect the new pid diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 6134ed3..88cebfd 100644 +index 6134ed3b..88cebfd5 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4180,6 +4180,9 @@ int lxc_setup(struct lxc_handler *handler) @@ -70,7 +70,7 @@ index 6134ed3..88cebfd 100644 if (ret < 0) { ERROR("Failed to set personality"); diff --git a/src/lxc/start.c b/src/lxc/start.c -index 357e81d..708ab7f 100644 +index 357e81d2..708ab7f5 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1103,7 +1103,7 @@ void lxc_abort(const char *name, struct lxc_handler *handler) @@ -109,5 +109,5 @@ index 357e81d..708ab7f 100644 * we set the parent death signal, we will detect its death with the * synchro right after, otherwise we have a window where the parent can -- -1.8.3.1 +2.23.0 diff --git a/0038-make-the-given-terminal-as-controlling-terminal.patch b/0038-make-the-given-terminal-as-controlling-terminal.patch index fff5c08..b9f315b 100644 --- a/0038-make-the-given-terminal-as-controlling-terminal.patch +++ b/0038-make-the-given-terminal-as-controlling-terminal.patch @@ -1,7 +1,7 @@ -From 05bdc32a321530e46325ca7fe8f67f9195f54962 Mon Sep 17 00:00:00 2001 +From 7db0308d2d89a5b6ae91408258c31d2ebb8c17b6 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 15 Jan 2019 23:24:21 -0500 -Subject: [PATCH 038/122] make the given terminal as controlling terminal +Subject: [PATCH 038/131] make the given terminal as controlling terminal Avoid warning when start cmd /bin/sh : sh: cannot set terminal process group (-1): Inappropriate ioctl for device @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 708ab7f..ec61b32 100644 +index 708ab7f5..ec61b322 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1330,7 +1330,15 @@ static int do_start(void *data) @@ -42,5 +42,5 @@ index 708ab7f..ec61b32 100644 /* isulad: try to craete workdir if not exist */ struct stat st; -- -1.8.3.1 +2.23.0 diff --git a/0039-print-error-message-when-container-start-failed.patch b/0039-print-error-message-when-container-start-failed.patch index 36dc467..8fec817 100644 --- a/0039-print-error-message-when-container-start-failed.patch +++ b/0039-print-error-message-when-container-start-failed.patch @@ -1,26 +1,26 @@ -From b8925094ceb77cc94c8305725aae4877636c13c1 Mon Sep 17 00:00:00 2001 +From 0032e0ea93b38d9f869683ac08328ab1ca029f4d Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 16 Jan 2019 14:38:38 +0800 -Subject: [PATCH 039/122] print error message when container start failed +Subject: [PATCH 039/131] print error message when container start failed Signed-off-by: tanyifeng Signed-off-by: LiFeng --- - src/lxc/attach.c | 6 +-- - src/lxc/cgroups/cgfsng.c | 22 +++++++-- + src/lxc/attach.c | 6 +- + src/lxc/cgroups/cgfsng.c | 22 +++++-- src/lxc/cgroups/cgroup.c | 4 +- src/lxc/cgroups/cgroup.h | 2 + - src/lxc/conf.c | 122 ++++++++++++++++++++++++++-------------------- + src/lxc/conf.c | 122 ++++++++++++++++++++++---------------- src/lxc/conf.h | 5 +- src/lxc/execute.c | 3 +- - src/lxc/lxccontainer.c | 37 ++++++++++++-- - src/lxc/start.c | 14 ++++-- + src/lxc/lxccontainer.c | 37 +++++++++++- + src/lxc/start.c | 14 +++-- src/lxc/start.h | 2 +- - src/lxc/tools/lxc_start.c | 3 ++ + src/lxc/tools/lxc_start.c | 3 + 11 files changed, 147 insertions(+), 73 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 4ccdd74..b44ea74 100644 +index 4ccdd74b..b44ea746 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1396,7 +1396,7 @@ int lxc_attach(const char *name, const char *lxcpath, @@ -44,7 +44,7 @@ index 4ccdd74..b44ea74 100644 SYSERROR("Failed to exec \"%s\"", cmd->program); return ret; diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index bc1481d..47b12a6 100644 +index bc1481d4..47b12a64 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1236,7 +1236,7 @@ static int mkdir_eexist_on_last(const char *dir, mode_t mode) @@ -122,7 +122,7 @@ index bc1481d..47b12a6 100644 cgfsng_ops->destroy = cgfsng_payload_destroy; cgfsng_ops->payload_create = cgfsng_payload_create; diff --git a/src/lxc/cgroups/cgroup.c b/src/lxc/cgroups/cgroup.c -index 8e7aef9..7442c31 100644 +index 8e7aef96..7442c310 100644 --- a/src/lxc/cgroups/cgroup.c +++ b/src/lxc/cgroups/cgroup.c @@ -38,13 +38,13 @@ @@ -142,7 +142,7 @@ index 8e7aef9..7442c31 100644 ERROR("Failed to initialize cgroup driver"); return NULL; diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h -index fa4871e..b6116f6 100644 +index fa4871ed..b6116f68 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -92,6 +92,8 @@ struct cgroup_ops { @@ -155,7 +155,7 @@ index fa4871e..b6116f6 100644 /* @hierarchies * - A NULL-terminated array of struct hierarchy, one per legacy diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 88cebfd..8fa63f7 100644 +index 88cebfd5..8fa63f7c 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2414,6 +2414,8 @@ static int mount_entry_create_dir_file(const struct mntent *mntent, @@ -544,7 +544,7 @@ index 88cebfd..8fa63f7 100644 goto print_hook; } diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index b92c48e..88f5b41 100644 +index b92c48e1..88f5b417 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -175,6 +175,8 @@ struct lxc_rootfs { @@ -574,7 +574,7 @@ index b92c48e..88f5b41 100644 /* isulad add end */ diff --git a/src/lxc/execute.c b/src/lxc/execute.c -index d388e63..3fc46c6 100644 +index d388e633..3fc46c6e 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -40,7 +40,7 @@ @@ -595,7 +595,7 @@ index d388e63..3fc46c6 100644 free(argv); out1: diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index e99c41c..d641851 100644 +index e99c41cb..d6418510 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -916,7 +916,9 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a @@ -711,7 +711,7 @@ index e99c41c..d641851 100644 sizeof(keepfds) / sizeof(keepfds[0])); if (ret < 0) { diff --git a/src/lxc/start.c b/src/lxc/start.c -index ec61b32..3e6854f 100644 +index ec61b322..3e6854fa 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -892,6 +892,7 @@ int lxc_init(const char *name, struct lxc_handler *handler) @@ -785,7 +785,7 @@ index ec61b32..3e6854f 100644 } diff --git a/src/lxc/start.h b/src/lxc/start.h -index 1d84325..ab72e6e 100644 +index 1d84325b..ab72e6e0 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -145,7 +145,7 @@ struct execute_args { @@ -798,7 +798,7 @@ index 1d84325..ab72e6e 100644 }; diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index f37f8a6..ec48701 100644 +index f37f8a6a..ec487018 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -392,6 +392,9 @@ int main(int argc, char *argv[]) @@ -812,5 +812,5 @@ index f37f8a6..ec48701 100644 if (my_args.daemonize) -- -1.8.3.1 +2.23.0 diff --git a/0040-add-timeout-200ms-for-cmds-send-to-lxc-monitor.patch b/0040-add-timeout-200ms-for-cmds-send-to-lxc-monitor.patch index 223472b..45d19d9 100644 --- a/0040-add-timeout-200ms-for-cmds-send-to-lxc-monitor.patch +++ b/0040-add-timeout-200ms-for-cmds-send-to-lxc-monitor.patch @@ -1,7 +1,7 @@ -From a03cf6d594d7b310138b898fd1c49ce031322e48 Mon Sep 17 00:00:00 2001 +From 51e56ed2d4d4e9a98a5f23cfa857403100db433a Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 16 Jan 2019 02:22:13 -0500 -Subject: [PATCH 040/122] add timeout(200ms) for cmds send to [lxc monitor] +Subject: [PATCH 040/131] add timeout(200ms) for cmds send to [lxc monitor] Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c -index 02f32c4..24500a8 100644 +index 02f32c45..24500a8f 100644 --- a/src/lxc/af_unix.c +++ b/src/lxc/af_unix.c @@ -194,8 +194,9 @@ int lxc_abstract_unix_send_fds(int fd, int *sendfds, int num_sendfds, @@ -68,7 +68,7 @@ index 02f32c4..24500a8 100644 { struct msghdr msg = {0}; diff --git a/src/lxc/af_unix.h b/src/lxc/af_unix.h -index f2c2fdc..74fd77f 100644 +index f2c2fdcc..74fd77ff 100644 --- a/src/lxc/af_unix.h +++ b/src/lxc/af_unix.h @@ -37,5 +37,7 @@ extern int lxc_abstract_unix_recv_fds(int fd, int *recvfds, int num_recvfds, @@ -80,7 +80,7 @@ index f2c2fdc..74fd77f 100644 #endif /* __LXC_AF_UNIX_H */ diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index 133384d..47a824a 100644 +index 133384d7..47a824a9 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -126,13 +126,16 @@ static int lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd) @@ -103,5 +103,5 @@ index 133384d..47a824a 100644 return -1; } -- -1.8.3.1 +2.23.0 diff --git a/0041-return-1-when-_lxc_start-fails.patch b/0041-return-1-when-_lxc_start-fails.patch index ad6c1e0..a41db45 100644 --- a/0041-return-1-when-_lxc_start-fails.patch +++ b/0041-return-1-when-_lxc_start-fails.patch @@ -1,7 +1,7 @@ -From ea7fe5755309e9054ac06542b8fc0abb25039b7e Mon Sep 17 00:00:00 2001 +From 6153c99f9dad1499a5ac9b64def6cbb0f7aeeadc Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 16 Jan 2019 05:53:36 -0500 -Subject: [PATCH 041/122] return -1 when _lxc_start fails +Subject: [PATCH 041/131] return -1 when _lxc_start fails Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 3e6854f..7bbcb00 100644 +index 3e6854fa..7bbcb009 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2175,6 +2175,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler, @@ -21,5 +21,5 @@ index 3e6854f..7bbcb00 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0042-lxc-seccomp-adopt-to-lxc3.0.patch b/0042-lxc-seccomp-adopt-to-lxc3.0.patch index 1f2989c..61c6e91 100644 --- a/0042-lxc-seccomp-adopt-to-lxc3.0.patch +++ b/0042-lxc-seccomp-adopt-to-lxc3.0.patch @@ -1,15 +1,15 @@ -From 6beb5e3a4afe7fede796fc547a29c6175512f024 Mon Sep 17 00:00:00 2001 +From a96bf413990df081d5e63094f44d996106264eaf Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 17 Jan 2019 03:09:00 +0800 -Subject: [PATCH 042/122] lxc: seccomp adopt to lxc3.0 +Subject: [PATCH 042/131] lxc: seccomp adopt to lxc3.0 Signed-off-by: LiFeng --- - src/lxc/seccomp.c | 127 ++++++++++++++++++++++++++++-------------------------- + src/lxc/seccomp.c | 127 ++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 62 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 1e14be1..27bdc22 100644 +index 1e14be17..27bdc223 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -936,86 +936,89 @@ static int parse_config_v2(FILE *f, char *line, size_t *line_bufsz, struct lxc_c @@ -165,5 +165,5 @@ index 1e14be1..27bdc22 100644 return 0; -- -1.8.3.1 +2.23.0 diff --git a/0043-check-null-pointer-of-handler-to-fix-coredump-of-att.patch b/0043-check-null-pointer-of-handler-to-fix-coredump-of-att.patch index e34ca7b..7b74a52 100644 --- a/0043-check-null-pointer-of-handler-to-fix-coredump-of-att.patch +++ b/0043-check-null-pointer-of-handler-to-fix-coredump-of-att.patch @@ -1,7 +1,7 @@ -From 7be24baf1379d45651d10f63cb7e1cb59bdc733c Mon Sep 17 00:00:00 2001 +From 5698aab60ae5ef398af34b129f4998922a43826c Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 17 Jan 2019 10:19:37 +0800 -Subject: [PATCH 043/122] check null pointer of handler to fix coredump of +Subject: [PATCH 043/131] check null pointer of handler to fix coredump of attach Signed-off-by: tanyifeng @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgroup.c b/src/lxc/cgroups/cgroup.c -index 7442c31..720a6c9 100644 +index 7442c310..720a6c93 100644 --- a/src/lxc/cgroups/cgroup.c +++ b/src/lxc/cgroups/cgroup.c @@ -44,7 +44,7 @@ struct cgroup_ops *cgroup_init(struct lxc_handler *handler) @@ -24,5 +24,5 @@ index 7442c31..720a6c9 100644 ERROR("Failed to initialize cgroup driver"); return NULL; -- -1.8.3.1 +2.23.0 diff --git a/0044-support-space-in-volume-mount-and-env.patch b/0044-support-space-in-volume-mount-and-env.patch index 7fe8a48..36591fb 100644 --- a/0044-support-space-in-volume-mount-and-env.patch +++ b/0044-support-space-in-volume-mount-and-env.patch @@ -1,7 +1,7 @@ -From baabb2596394fecf89c610e2473d8b930595f3aa Mon Sep 17 00:00:00 2001 +From 366ac099187f128958f1d59123ae6148d0bec731 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 17 Jan 2019 10:18:23 +0800 -Subject: [PATCH 044/122] support space in --volume, --mount and --env +Subject: [PATCH 044/131] support space in --volume, --mount and --env Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 8fa63f7..48e31af 100644 +index 8fa63f7c..48e31aff 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -54,6 +54,7 @@ @@ -54,7 +54,7 @@ index 8fa63f7..48e31af 100644 return -1; } diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index db63b55..7e9d5c8 100644 +index db63b550..7e9d5c85 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -1036,6 +1036,7 @@ static int set_config_environment(const char *key, const char *value, @@ -88,7 +88,7 @@ index db63b55..7e9d5c8 100644 } diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h -index ab583da..9caaf89 100644 +index ab583da7..9caaf89d 100644 --- a/src/lxc/namespace.h +++ b/src/lxc/namespace.h @@ -26,6 +26,7 @@ @@ -100,7 +100,7 @@ index ab583da..9caaf89 100644 #ifndef CLONE_PARENT_SETTID #define CLONE_PARENT_SETTID 0x00100000 diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 4313942..73ffdd9 100644 +index 43139424..73ffdd97 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -43,6 +43,9 @@ @@ -114,5 +114,5 @@ index 4313942..73ffdd9 100644 extern int lxc_rmdir_onedev(const char *path, const char *exclude); extern int get_u16(unsigned short *val, const char *arg, int base); -- -1.8.3.1 +2.23.0 diff --git a/0045-add_terminal_fifos-Add-terminal-fifos-dynamically.patch b/0045-add_terminal_fifos-Add-terminal-fifos-dynamically.patch index 2cbfe24..42affef 100644 --- a/0045-add_terminal_fifos-Add-terminal-fifos-dynamically.patch +++ b/0045-add_terminal_fifos-Add-terminal-fifos-dynamically.patch @@ -1,20 +1,20 @@ -From 698f04aa780eed16e70f96f3405596e98f3828a2 Mon Sep 17 00:00:00 2001 +From 37c62f3f3ae17c22d4a0a4edd2ed5b804c6491bf Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 17 Jan 2019 02:18:14 -0500 -Subject: [PATCH 045/122] add_terminal_fifos: Add terminal fifos dynamically +Subject: [PATCH 045/131] add_terminal_fifos: Add terminal fifos dynamically Signed-off-by: LiFeng --- - src/lxc/commands.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/commands.h | 4 ++++ - src/lxc/lxccontainer.c | 24 +++++++++++++++++++ - src/lxc/lxccontainer.h | 10 ++++++++ - src/lxc/terminal.c | 47 ++++++++++++++++++++++++++++++++++++++ + src/lxc/commands.c | 62 ++++++++++++++++++++++++++++++++++++++++++ + src/lxc/commands.h | 4 +++ + src/lxc/lxccontainer.c | 24 ++++++++++++++++ + src/lxc/lxccontainer.h | 10 +++++++ + src/lxc/terminal.c | 47 ++++++++++++++++++++++++++++++++ src/lxc/terminal.h | 1 + 6 files changed, 148 insertions(+) diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index 47a824a..46b2805 100644 +index 47a824a9..46b28053 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -96,6 +96,7 @@ static const char *lxc_cmd_str(lxc_cmd_t cmd) @@ -101,7 +101,7 @@ index 47a824a..46b2805 100644 if (req->cmd >= LXC_CMD_MAX) { diff --git a/src/lxc/commands.h b/src/lxc/commands.h -index 2c024b6..0c64544 100644 +index 2c024b65..0c64544e 100644 --- a/src/lxc/commands.h +++ b/src/lxc/commands.h @@ -46,6 +46,7 @@ typedef enum { @@ -121,7 +121,7 @@ index 2c024b6..0c64544 100644 + #endif /* __commands_h */ diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index d641851..bfbf223 100644 +index d6418510..bfbf223b 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -5164,6 +5164,29 @@ static bool do_lxcapi_clean_container_resource(struct lxc_container *c, pid_t pi @@ -163,13 +163,14 @@ index d641851..bfbf223 100644 return c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index a00e0ec..c1d83ba 100644 +index a00e0ece..c1d83ba7 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h -@@ -878,6 +878,16 @@ struct lxc_container { +@@ -877,6 +877,16 @@ struct lxc_container { + */ bool (*set_terminal_init_fifos)(struct lxc_container *c, const char *in, const char *out); - /*! isulad add ++ /*! isulad add + * \brief An API call to add the path of terminal fifos + * + * \param c Container. @@ -179,12 +180,11 @@ index a00e0ec..c1d83ba 100644 + */ + bool (*add_terminal_fifos)(struct lxc_container *c, const char *in, const char *out); + -+ /*! isulad add + /*! isulad add * \brief An API call to set the path of info file * - * \param c Container. diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index ee3aef2..a33830d 100644 +index ee3aef21..a33830dd 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -1473,3 +1473,50 @@ int lxc_terminal_map_ids(struct lxc_conf *c, struct lxc_terminal *terminal) @@ -239,7 +239,7 @@ index ee3aef2..a33830d 100644 +} + diff --git a/src/lxc/terminal.h b/src/lxc/terminal.h -index d25da65..d006b80 100644 +index d25da657..d006b80a 100644 --- a/src/lxc/terminal.h +++ b/src/lxc/terminal.h @@ -310,5 +310,6 @@ extern int lxc_terminal_map_ids(struct lxc_conf *c, @@ -250,5 +250,5 @@ index d25da65..d006b80 100644 #endif /* __LXC_TERMINAL_H */ -- -1.8.3.1 +2.23.0 diff --git a/0046-Do-not-test-cgroup-writeable.patch b/0046-Do-not-test-cgroup-writeable.patch index b2bb987..b6f5b36 100644 --- a/0046-Do-not-test-cgroup-writeable.patch +++ b/0046-Do-not-test-cgroup-writeable.patch @@ -1,7 +1,7 @@ -From 623f6fbd09a7694546ca7c57a564d984261c4f82 Mon Sep 17 00:00:00 2001 +From acf23ca53402e88beef8a56359e74505c58f3813 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 17 Jan 2019 03:49:16 -0500 -Subject: [PATCH 046/122] Do not test cgroup writeable +Subject: [PATCH 046/131] Do not test cgroup writeable If we run isulad in docker without cgroup namespace, the base_cgroup will be docker/XXX.., mountpoint+base_cgroup may be not exist @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 47b12a6..6bfa693 100644 +index 47b12a64..6bfa693e 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -581,7 +581,7 @@ static bool cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h, char *cgname) @@ -44,5 +44,5 @@ index 47b12a6..6bfa693 100644 char *cgv2_ctrl_path; -- -1.8.3.1 +2.23.0 diff --git a/0047-Fix-memory-leak-in-lxc_global_config_value.patch b/0047-Fix-memory-leak-in-lxc_global_config_value.patch index 8d169c4..b3d08ac 100644 --- a/0047-Fix-memory-leak-in-lxc_global_config_value.patch +++ b/0047-Fix-memory-leak-in-lxc_global_config_value.patch @@ -1,7 +1,7 @@ -From ec20a5a0e68d0b70ec0014d3f34385cdd3c44370 Mon Sep 17 00:00:00 2001 +From fbf9417e0ee9a19cd678e1c493615fa049b547c9 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 17 Jan 2019 07:43:23 -0500 -Subject: [PATCH 047/122] Fix memory leak in lxc_global_config_value +Subject: [PATCH 047/131] Fix memory leak in lxc_global_config_value Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lxc/cgroups/cgroup.c b/src/lxc/cgroups/cgroup.c -index 720a6c9..8d559be 100644 +index 720a6c93..8d559bea 100644 --- a/src/lxc/cgroups/cgroup.c +++ b/src/lxc/cgroups/cgroup.c @@ -95,6 +95,8 @@ void cgroup_exit(struct cgroup_ops *ops) @@ -23,7 +23,7 @@ index 720a6c9..8d559be 100644 } diff --git a/src/lxc/initutils.c b/src/lxc/initutils.c -index 09b521e..60147a5 100644 +index 09b521e5..60147a5e 100644 --- a/src/lxc/initutils.c +++ b/src/lxc/initutils.c @@ -74,12 +74,7 @@ const char *lxc_global_config_value(const char *option_name) @@ -40,5 +40,5 @@ index 09b521e..60147a5 100644 /* user_config_path is freed as soon as it is used */ char *user_config_path = NULL; -- -1.8.3.1 +2.23.0 diff --git a/0048-clear-ONLCR-flag-from-master-of-terminal.patch b/0048-clear-ONLCR-flag-from-master-of-terminal.patch index 753971d..dda87d5 100644 --- a/0048-clear-ONLCR-flag-from-master-of-terminal.patch +++ b/0048-clear-ONLCR-flag-from-master-of-terminal.patch @@ -1,7 +1,7 @@ -From 26125894df9e3297f34c02d62ae5271b5ec88348 Mon Sep 17 00:00:00 2001 +From 933790143774db4c848cf1fafc79dcfa627ee298 Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 17 Jan 2019 20:46:33 +0800 -Subject: [PATCH 048/122] clear ONLCR flag from master of terminal +Subject: [PATCH 048/131] clear ONLCR flag from master of terminal clear ONLCR flag from master of terminal @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 25 insertions(+) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index a33830d..95140e0 100644 +index a33830dd..95140e0b 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -1066,6 +1066,24 @@ static int lxc_terminal_fifo_default(struct lxc_terminal *terminal) @@ -55,5 +55,5 @@ index a33830d..95140e0 100644 if (ret < 0) { SYSERROR("Failed to set FD_CLOEXEC flag on terminal master"); -- -1.8.3.1 +2.23.0 diff --git a/0049-Add-100ms-timeout-for-console-epoll.patch b/0049-Add-100ms-timeout-for-console-epoll.patch index 74cd812..c880e16 100644 --- a/0049-Add-100ms-timeout-for-console-epoll.patch +++ b/0049-Add-100ms-timeout-for-console-epoll.patch @@ -1,7 +1,7 @@ -From 81e84198f02323caabcab2200f2bedf9212a87d7 Mon Sep 17 00:00:00 2001 +From 68b20e1e3571bdaf1d454bf23e649474d5675dfd Mon Sep 17 00:00:00 2001 From: LiFeng Date: Sat, 19 Jan 2019 02:05:17 -0500 -Subject: [PATCH 049/122] Add 100ms timeout for console epoll +Subject: [PATCH 049/131] Add 100ms timeout for console epoll add 100ms timeout for console epoll to avoid lose console @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 7bbcb00..daf2af4 100644 +index 7bbcb009..daf2af4d 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -643,7 +643,7 @@ int lxc_poll(const char *name, struct lxc_handler *handler) @@ -24,5 +24,5 @@ index 7bbcb00..daf2af4 100644 out_mainloop_console: if (has_console) { -- -1.8.3.1 +2.23.0 diff --git a/0050-seccomp-add-rules-for-specified-architecture-only.patch b/0050-seccomp-add-rules-for-specified-architecture-only.patch index 16e5eba..35709e8 100644 --- a/0050-seccomp-add-rules-for-specified-architecture-only.patch +++ b/0050-seccomp-add-rules-for-specified-architecture-only.patch @@ -1,17 +1,17 @@ -From 043d4a1b634a850a201bd835ee59061cbbdbd030 Mon Sep 17 00:00:00 2001 +From c556e8d4bebcde1ce34168fbac2d22328e19e36a Mon Sep 17 00:00:00 2001 From: LiFeng Date: Fri, 18 Jan 2019 02:11:11 -0500 -Subject: [PATCH 050/122] seccomp: add rules for specified architecture only +Subject: [PATCH 050/131] seccomp: add rules for specified architecture only LXC MR: https://github.com/lxc/lxc/pull/2786 Signed-off-by: LiFeng --- - src/lxc/seccomp.c | 234 ++++++++++++++++++++++++++++++------------------------ + src/lxc/seccomp.c | 234 ++++++++++++++++++++++++++-------------------- 1 file changed, 132 insertions(+), 102 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 27bdc22..4a9143b 100644 +index 27bdc223..4a9143bb 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -291,7 +291,7 @@ on_error: @@ -404,5 +404,5 @@ index 27bdc22..4a9143b 100644 return 0; -- -1.8.3.1 +2.23.0 diff --git a/0051-if-ocihook-is-empty.patch b/0051-if-ocihook-is-empty.patch index 5af0c61..0c17407 100644 --- a/0051-if-ocihook-is-empty.patch +++ b/0051-if-ocihook-is-empty.patch @@ -1,7 +1,7 @@ -From 4fc938241a649307d87700e90dc380651da4c550 Mon Sep 17 00:00:00 2001 +From 273a33174a35d31b7d56f99a9ce2a958d1ef3b17 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 11:25:45 +0800 -Subject: [PATCH 051/122] if ocihook is empty +Subject: [PATCH 051/131] if ocihook is empty return success @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 48e31af..6ea8f9c 100644 +index 48e31aff..6ea8f9c1 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4782,9 +4782,12 @@ static int run_oci_hooks(const char *name, const char *lxcpath, struct lxc_conf @@ -30,5 +30,5 @@ index 48e31af..6ea8f9c 100644 rootpath = get_root_path(lc->rootfs.path, lc->rootfs.bdev_type); if (!rootpath) { -- -1.8.3.1 +2.23.0 diff --git a/0052-Fix-seccomp-fail-when-all-specified-in-config.patch b/0052-Fix-seccomp-fail-when-all-specified-in-config.patch index d1b9753..46c0aa6 100644 --- a/0052-Fix-seccomp-fail-when-all-specified-in-config.patch +++ b/0052-Fix-seccomp-fail-when-all-specified-in-config.patch @@ -1,15 +1,15 @@ -From bbefc33a969a7cf0d4f671d96030fb044593a71a Mon Sep 17 00:00:00 2001 +From fb356f57bc8783e28c611a25877f3a9d47218264 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 21 Jan 2019 23:28:43 -0500 -Subject: [PATCH 052/122] Fix seccomp fail when [all] specified in config +Subject: [PATCH 052/131] Fix seccomp fail when [all] specified in config Signed-off-by: LiFeng --- - src/lxc/seccomp.c | 56 +++++++++++++++++++++++++++---------------------------- + src/lxc/seccomp.c | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 4a9143b..3218a60 100644 +index 4a9143bb..3218a603 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -346,7 +346,7 @@ int get_hostarch(void) @@ -188,5 +188,5 @@ index 4a9143b..3218a60 100644 if (!do_resolve_add_rule(ctx.architectures[0], line, ctx.contexts[0], &rule)) -- -1.8.3.1 +2.23.0 diff --git a/0053-destroy-empty-cgroup-path-return-ture.patch b/0053-destroy-empty-cgroup-path-return-ture.patch index e54fe32..29fc315 100644 --- a/0053-destroy-empty-cgroup-path-return-ture.patch +++ b/0053-destroy-empty-cgroup-path-return-ture.patch @@ -1,7 +1,7 @@ -From d1ae3bc538d21355947a1d1695c22690bb9a68ae Mon Sep 17 00:00:00 2001 +From 814e6298692f74480fcd807eedc1588b94b3f961 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 14:45:54 +0800 -Subject: [PATCH 053/122] destroy empty cgroup path return ture +Subject: [PATCH 053/131] destroy empty cgroup path return ture destroy empty cgroup path return ture @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index c8fb993..24e975b 100644 +index c8fb9931..24e975bc 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1776,6 +1776,10 @@ int recursive_destroy(char *dirname) @@ -27,5 +27,5 @@ index c8fb993..24e975b 100644 return -1; } -- -1.8.3.1 +2.23.0 diff --git a/0054-fix-invalid-log-message.patch b/0054-fix-invalid-log-message.patch index 44d1fee..b0314d4 100644 --- a/0054-fix-invalid-log-message.patch +++ b/0054-fix-invalid-log-message.patch @@ -1,7 +1,7 @@ -From d423289dd6f287b66d62538d9bdedd745a939c50 Mon Sep 17 00:00:00 2001 +From 5b16103c5148098f737c2b7827805d9e35209ed9 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 20:14:53 +0800 -Subject: [PATCH 054/122] fix invalid log message +Subject: [PATCH 054/131] fix invalid log message fix invalid log message @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 6ea8f9c..1e403eb 100644 +index 6ea8f9c1..1e403ebb 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2708,7 +2708,6 @@ static int mount_file_entries(const struct lxc_conf *conf, @@ -25,7 +25,7 @@ index 6ea8f9c..1e403eb 100644 ret = mount_entry_on_systemfs(&mntent); else if (mntent.mnt_dir[0] != '/') diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 24e975b..4db61c5 100644 +index 24e975bc..4db61c56 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1777,7 +1777,7 @@ int recursive_destroy(char *dirname) @@ -38,5 +38,5 @@ index 24e975b..4db61c5 100644 } SYSERROR("Failed to open dir \"%s\"", dirname); -- -1.8.3.1 +2.23.0 diff --git a/0055-Fix-compile-error.patch b/0055-Fix-compile-error.patch index 88d75de..ded48f1 100644 --- a/0055-Fix-compile-error.patch +++ b/0055-Fix-compile-error.patch @@ -1,7 +1,7 @@ -From 9e3eb0c5c5258c6d8e658129ef87ae7ff3ffe64f Mon Sep 17 00:00:00 2001 +From ab9a88aaccd839edd48cc15e6e6ef28ff332299d Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 24 Jan 2019 05:14:24 -0500 -Subject: [PATCH 055/122] Fix compile error +Subject: [PATCH 055/131] Fix compile error Signed-off-by: LiFeng --- @@ -16,7 +16,7 @@ Signed-off-by: LiFeng 8 files changed, 18 insertions(+), 44 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 6bfa693..e513218 100644 +index 6bfa693e..e5132182 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1263,18 +1263,6 @@ static bool create_path_for_hierarchy(struct hierarchy *h, char *cgname, int err @@ -47,7 +47,7 @@ index 6bfa693..e513218 100644 char *base_cgroup = NULL, *mountpoint = NULL; char **controller_list = NULL; diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 1e403eb..4800943 100644 +index 1e403ebb..4800943c 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1518,7 +1518,7 @@ error: @@ -101,7 +101,7 @@ index 1e403eb..4800943 100644 if (!argv || !argv[0]) { ERROR("oci hook require lxcpath"); diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 7e9d5c8..f66d01b 100644 +index 7e9d5c85..f66d01ba 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3909,7 +3909,6 @@ static int get_config_init_args(const char *key, char *retv, int inlen, @@ -113,7 +113,7 @@ index 7e9d5c8..f66d01b 100644 if (!retv) inlen = 0; diff --git a/src/lxc/start.c b/src/lxc/start.c -index daf2af4..816b4a2 100644 +index daf2af4d..816b4a2d 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2470,8 +2470,6 @@ retry: @@ -126,7 +126,7 @@ index daf2af4..816b4a2 100644 out: return ret; diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 95140e0..252a644 100644 +index 95140e0b..252a644f 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -418,6 +418,21 @@ static void lxc_forward_data_to_fifo(struct lxc_list *list, char *buf, int r) @@ -183,7 +183,7 @@ index 95140e0..252a644 100644 int lxc_terminal_delete_fifo(int fd, struct lxc_list *list) { diff --git a/src/lxc/terminal.h b/src/lxc/terminal.h -index d006b80..0c9653c 100644 +index d006b80a..0c9653c5 100644 --- a/src/lxc/terminal.h +++ b/src/lxc/terminal.h @@ -305,9 +305,6 @@ extern void lxc_terminal_info_init(struct lxc_terminal_info *terminal); @@ -197,7 +197,7 @@ index d006b80..0c9653c 100644 int lxc_terminal_delete_fifo(int fd, struct lxc_list *list); int lxc_terminal_add_fifos(struct lxc_conf *conf, const char *fifonames); diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index a590fd1..8856934 100644 +index a590fd12..88569344 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -398,11 +398,9 @@ out: @@ -213,7 +213,7 @@ index a590fd1..8856934 100644 lxc_attach_command_t command = (lxc_attach_command_t){.program = NULL}; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 4db61c5..9a50fce 100644 +index 4db61c56..9a50fced 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2026,7 +2026,6 @@ void lxc_write_error_message(int errfd, const char *format, ...) @@ -225,5 +225,5 @@ index 4db61c5..9a50fce 100644 bool alive = true; proc_t *pid_info = NULL; -- -1.8.3.1 +2.23.0 diff --git a/0056-caps-use-_LINUX_CAPABILITY_VERSION_3-to-set-cap.patch b/0056-caps-use-_LINUX_CAPABILITY_VERSION_3-to-set-cap.patch index 41c5c40..8d85a96 100644 --- a/0056-caps-use-_LINUX_CAPABILITY_VERSION_3-to-set-cap.patch +++ b/0056-caps-use-_LINUX_CAPABILITY_VERSION_3-to-set-cap.patch @@ -1,7 +1,7 @@ -From 65b5764a98f751e885ba8596b2b92c4e7a3e0310 Mon Sep 17 00:00:00 2001 +From 4891152f9c76e68ae32c36f4af7262117ca3a3bd Mon Sep 17 00:00:00 2001 From: LiFeng Date: Sat, 26 Jan 2019 02:22:48 -0500 -Subject: [PATCH 056/122] [caps]: use _LINUX_CAPABILITY_VERSION_3 to set cap +Subject: [PATCH 056/131] [caps]: use _LINUX_CAPABILITY_VERSION_3 to set cap Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 4800943..0c6aa28 100644 +index 4800943c..0c6aa28d 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4322,13 +4322,13 @@ int lxc_drop_caps(struct lxc_conf *conf) @@ -32,7 +32,7 @@ index 4800943..0c6aa28 100644 } diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 3218a60..4a5b3d0 100644 +index 3218a603..4a5b3d0b 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -706,7 +706,6 @@ static int parse_config_v2(FILE *f, char *line, size_t *line_bufsz, struct lxc_c @@ -44,5 +44,5 @@ index 3218a60..4a5b3d0 100644 ctx.contexts[0] = get_new_ctx(lxc_seccomp_arch_mipsel, default_policy_action, &ctx.architectures[0]); -- -1.8.3.1 +2.23.0 diff --git a/0057-confile-add-support-umask.patch b/0057-confile-add-support-umask.patch index 1c9b306..44340f6 100644 --- a/0057-confile-add-support-umask.patch +++ b/0057-confile-add-support-umask.patch @@ -1,7 +1,7 @@ -From b35461f2219dba74b2a51c576ec667f8912632d1 Mon Sep 17 00:00:00 2001 +From e72844df2abd8afda21af2cee1b546c8939759f4 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 30 Jan 2019 03:39:42 -0500 -Subject: [PATCH 057/122] confile: add support umask +Subject: [PATCH 057/131] confile: add support umask lxc.isulad.umask=normal make the container umask to 0022 lxc.isulad.umask=secure make the container umask to 0027 (default) @@ -15,7 +15,7 @@ Signed-off-by: LiFeng 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index b44ea74..9768897 100644 +index b44ea746..97688971 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -768,8 +768,8 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -30,7 +30,7 @@ index b44ea74..9768897 100644 /*isulad: restore default signal handlers and unblock all signals*/ for (i = 1; i < NSIG; i++) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 0c6aa28..67beefe 100644 +index 0c6aa28d..67beefe4 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3163,6 +3163,7 @@ struct lxc_conf *lxc_conf_init(void) @@ -53,7 +53,7 @@ index 0c6aa28..67beefe 100644 ret = setup_personality(lxc_conf->personality); if (ret < 0) { diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 88f5b41..93cf15d 100644 +index 88f5b417..93cf15dd 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -427,6 +427,7 @@ struct lxc_conf { @@ -65,7 +65,7 @@ index 88f5b41..93cf15d 100644 }; diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index f66d01b..3940b32 100644 +index f66d01ba..3940b328 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -155,6 +155,7 @@ lxc_config_define(proc); @@ -142,5 +142,5 @@ index f66d01b..3940b32 100644 struct lxc_conf *c, void *data) { -- -1.8.3.1 +2.23.0 diff --git a/0058-do-not-check-ppid-when-set-death-signal.patch b/0058-do-not-check-ppid-when-set-death-signal.patch index e7fe48f..f11bf50 100644 --- a/0058-do-not-check-ppid-when-set-death-signal.patch +++ b/0058-do-not-check-ppid-when-set-death-signal.patch @@ -1,7 +1,7 @@ -From 920c4a399b121ade499482cae1768f995576b547 Mon Sep 17 00:00:00 2001 +From e7542b143ade41e65ab267f3593a9813ccff938d Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 12 Feb 2019 14:00:47 +0800 -Subject: [PATCH 058/122] do not check ppid when set death signal +Subject: [PATCH 058/131] do not check ppid when set death signal ppid will not be 0 if we shared host pid @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 9a50fce..0aa87aa 100644 +index 9a50fced..0aa87aa4 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1722,12 +1722,13 @@ int lxc_set_death_signal(int signal, pid_t parent) @@ -32,5 +32,5 @@ index 9a50fce..0aa87aa 100644 if (ret < 0) return -1; -- -1.8.3.1 +2.23.0 diff --git a/0059-delete-unused-variable-ppid.patch b/0059-delete-unused-variable-ppid.patch index 2de91a0..8b4f7f1 100644 --- a/0059-delete-unused-variable-ppid.patch +++ b/0059-delete-unused-variable-ppid.patch @@ -1,7 +1,7 @@ -From 897a0999c48453547cd8631a622defe233804be1 Mon Sep 17 00:00:00 2001 +From b8b947bb46f94f46433568f9206648f8f889b0b3 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 12 Feb 2019 14:36:35 +0800 -Subject: [PATCH 059/122] delete unused variable ppid +Subject: [PATCH 059/131] delete unused variable ppid Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 0aa87aa..91ba493 100644 +index 0aa87aa4..91ba4935 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1716,7 +1716,7 @@ uint64_t lxc_find_next_power2(uint64_t n) @@ -23,5 +23,5 @@ index 0aa87aa..91ba493 100644 ret = prctl(PR_SET_PDEATHSIG, prctl_arg(signal), prctl_arg(0), prctl_arg(0), prctl_arg(0)); -- -1.8.3.1 +2.23.0 diff --git a/0060-using-json-file-to-write-console-log-of-container.patch b/0060-using-json-file-to-write-console-log-of-container.patch index 00b6ecd..5cd966f 100644 --- a/0060-using-json-file-to-write-console-log-of-container.patch +++ b/0060-using-json-file-to-write-console-log-of-container.patch @@ -1,23 +1,23 @@ -From 1e1274c4202cb8aac8395586f163d6b27b31ff28 Mon Sep 17 00:00:00 2001 +From 69d69a842a06671bc095bd4692dd8ea265cf6755 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 30 Jan 2019 17:44:19 +0800 -Subject: [PATCH 060/122] using json-file to write console log of container +Subject: [PATCH 060/131] using json-file to write console log of container Signed-off-by: tanyifeng Signed-off-by: LiFeng --- src/lxc/Makefile.am | 2 + - src/lxc/json/json_common.c | 14 ++- + src/lxc/json/json_common.c | 14 +- src/lxc/json/json_common.h | 2 + - src/lxc/json/logger_json_file.c | 243 ++++++++++++++++++++++++++++++++++++++++ - src/lxc/json/logger_json_file.h | 45 ++++++++ - src/lxc/terminal.c | 166 +++++++++++++++++++++++++-- + src/lxc/json/logger_json_file.c | 243 ++++++++++++++++++++++++++++++++ + src/lxc/json/logger_json_file.h | 45 ++++++ + src/lxc/terminal.c | 166 ++++++++++++++++++++-- 6 files changed, 457 insertions(+), 15 deletions(-) create mode 100644 src/lxc/json/logger_json_file.c create mode 100644 src/lxc/json/logger_json_file.h diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 260a7eb..698f8f9 100644 +index 260a7eb0..698f8f95 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -47,6 +47,7 @@ noinst_HEADERS = attach.h \ @@ -37,7 +37,7 @@ index 260a7eb..698f8f9 100644 json/read-file.c json/read-file.h \ $(LSM_SOURCES) diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index 8b91844..e339ab3 100755 +index 8b91844d..e339ab3a 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -86,7 +86,7 @@ bool json_gen_init(yajl_gen *g, struct parser_context *ctx) { @@ -81,7 +81,7 @@ index 8b91844..e339ab3 100755 +} \ No newline at end of file diff --git a/src/lxc/json/json_common.h b/src/lxc/json/json_common.h -index 904fe3c..eb8281c 100755 +index 904fe3cd..eb8281c7 100755 --- a/src/lxc/json/json_common.h +++ b/src/lxc/json/json_common.h @@ -23,6 +23,8 @@ extern "C" { @@ -95,7 +95,7 @@ index 904fe3c..eb8281c 100755 if (!*(err)) {\ diff --git a/src/lxc/json/logger_json_file.c b/src/lxc/json/logger_json_file.c new file mode 100644 -index 0000000..4d78103 +index 00000000..4d781032 --- /dev/null +++ b/src/lxc/json/logger_json_file.c @@ -0,0 +1,243 @@ @@ -344,7 +344,7 @@ index 0000000..4d78103 +} diff --git a/src/lxc/json/logger_json_file.h b/src/lxc/json/logger_json_file.h new file mode 100644 -index 0000000..ad5af7b +index 00000000..ad5af7b4 --- /dev/null +++ b/src/lxc/json/logger_json_file.h @@ -0,0 +1,45 @@ @@ -394,7 +394,7 @@ index 0000000..ad5af7b + +#endif diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 252a644..602d43d 100644 +index 252a644f..602d43d7 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -47,6 +47,7 @@ @@ -606,5 +606,5 @@ index 252a644..602d43d 100644 if (terminal->tty_state) { lxc_terminal_signal_fini(terminal->tty_state); -- -1.8.3.1 +2.23.0 diff --git a/0061-Fix-hook-use-the-path-args-envs-execvp-dirctory.patch b/0061-Fix-hook-use-the-path-args-envs-execvp-dirctory.patch index 4c73880..7edd79c 100644 --- a/0061-Fix-hook-use-the-path-args-envs-execvp-dirctory.patch +++ b/0061-Fix-hook-use-the-path-args-envs-execvp-dirctory.patch @@ -1,7 +1,7 @@ -From c9dc04b4237ac01155a8ce37beae9db4ea7c2b1a Mon Sep 17 00:00:00 2001 +From 48f6b2e54616c2dbb421374092502704201dfab9 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 21 Feb 2019 05:37:05 -0500 -Subject: [PATCH 061/122] Fix hook: use the path, args, envs execvp dirctory +Subject: [PATCH 061/131] Fix hook: use the path, args, envs execvp dirctory Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 67beefe..c2f3cf5 100644 +index 67beefe4..c2f3cf56 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4467,9 +4467,6 @@ static struct lxc_popen_FILE *lxc_popen_ocihook(char *commandpath, char **args, @@ -46,5 +46,5 @@ index 67beefe..c2f3cf5 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0062-setup-sysctls-before-set-read-only-path-and-masked-p.patch b/0062-setup-sysctls-before-set-read-only-path-and-masked-p.patch index 5449152..35efbdb 100644 --- a/0062-setup-sysctls-before-set-read-only-path-and-masked-p.patch +++ b/0062-setup-sysctls-before-set-read-only-path-and-masked-p.patch @@ -1,7 +1,7 @@ -From e0c8855867b71eb0106a312e84389389cee395d7 Mon Sep 17 00:00:00 2001 +From 39d38c5ced23ed1834686d7ad5f785f45ef31772 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 26 Feb 2019 17:21:18 +0800 -Subject: [PATCH 062/122] setup sysctls before set read-only path and masked +Subject: [PATCH 062/131] setup sysctls before set read-only path and masked path Signed-off-by: tanyifeng @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index c2f3cf5..e139dff 100644 +index c2f3cf56..e139dffe 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3039,7 +3039,7 @@ int setup_sysctl_parameters(struct lxc_list *sysctls) @@ -70,5 +70,5 @@ index c2f3cf5..e139dff 100644 if (!lxc_list_empty(&lxc_conf->caps)) { ERROR("Container requests lxc.cap.drop and " -- -1.8.3.1 +2.23.0 diff --git a/0063-lxc-ignore-systemcall-load-failure-error.patch b/0063-lxc-ignore-systemcall-load-failure-error.patch index 6403557..78b71d3 100644 --- a/0063-lxc-ignore-systemcall-load-failure-error.patch +++ b/0063-lxc-ignore-systemcall-load-failure-error.patch @@ -1,7 +1,7 @@ -From aa6af28e14e024cfc31b8d77516df9899eb480c8 Mon Sep 17 00:00:00 2001 +From b9f9f1d5dc0c6156d58115e32be55f2b4259599c Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sat, 9 Mar 2019 03:10:06 +0800 -Subject: [PATCH 063/122] lxc: ignore systemcall load failure error +Subject: [PATCH 063/131] lxc: ignore systemcall load failure error Signed-off-by: wujing Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 4a5b3d0..26eac90 100644 +index 4a5b3d0b..26eac907 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -543,7 +543,7 @@ bool do_resolve_add_rule(uint32_t arch, char *line, scmp_filter_ctx ctx, @@ -23,5 +23,5 @@ index 4a5b3d0..26eac90 100644 return true; -- -1.8.3.1 +2.23.0 diff --git a/0064-lxc-Reduce-seccomp-processing-log-level.patch b/0064-lxc-Reduce-seccomp-processing-log-level.patch index 3e297f7..9eeb2ca 100644 --- a/0064-lxc-Reduce-seccomp-processing-log-level.patch +++ b/0064-lxc-Reduce-seccomp-processing-log-level.patch @@ -1,7 +1,7 @@ -From ec896c711806cad0fa852ea1695361441e840132 Mon Sep 17 00:00:00 2001 +From 1a34ec5bddd89074575a985c87cec360eb4adc8c Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sun, 10 Mar 2019 00:47:05 +0800 -Subject: [PATCH 064/122] lxc: Reduce seccomp processing log level +Subject: [PATCH 064/131] lxc: Reduce seccomp processing log level Signed-off-by: wujing Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c -index 26eac90..7f10777 100644 +index 26eac907..7f107778 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -507,14 +507,14 @@ bool do_resolve_add_rule(uint32_t arch, char *line, scmp_filter_ctx ctx, @@ -42,5 +42,5 @@ index 26eac90..7f10777 100644 return true; } -- -1.8.3.1 +2.23.0 diff --git a/0065-Storage-return-true-if-storage_init-init-fail.patch b/0065-Storage-return-true-if-storage_init-init-fail.patch index fec20d5..4c31a2a 100644 --- a/0065-Storage-return-true-if-storage_init-init-fail.patch +++ b/0065-Storage-return-true-if-storage_init-init-fail.patch @@ -1,7 +1,7 @@ -From d771f62e77e5d122178b171a06a821af4103e48d Mon Sep 17 00:00:00 2001 +From 86c34d70d2a3e213945bda652ccb970bc89b79c6 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 11 Mar 2019 23:26:27 -0400 -Subject: [PATCH 065/122] Storage: return true if storage_init init fail +Subject: [PATCH 065/131] Storage: return true if storage_init init fail Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c -index 18f754a..88ed788 100644 +index 18f754a4..88ed7884 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -610,8 +610,11 @@ bool storage_destroy(struct lxc_conf *conf) @@ -26,5 +26,5 @@ index 18f754a..88ed788 100644 destroy_rv = r->ops->destroy(r); if (destroy_rv == 0) -- -1.8.3.1 +2.23.0 diff --git a/0066-lxc-Pids-limit-does-not-report-an-error-after-execut.patch b/0066-lxc-Pids-limit-does-not-report-an-error-after-execut.patch index 302e3cd..195e7ef 100644 --- a/0066-lxc-Pids-limit-does-not-report-an-error-after-execut.patch +++ b/0066-lxc-Pids-limit-does-not-report-an-error-after-execut.patch @@ -1,7 +1,7 @@ -From 5c96085ffd6f219f92bc210c057e9d964c75cd84 Mon Sep 17 00:00:00 2001 +From 662d5aab3686ddf29294a7f6d67e4e092cac51e9 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Fri, 15 Mar 2019 10:11:10 +0800 -Subject: [PATCH 066/122] lxc: Pids limit does not report an error after +Subject: [PATCH 066/131] lxc: Pids limit does not report an error after executing the limit in the background Signed-off-by: wujing @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 1 file changed, 2 insertions(+) diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 8856934..acdf8a0 100644 +index 88569344..acdf8a01 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -378,6 +378,8 @@ static int do_attach_background(struct lxc_container *c, lxc_attach_command_t *c @@ -24,5 +24,5 @@ index 8856934..acdf8a0 100644 msgpipe[1] = -1; ret = -1; -- -1.8.3.1 +2.23.0 diff --git a/0067-lxc-report-error-when-remove-directory-failed.patch b/0067-lxc-report-error-when-remove-directory-failed.patch index 723dc40..c53de51 100644 --- a/0067-lxc-report-error-when-remove-directory-failed.patch +++ b/0067-lxc-report-error-when-remove-directory-failed.patch @@ -1,7 +1,7 @@ -From 6942bba7a61f9fe55d5d819ffd817ea4b028d040 Mon Sep 17 00:00:00 2001 +From 5e13dd95a5e96b3d9bc9e28b6d8912625b92ce20 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sat, 16 Mar 2019 10:06:13 +0800 -Subject: [PATCH 067/122] lxc: report error when remove directory failed +Subject: [PATCH 067/131] lxc: report error when remove directory failed Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index bfbf223..3fd1a66 100644 +index bfbf223b..3fd1a66c 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3148,8 +3148,11 @@ static bool container_destroy(struct lxc_container *c, @@ -27,7 +27,7 @@ index bfbf223..3fd1a66 100644 } INFO("Destroyed directory \"%s\" for \"%s\"", path, c->name); diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 91ba493..480e6d0 100644 +index 91ba4935..480e6d0a 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -88,6 +88,7 @@ static int _recursive_rmdir(const char *dirname, dev_t pdev, @@ -68,5 +68,5 @@ index 91ba493..480e6d0 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0068-support-record-stdout-stderr-log-of-container-consol.patch b/0068-support-record-stdout-stderr-log-of-container-consol.patch index 3d90132..a2dc5d6 100644 --- a/0068-support-record-stdout-stderr-log-of-container-consol.patch +++ b/0068-support-record-stdout-stderr-log-of-container-consol.patch @@ -1,7 +1,7 @@ -From a31be51b99331c80b66f587245cae0ca5d84d4fa Mon Sep 17 00:00:00 2001 +From a2682d0a53a373585ad99d24d245e5c009127ea3 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 21 Feb 2019 20:27:47 +0800 -Subject: [PATCH 068/122] support record stdout, stderr log of container +Subject: [PATCH 068/131] support record stdout, stderr log of container console Signed-off-by: tanyifeng @@ -11,12 +11,12 @@ Signed-off-by: LiFeng src/lxc/attach_options.h | 2 +- src/lxc/commands.c | 15 +- src/lxc/commands.h | 2 +- - src/lxc/conf.c | 33 +++-- - src/lxc/lxccontainer.c | 79 +++++++--- - src/lxc/lxccontainer.h | 35 ++++- - src/lxc/start.c | 67 ++++++++- + src/lxc/conf.c | 33 ++-- + src/lxc/lxccontainer.c | 79 +++++++-- + src/lxc/lxccontainer.h | 35 +++- + src/lxc/start.c | 67 ++++++- src/lxc/start.h | 5 + - src/lxc/terminal.c | 351 ++++++++++++++++++++++++++++++++------------- + src/lxc/terminal.c | 351 +++++++++++++++++++++++++++---------- src/lxc/terminal.h | 7 +- src/lxc/tools/arguments.h | 14 +- src/lxc/tools/lxc_attach.c | 7 +- @@ -24,7 +24,7 @@ Signed-off-by: LiFeng 14 files changed, 502 insertions(+), 152 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 9768897..c979c85 100644 +index 97688971..c979c85a 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1052,15 +1052,18 @@ static int lxc_attach_terminal(struct lxc_conf *conf, @@ -53,7 +53,7 @@ index 9768897..c979c85 100644 ret = lxc_terminal_create(terminal); if (ret < 0) { diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h -index 7b0a8cb..71c1739 100644 +index 7b0a8cb3..71c1739d 100644 --- a/src/lxc/attach_options.h +++ b/src/lxc/attach_options.h @@ -136,7 +136,7 @@ typedef struct lxc_attach_options_t { @@ -66,7 +66,7 @@ index 7b0a8cb..71c1739 100644 /*! Default attach options to use */ diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index 46b2805..f0c95df 100644 +index 46b28053..f0c95df7 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1064,21 +1064,22 @@ reap_client_fd: @@ -100,7 +100,7 @@ index 46b2805..f0c95df 100644 struct lxc_cmd_rr cmd = { .req = { diff --git a/src/lxc/commands.h b/src/lxc/commands.h -index 0c64544..6b64849 100644 +index 0c64544e..6b64849c 100644 --- a/src/lxc/commands.h +++ b/src/lxc/commands.h @@ -127,6 +127,6 @@ extern int lxc_cmd_console_log(const char *name, const char *lxcpath, @@ -112,7 +112,7 @@ index 0c64544..6b64849 100644 #endif /* __commands_h */ diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index e139dff..a6b9797 100644 +index e139dffe..a6b97975 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2067,20 +2067,22 @@ static int lxc_setup_ttydir_console(const struct lxc_rootfs *rootfs, @@ -165,7 +165,7 @@ index e139dff..a6b9797 100644 new->errmsg = NULL; diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 3fd1a66..8a3724c 100644 +index 3fd1a66c..8a3724c6 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -702,6 +702,40 @@ static bool do_lxcapi_want_daemonize(struct lxc_container *c, bool state) @@ -318,7 +318,7 @@ index 3fd1a66..8a3724c 100644 c->start = lxcapi_start; c->startl = lxcapi_startl; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index c1d83ba..c3368e4 100644 +index c1d83ba7..c3368e4f 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -137,6 +137,15 @@ struct lxc_container { @@ -337,10 +337,11 @@ index c1d83ba..c3368e4 100644 /*! Full path to configuration file */ char *config_path; -@@ -244,6 +253,28 @@ struct lxc_container { +@@ -243,6 +252,28 @@ struct lxc_container { + */ bool (*stop)(struct lxc_container *c); - /*! ++ /*! + * \brief Change whether the container wants to create pty or pipes + * from the console log. + * @@ -362,10 +363,9 @@ index c1d83ba..c3368e4 100644 + */ + bool (*want_open_stdin)(struct lxc_container *c, bool state); + -+ /*! + /*! * \brief Change whether the container wants to run disconnected * from the terminal. - * @@ -875,7 +906,7 @@ struct lxc_container { * * \return \c true on success, else \c false. @@ -385,7 +385,7 @@ index c1d83ba..c3368e4 100644 /*! isulad add * \brief An API call to set the path of info file diff --git a/src/lxc/start.c b/src/lxc/start.c -index 816b4a2..cad0d76 100644 +index 816b4a2d..cad0d769 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -635,6 +635,13 @@ int lxc_poll(const char *name, struct lxc_handler *handler) @@ -505,7 +505,7 @@ index 816b4a2..cad0d76 100644 if (handler->conf->container_info_file) { if (lxc_save_container_info(handler->conf->container_info_file, handler->pid)) { diff --git a/src/lxc/start.h b/src/lxc/start.h -index ab72e6e..0298991 100644 +index ab72e6e0..02989919 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -99,6 +99,11 @@ struct lxc_handler { @@ -521,7 +521,7 @@ index ab72e6e..0298991 100644 pid_t pid; diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 602d43d..dfce92e 100644 +index 602d43d7..dfce92ed 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -432,7 +432,7 @@ static bool get_now_time_buffer(char *timebuffer, size_t maxsize) @@ -1080,7 +1080,7 @@ index 602d43d..dfce92e 100644 ret = -1; goto free_out; diff --git a/src/lxc/terminal.h b/src/lxc/terminal.h -index 0c9653c..9bb341f 100644 +index 0c9653c5..9bb341f0 100644 --- a/src/lxc/terminal.h +++ b/src/lxc/terminal.h @@ -115,16 +115,21 @@ struct lxc_terminal { @@ -1107,7 +1107,7 @@ index 0c9653c..9bb341f 100644 }; diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index afab9f5..d03f8a4 100644 +index afab9f54..d03f8a42 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -51,6 +51,8 @@ struct lxc_arguments { @@ -1146,7 +1146,7 @@ index afab9f5..d03f8a4 100644 extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index acdf8a0..674050d 100644 +index acdf8a01..674050de 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -77,6 +77,7 @@ static const struct option my_longopts[] = { @@ -1180,7 +1180,7 @@ index acdf8a0..674050d 100644 } else if (stdfd_is_pty()) { attach_options.attach_flags |= LXC_ATTACH_TERMINAL; diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index ec48701..183fafc 100644 +index ec487018..183fafcb 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -73,9 +73,12 @@ static const struct option my_longopts[] = { @@ -1240,5 +1240,5 @@ index ec48701..183fafc 100644 if (args == default_args) err = c->start(c, 0, NULL) ? EXIT_SUCCESS : EXIT_FAILURE; -- -1.8.3.1 +2.23.0 diff --git a/0069-lxc-killall-processes-if-container-shared-pid-namesp.patch b/0069-lxc-killall-processes-if-container-shared-pid-namesp.patch index 4f99776..6376f50 100644 --- a/0069-lxc-killall-processes-if-container-shared-pid-namesp.patch +++ b/0069-lxc-killall-processes-if-container-shared-pid-namesp.patch @@ -1,18 +1,18 @@ -From f6877ff5a4ca2bb0e7556b0b17690290888021f5 Mon Sep 17 00:00:00 2001 +From ce57a45c1132b1595b43751f86f3be505107dae8 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 21 Mar 2019 15:48:02 +0800 -Subject: [PATCH 069/122] lxc: killall processes if container shared pid +Subject: [PATCH 069/131] lxc: killall processes if container shared pid namespace Signed-off-by: tanyifeng Signed-off-by: LiFeng --- src/lxc/cgroups/cgfsng.c | 2 +- - src/lxc/start.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/start.c | 160 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index e513218..ab7ca35 100644 +index e5132182..ab7ca35e 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1056,7 +1056,7 @@ static int cgroup_rmdir(struct hierarchy **hierarchies, @@ -25,7 +25,7 @@ index e513218..ab7ca35 100644 } diff --git a/src/lxc/start.c b/src/lxc/start.c -index cad0d76..1c9eb0a 100644 +index cad0d769..1c9eb0ab 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2494,6 +2494,162 @@ static void clean_resource_set_env(struct lxc_handler *handler) @@ -203,5 +203,5 @@ index cad0d76..1c9eb0a 100644 char* oci_hook_args[1]; oci_hook_args[0] = alloca(strlen(handler->lxcpath) + 1); -- -1.8.3.1 +2.23.0 diff --git a/0070-lxc-signal-all-process-for-shared-container-when-con.patch b/0070-lxc-signal-all-process-for-shared-container-when-con.patch index 2944b4a..c6b5612 100644 --- a/0070-lxc-signal-all-process-for-shared-container-when-con.patch +++ b/0070-lxc-signal-all-process-for-shared-container-when-con.patch @@ -1,18 +1,18 @@ -From 44f3d99c562ab88670f1fe91a1d16474da8adb98 Mon Sep 17 00:00:00 2001 +From a372a2af0b3bcf8d1045d679cbbf8166ef3bb352 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 21 Mar 2019 17:21:44 +0800 -Subject: [PATCH 070/122] lxc: signal all process for shared container when +Subject: [PATCH 070/131] lxc: signal all process for shared container when container init exited Signed-off-by: tanyifeng Signed-off-by: LiFeng --- src/lxc/cgroups/cgfsng.c | 2 +- - src/lxc/start.c | 332 +++++++++++++++++++++++++---------------------- + src/lxc/start.c | 332 ++++++++++++++++++++------------------- 2 files changed, 175 insertions(+), 159 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index ab7ca35..5ceb06b 100644 +index ab7ca35e..5ceb06b0 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1056,7 +1056,7 @@ static int cgroup_rmdir(struct hierarchy **hierarchies, @@ -25,7 +25,7 @@ index ab7ca35..5ceb06b 100644 } diff --git a/src/lxc/start.c b/src/lxc/start.c -index 1c9eb0a..b14e46f 100644 +index 1c9eb0ab..b14e46fd 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -941,6 +941,162 @@ out_close_maincmd_fd: @@ -396,5 +396,5 @@ index 1c9eb0a..b14e46f 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0071-lxc-get-cgroup-path-according-to-cgroup-mountpoint.patch b/0071-lxc-get-cgroup-path-according-to-cgroup-mountpoint.patch index febd361..841350a 100644 --- a/0071-lxc-get-cgroup-path-according-to-cgroup-mountpoint.patch +++ b/0071-lxc-get-cgroup-path-according-to-cgroup-mountpoint.patch @@ -1,7 +1,7 @@ -From 5c369714d1a1d74606e6ee44a3df4e1d159ee702 Mon Sep 17 00:00:00 2001 +From bbcab25bf3ade437e41728d6e5e2daf27bf637c3 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 21 Mar 2019 22:05:09 +0800 -Subject: [PATCH 071/122] lxc: get cgroup path according to cgroup mountpoint +Subject: [PATCH 071/131] lxc: get cgroup path according to cgroup mountpoint Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -14,7 +14,7 @@ Signed-off-by: LiFeng 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 5ceb06b..62d58f9 100644 +index 5ceb06b0..62d58f9a 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1852,7 +1852,7 @@ __cgfsng_ops static bool cgfsng_unfreeze(struct cgroup_ops *ops) @@ -38,7 +38,7 @@ index 5ceb06b..62d58f9 100644 /* Given a cgroup path returned from lxc_cmd_get_cgroup_path, build a full path, diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h -index b6116f6..edbb1e3 100644 +index b6116f68..edbb1e39 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -129,7 +129,7 @@ struct cgroup_ops { @@ -51,7 +51,7 @@ index b6116f6..edbb1e3 100644 int (*num_hierarchies)(struct cgroup_ops *ops); bool (*get_hierarchies)(struct cgroup_ops *ops, int n, char ***out); diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index f0c95df..c74b8c1 100644 +index f0c95df7..c74b8c1f 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -481,9 +481,9 @@ static int lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req, @@ -76,7 +76,7 @@ index f0c95df..c74b8c1 100644 if (cgroup_ops->unfreeze(cgroup_ops)) diff --git a/src/lxc/criu.c b/src/lxc/criu.c -index bb97859..5c77979 100644 +index bb97859b..5c779790 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -332,7 +332,7 @@ static void exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf, @@ -89,7 +89,7 @@ index bb97859..5c77979 100644 ERROR("failed to get cgroup path for %s", controllers[0]); goto err; diff --git a/src/lxc/start.c b/src/lxc/start.c -index b14e46f..9243a6d 100644 +index b14e46fd..9243a6d5 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1032,17 +1032,15 @@ static int _recursive_read_cgroup_procs(const char *dirpath, pid_t **pids, size_ @@ -122,5 +122,5 @@ index b14e46f..9243a6d 100644 free(fullpath); return ret; -- -1.8.3.1 +2.23.0 diff --git a/0072-lxc-adapt-to-docker-18.09.patch b/0072-lxc-adapt-to-docker-18.09.patch index 7b72afa..5293a63 100644 --- a/0072-lxc-adapt-to-docker-18.09.patch +++ b/0072-lxc-adapt-to-docker-18.09.patch @@ -1,7 +1,7 @@ -From de35b7df30fbdbf10c0d55523b7fa3a15eb17623 Mon Sep 17 00:00:00 2001 +From 0aadbbe890ac6d558b037308a9522ef3bd5f5f17 Mon Sep 17 00:00:00 2001 From: liuhao Date: Mon, 25 Mar 2019 18:03:23 +0800 -Subject: [PATCH 072/122] lxc: adapt to docker-18.09 +Subject: [PATCH 072/131] lxc: adapt to docker-18.09 1. adapt to docker-18.09 2. fix strlcpy bug @@ -14,7 +14,7 @@ Signed-off-by: LiFeng 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index a6b9797..abfba04 100644 +index a6b97975..abfba042 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4382,9 +4382,9 @@ static char* generate_json_str(const char *name, const char *lxcpath, const char @@ -40,7 +40,7 @@ index a6b9797..abfba04 100644 if (rc < 0 || rc >= size) { ERROR("Create json string failed"); diff --git a/src/lxc/start.c b/src/lxc/start.c -index 9243a6d..2fca4e1 100644 +index 9243a6d5..2fca4e1a 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2186,7 +2186,7 @@ static int lxc_spawn(struct lxc_handler *handler) @@ -62,5 +62,5 @@ index 9243a6d..2fca4e1 100644 if (run_lxc_hooks(handler->name, "oci-poststop", handler->conf, oci_hook_args)) { ERROR("Failed to run lxc.hook.post-stop for container \"%s\".", handler->name); -- -1.8.3.1 +2.23.0 diff --git a/0073-lxc-support-set-additional-groups.patch b/0073-lxc-support-set-additional-groups.patch index c5edff8..43ba34e 100644 --- a/0073-lxc-support-set-additional-groups.patch +++ b/0073-lxc-support-set-additional-groups.patch @@ -1,20 +1,20 @@ -From 5c599c0a93b66eea1633f54ac61bcd99142758e3 Mon Sep 17 00:00:00 2001 +From 4557f7475bb4000dfb19de4a5e85f1577f793955 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 25 Mar 2019 17:17:00 +0800 -Subject: [PATCH 073/122] lxc: support set additional groups +Subject: [PATCH 073/131] lxc: support set additional groups Signed-off-by: tanyifeng Signed-off-by: LiFeng --- - src/lxc/attach.c | 8 ++++--- - src/lxc/conf.c | 12 ++++++++++ + src/lxc/attach.c | 8 +++--- + src/lxc/conf.c | 12 +++++++++ src/lxc/conf.h | 3 +++ - src/lxc/confile.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - src/lxc/start.c | 25 ++++++++++++--------- + src/lxc/confile.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++- + src/lxc/start.c | 25 +++++++++++------- 5 files changed, 100 insertions(+), 14 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index c979c85..618f2f1 100644 +index c979c85a..618f2f1c 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -903,9 +903,6 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -40,7 +40,7 @@ index c979c85..618f2f1 100644 goto on_error; diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index abfba04..58fc059 100644 +index abfba042..58fc059c 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -5184,10 +5184,21 @@ int lxc_clear_init_args(struct lxc_conf *lxc_conf) @@ -74,7 +74,7 @@ index abfba04..58fc059 100644 lxc_clear_rootfs_masked_paths(conf); lxc_clear_rootfs_ro_paths(conf); diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 93cf15d..11cf596 100644 +index 93cf15dd..11cf5960 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -418,6 +418,8 @@ struct lxc_conf { @@ -95,7 +95,7 @@ index 93cf15d..11cf596 100644 int lxc_clear_rootfs_masked_paths(struct lxc_conf *c); int lxc_clear_rootfs_ro_paths(struct lxc_conf *c); diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 3940b32..60e6c46 100644 +index 3940b328..60e6c462 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -154,6 +154,7 @@ lxc_config_define(sysctl); @@ -200,7 +200,7 @@ index 3940b32..60e6c46 100644 static inline int clr_config_populate_device(const char *key, struct lxc_conf *c, void *data) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 2fca4e1..ae92c13 100644 +index 2fca4e1a..ae92c133 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1666,6 +1666,20 @@ static int do_start(void *data) @@ -243,5 +243,5 @@ index 2fca4e1..ae92c13 100644 ret = lxc_ambient_caps_down(); if (ret < 0) { -- -1.8.3.1 +2.23.0 diff --git a/0074-lxc-only-add-valid-fd-to-mainloop.patch b/0074-lxc-only-add-valid-fd-to-mainloop.patch index 2a0e250..2555e96 100644 --- a/0074-lxc-only-add-valid-fd-to-mainloop.patch +++ b/0074-lxc-only-add-valid-fd-to-mainloop.patch @@ -1,7 +1,7 @@ -From df20c5c153b342c2aa49ebafbef8c1e334668e9a Mon Sep 17 00:00:00 2001 +From 0db36a212db180c7370adaddb427ec5d0a192486 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 26 Mar 2019 16:11:13 +0800 -Subject: [PATCH 074/122] lxc: only add valid fd to mainloop +Subject: [PATCH 074/131] lxc: only add valid fd to mainloop Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+) diff --git a/src/lxc/mainloop.c b/src/lxc/mainloop.c -index b169aa6..9603d1e 100644 +index b169aa6f..9603d1ee 100644 --- a/src/lxc/mainloop.c +++ b/src/lxc/mainloop.c @@ -85,6 +85,9 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd, @@ -24,5 +24,5 @@ index b169aa6..9603d1e 100644 if (!handler) return -1; -- -1.8.3.1 +2.23.0 diff --git a/0075-lxc-add-timeout-for-attach.patch b/0075-lxc-add-timeout-for-attach.patch index 38dba02..f1189cb 100644 --- a/0075-lxc-add-timeout-for-attach.patch +++ b/0075-lxc-add-timeout-for-attach.patch @@ -1,22 +1,22 @@ -From d108c60ea9bf1c0a257659d07531e50d09897e48 Mon Sep 17 00:00:00 2001 +From 7ac4cd6176a273a8e7cd146fd189dc2e07d582c8 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 3 Apr 2019 19:54:36 +0800 -Subject: [PATCH 075/122] lxc: add timeout for attach +Subject: [PATCH 075/131] lxc: add timeout for attach Signed-off-by: wujing Signed-off-by: LiFeng --- - src/lxc/attach.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/attach.c | 79 ++++++++++++++++++++++++++++++++++++++ src/lxc/attach_options.h | 1 + - src/lxc/tools/arguments.h | 4 +++ - src/lxc/tools/lxc_attach.c | 11 +++++++ - src/lxc/tools/lxc_start.c | 13 +------- - src/lxc/utils.c | 13 ++++++++ - src/lxc/utils.h | 2 ++ + src/lxc/tools/arguments.h | 4 ++ + src/lxc/tools/lxc_attach.c | 11 ++++++ + src/lxc/tools/lxc_start.c | 13 +------ + src/lxc/utils.c | 13 +++++++ + src/lxc/utils.h | 2 + 7 files changed, 111 insertions(+), 12 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 618f2f1..79049c3 100644 +index 618f2f1c..79049c3d 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -69,6 +69,20 @@ @@ -127,7 +127,7 @@ index 618f2f1..79049c3 100644 if (options->attach_flags & LXC_ATTACH_TERMINAL) lxc_mainloop_close(&descr); diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h -index 71c1739..5e279ba 100644 +index 71c1739d..5e279baf 100644 --- a/src/lxc/attach_options.h +++ b/src/lxc/attach_options.h @@ -137,6 +137,7 @@ typedef struct lxc_attach_options_t { @@ -139,7 +139,7 @@ index 71c1739..5e279ba 100644 /*! Default attach options to use */ diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index d03f8a4..2fc90ad 100644 +index d03f8a42..2fc90ad9 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -69,6 +69,9 @@ struct lxc_arguments { @@ -161,7 +161,7 @@ index d03f8a4..2fc90ad 100644 /* isulad add end*/ diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 674050d..2861ef4 100644 +index 674050de..2861ef4d 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -62,6 +62,7 @@ static char **extra_env; @@ -211,7 +211,7 @@ index 674050d..2861ef4 100644 if (my_args.argc > 0) { command.program = my_args.argv[0]; diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 183fafc..af63f58 100644 +index 183fafcb..af63f581 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -49,6 +49,7 @@ @@ -242,7 +242,7 @@ index 183fafc..af63f58 100644 { switch (c) { diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 480e6d0..69eb3e5 100644 +index 480e6d0a..69eb3e52 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2069,3 +2069,16 @@ out: @@ -263,7 +263,7 @@ index 480e6d0..69eb3e5 100644 +} + diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 73ffdd9..20407af 100644 +index 73ffdd97..20407af8 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -322,4 +322,6 @@ extern void lxc_write_error_message(int errfd, const char *format, ...); @@ -274,5 +274,5 @@ index 73ffdd9..20407af 100644 + #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0076-lxc-delete-unused-variable.patch b/0076-lxc-delete-unused-variable.patch index 96aaedc..0cecd0b 100644 --- a/0076-lxc-delete-unused-variable.patch +++ b/0076-lxc-delete-unused-variable.patch @@ -1,7 +1,7 @@ -From 5a3c172215974dccf41e456b39c8174aaa580cc8 Mon Sep 17 00:00:00 2001 +From 1c9ffd2e51f0c525125103b172f2b03fc6a9aa83 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Thu, 4 Apr 2019 11:19:48 +0800 -Subject: [PATCH 076/122] lxc: delete unused variable +Subject: [PATCH 076/131] lxc: delete unused variable Signed-off-by: wujing Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 1 deletion(-) diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 2861ef4..440c0bc 100644 +index 2861ef4d..440c0bcb 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -62,7 +62,6 @@ static char **extra_env; @@ -22,5 +22,5 @@ index 2861ef4..440c0bc 100644 static const struct option my_longopts[] = { {"elevated-privileges", optional_argument, 0, 'e'}, -- -1.8.3.1 +2.23.0 diff --git a/0077-lxc-set-negative-files.limit-to-max-and-fix-bug-of-s.patch b/0077-lxc-set-negative-files.limit-to-max-and-fix-bug-of-s.patch index 103b251..02e833e 100644 --- a/0077-lxc-set-negative-files.limit-to-max-and-fix-bug-of-s.patch +++ b/0077-lxc-set-negative-files.limit-to-max-and-fix-bug-of-s.patch @@ -1,7 +1,7 @@ -From fe7032c4ed978c38beb00804abb46ad691c0a83c Mon Sep 17 00:00:00 2001 +From 885080c17444f473d65b9f9298eb0042b65d1421 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Tue, 2 Apr 2019 23:59:20 -0400 -Subject: [PATCH 077/122] lxc: set negative files.limit to max and fix bug of +Subject: [PATCH 077/131] lxc: set negative files.limit to max and fix bug of setting homedir Signed-off-by: tanyifeng @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 62d58f9..cc08737 100644 +index 62d58f9a..cc087375 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2259,19 +2259,30 @@ static bool __cg_legacy_setup_limits(struct cgroup_ops *ops, @@ -52,7 +52,7 @@ index 62d58f9..cc08737 100644 if (strcmp(cg->subsystem, "cpu.shares") == 0) { if (cg_legacy_get_data(ops, cg->subsystem, value, sizeof(value)) < 0) { diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c -index 88ed788..fa79762 100644 +index 88ed7884..fa797628 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -611,9 +611,8 @@ bool storage_destroy(struct lxc_conf *conf) @@ -68,7 +68,7 @@ index 88ed788..fa79762 100644 destroy_rv = r->ops->destroy(r); diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 69eb3e5..7b82d06 100644 +index 69eb3e52..7b82d060 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1873,20 +1873,31 @@ int lxc_setup_keyring(void) @@ -113,5 +113,5 @@ index 69eb3e5..7b82d06 100644 if (setenv("HOME", homedir, 0) < 0) { SYSERROR("Unable to set env 'HOME'"); -- -1.8.3.1 +2.23.0 diff --git a/0078-Run-pre-start-hook-before-chroot.patch b/0078-Run-pre-start-hook-before-chroot.patch index 809ef89..a213093 100644 --- a/0078-Run-pre-start-hook-before-chroot.patch +++ b/0078-Run-pre-start-hook-before-chroot.patch @@ -1,7 +1,7 @@ -From ca1c7f86ddadd194c2347e2ccd6b216f1403e273 Mon Sep 17 00:00:00 2001 +From 59ee57ce2c6b7d8b3054a2c52657b6667faf868c Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 3 Apr 2019 23:36:04 -0400 -Subject: [PATCH 078/122] Run pre-start hook before chroot +Subject: [PATCH 078/131] Run pre-start hook before chroot Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 15 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 58fc059..a9421c5 100644 +index 58fc059c..a9421c5f 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -82,6 +82,7 @@ @@ -36,7 +36,7 @@ index 58fc059..a9421c5 100644 if (ret < 0) { ERROR("Failed to pivot root into rootfs"); diff --git a/src/lxc/start.c b/src/lxc/start.c -index ae92c13..10f922d 100644 +index ae92c133..10f922d0 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2204,6 +2204,12 @@ static int lxc_spawn(struct lxc_handler *handler) @@ -53,7 +53,7 @@ index ae92c13..10f922d 100644 * or return an error. (The child will never return * LXC_SYNC_READY_START+1. It will either close the sync pipe, causing diff --git a/src/lxc/sync.h b/src/lxc/sync.h -index 5c0fb34..787911d 100644 +index 5c0fb343..787911dd 100644 --- a/src/lxc/sync.h +++ b/src/lxc/sync.h @@ -31,6 +31,8 @@ enum { @@ -66,5 +66,5 @@ index 5c0fb34..787911d 100644 LXC_SYNC_READY_START, LXC_SYNC_RESTART, -- -1.8.3.1 +2.23.0 diff --git a/0079-inherid-env-from-parent-in-oci-hooks.patch b/0079-inherid-env-from-parent-in-oci-hooks.patch index 53a8040..12ae952 100644 --- a/0079-inherid-env-from-parent-in-oci-hooks.patch +++ b/0079-inherid-env-from-parent-in-oci-hooks.patch @@ -1,7 +1,7 @@ -From b19fca11de19c05c4035fd98842810dfb102aa7b Mon Sep 17 00:00:00 2001 +From b7c3e38d912794fcbba5a3fc4ed185adff58c72d Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 4 Apr 2019 17:21:56 +0800 -Subject: [PATCH 079/122] inherid env from parent in oci hooks +Subject: [PATCH 079/131] inherid env from parent in oci hooks env: LD_LIBRAY_PAHT and PATH @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index a9421c5..20eb840 100644 +index a9421c5f..20eb8408 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4420,7 +4420,7 @@ static char **merge_ocihook_env(char **oldenvs, size_t env_len, size_t *merge_en @@ -25,5 +25,5 @@ index a9421c5..20eb840 100644 char *lxcenv_buf; -- -1.8.3.1 +2.23.0 diff --git a/0080-lxc-fix-compile-error.patch b/0080-lxc-fix-compile-error.patch index 9a0787d..a7fe60f 100644 --- a/0080-lxc-fix-compile-error.patch +++ b/0080-lxc-fix-compile-error.patch @@ -1,7 +1,7 @@ -From ff3a4e1e01afe4cabd6dfae8400b3bfa5803567d Mon Sep 17 00:00:00 2001 +From b088aaa97b760914234c8a16d89cea86ddb20cbd Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 8 Apr 2019 08:29:46 -0400 -Subject: [PATCH 080/122] lxc: fix compile error +Subject: [PATCH 080/131] lxc: fix compile error Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 7b82d06..fd6075f 100644 +index 7b82d060..fd6075f8 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1874,7 +1874,6 @@ int lxc_setup_keyring(void) @@ -31,5 +31,5 @@ index 7b82d06..fd6075f 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0081-lxc-Change-the-range-of-attach-timeout.patch b/0081-lxc-Change-the-range-of-attach-timeout.patch index 2ed2601..20f053c 100644 --- a/0081-lxc-Change-the-range-of-attach-timeout.patch +++ b/0081-lxc-Change-the-range-of-attach-timeout.patch @@ -1,7 +1,7 @@ -From d2711e184061fd4c03413667e4e9b44ae741d901 Mon Sep 17 00:00:00 2001 +From 567715dd8df8468d292da02720b210e2972e6f8e Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 8 Apr 2019 16:42:43 +0800 -Subject: [PATCH 081/122] lxc: Change the range of attach timeout +Subject: [PATCH 081/131] lxc: Change the range of attach timeout Signed-off-by: wujing Signed-off-by: LiFeng @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 79049c3..6480eb9 100644 +index 79049c3d..6480eb99 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -78,7 +78,7 @@ typedef enum { @@ -35,7 +35,7 @@ index 79049c3..6480eb9 100644 int ret = 0; pthread_t ptid; diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h -index 5e279ba..9744a2e 100644 +index 5e279baf..9744a2e4 100644 --- a/src/lxc/attach_options.h +++ b/src/lxc/attach_options.h @@ -137,7 +137,7 @@ typedef struct lxc_attach_options_t { @@ -48,7 +48,7 @@ index 5e279ba..9744a2e 100644 /*! Default attach options to use */ diff --git a/src/lxc/tools/arguments.h b/src/lxc/tools/arguments.h -index 2fc90ad..de02aeb 100644 +index 2fc90ad9..de02aeb0 100644 --- a/src/lxc/tools/arguments.h +++ b/src/lxc/tools/arguments.h @@ -70,7 +70,7 @@ struct lxc_arguments { @@ -61,7 +61,7 @@ index 2fc90ad..de02aeb 100644 /* for lxc-console */ unsigned int ttynum; diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 440c0bc..854b3a2 100644 +index 440c0bcb..854b3a2c 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -212,7 +212,7 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg) @@ -74,5 +74,5 @@ index 440c0bc..854b3a2 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0082-lxc-fix-memory-leak-cause-by-setenv.patch b/0082-lxc-fix-memory-leak-cause-by-setenv.patch index c626eb7..dc0b68c 100644 --- a/0082-lxc-fix-memory-leak-cause-by-setenv.patch +++ b/0082-lxc-fix-memory-leak-cause-by-setenv.patch @@ -1,7 +1,7 @@ -From 767d1b2f9bb323de16658a080b314c5f8feaec67 Mon Sep 17 00:00:00 2001 +From 89a39ea2597bb5e6f3c4cad04828337c717ea30d Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 11 Apr 2019 15:27:31 +0800 -Subject: [PATCH 082/122] lxc: fix memory leak cause by setenv +Subject: [PATCH 082/131] lxc: fix memory leak cause by setenv isulad will call do_lxcapi_clean_resource(), so setenv at here, will change env of isulad. @@ -9,11 +9,11 @@ change env of isulad. Signed-off-by: liuhao Signed-off-by: LiFeng --- - src/lxc/start.c | 107 ++++++++++++++++++++++++++++++++++++++++---------------- + src/lxc/start.c | 107 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 76 insertions(+), 31 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 10f922d..87e07d3 100644 +index 10f922d0..87e07d33 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2635,44 +2635,85 @@ on_error: @@ -146,5 +146,5 @@ index 10f922d..87e07d3 100644 if (handler->conf->ns_share[LXC_NS_PID] != NULL) { signal_all_processes(handler); -- -1.8.3.1 +2.23.0 diff --git a/0083-lxc-free-lxc-handler.patch b/0083-lxc-free-lxc-handler.patch index faf83b4..824c629 100644 --- a/0083-lxc-free-lxc-handler.patch +++ b/0083-lxc-free-lxc-handler.patch @@ -1,7 +1,7 @@ -From 6688394517b79adc2ea1b2d65c66cf9af29ba251 Mon Sep 17 00:00:00 2001 +From f853d85dfb6625f1e97a9b908377886af993e327 Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 11 Apr 2019 20:34:51 +0800 -Subject: [PATCH 083/122] lxc: free lxc-handler +Subject: [PATCH 083/131] lxc: free lxc-handler free handler if failed @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 87e07d3..f1cd7fa 100644 +index 87e07d33..f1cd7fa3 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -695,6 +695,10 @@ void lxc_zero_handler(struct lxc_handler *handler) @@ -37,5 +37,5 @@ index 87e07d3..f1cd7fa 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0084-lxc-memory-leak-of-lxc_grow_array.patch b/0084-lxc-memory-leak-of-lxc_grow_array.patch index 5d80c50..84de9ca 100644 --- a/0084-lxc-memory-leak-of-lxc_grow_array.patch +++ b/0084-lxc-memory-leak-of-lxc_grow_array.patch @@ -1,7 +1,7 @@ -From fd9efbdd077e8cc2a7b825e6f632b5bf4a3473e1 Mon Sep 17 00:00:00 2001 +From 2f31e50aa14fccd46387e40c312ea59c96dbc678 Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 11 Apr 2019 22:36:42 +0800 -Subject: [PATCH 084/122] lxc: memory leak of lxc_grow_array +Subject: [PATCH 084/131] lxc: memory leak of lxc_grow_array fix memory leak of lxc_grow_array @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+) diff --git a/src/lxc/string_utils.c b/src/lxc/string_utils.c -index 0d7538c..31c4340 100644 +index 0d7538c1..31c43407 100644 --- a/src/lxc/string_utils.c +++ b/src/lxc/string_utils.c @@ -523,6 +523,7 @@ int lxc_grow_array(void ***array, size_t *capacity, size_t new_size, size_t capa @@ -24,5 +24,5 @@ index 0d7538c..31c4340 100644 *capacity = 0; } -- -1.8.3.1 +2.23.0 diff --git a/0085-lxc-update-json-file-from-isulad.patch b/0085-lxc-update-json-file-from-isulad.patch index 75d6c2f..497295e 100644 --- a/0085-lxc-update-json-file-from-isulad.patch +++ b/0085-lxc-update-json-file-from-isulad.patch @@ -1,21 +1,21 @@ -From c378f6d33dc28604b317eb93f040ce371ceb152c Mon Sep 17 00:00:00 2001 +From 4b5e1b21b30deeb9744066bda231c3bdd1b1fdb6 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Fri, 12 Apr 2019 06:06:12 -0400 -Subject: [PATCH 085/122] lxc: update json file from isulad +Subject: [PATCH 085/131] lxc: update json file from isulad Signed-off-by: tanyifeng Signed-off-by: LiFeng --- - src/lxc/json/defs.c | 38 +++++----- - src/lxc/json/json_common.c | 160 +++++++++++++++++++-------------------- + src/lxc/json/defs.c | 38 ++++---- + src/lxc/json/json_common.c | 160 +++++++++++++++---------------- src/lxc/json/json_common.h | 2 +- - src/lxc/json/logger_json_file.c | 50 ++++++------ + src/lxc/json/logger_json_file.c | 50 +++++----- src/lxc/json/oci_runtime_hooks.c | 3 +- - src/lxc/json/oci_runtime_spec.c | 32 ++++---- + src/lxc/json/oci_runtime_spec.c | 32 +++---- 6 files changed, 142 insertions(+), 143 deletions(-) diff --git a/src/lxc/json/defs.c b/src/lxc/json/defs.c -index 38df2f7..e7d9a09 100644 +index 38df2f7a..e7d9a092 100644 --- a/src/lxc/json/defs.c +++ b/src/lxc/json/defs.c @@ -15,20 +15,20 @@ defs_hook *make_defs_hook(yajl_val tree, struct parser_context *ctx, parser_erro @@ -158,7 +158,7 @@ index 38df2f7..e7d9a09 100644 } stat = reformat_int(g, num); diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index e339ab3..54b7b61 100755 +index e339ab3a..54b7b610 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -111,7 +111,7 @@ int common_safe_double(const char *numstr, double *converted) { @@ -763,7 +763,7 @@ index e339ab3..54b7b61 100755 } diff --git a/src/lxc/json/json_common.h b/src/lxc/json/json_common.h -index eb8281c..218a837 100755 +index eb8281c7..218a8371 100755 --- a/src/lxc/json/json_common.h +++ b/src/lxc/json/json_common.h @@ -27,7 +27,7 @@ extern "C" { @@ -776,7 +776,7 @@ index eb8281c..218a837 100755 *(err) = safe_strdup("error allocating memory"); \ } \ diff --git a/src/lxc/json/logger_json_file.c b/src/lxc/json/logger_json_file.c -index 4d78103..6433b04 100644 +index 4d781032..6433b042 100644 --- a/src/lxc/json/logger_json_file.c +++ b/src/lxc/json/logger_json_file.c @@ -15,32 +15,32 @@ logger_json_file *make_logger_json_file(yajl_val tree, struct parser_context *ct @@ -955,7 +955,7 @@ index 4d78103..6433b04 100644 goto free_out; } diff --git a/src/lxc/json/oci_runtime_hooks.c b/src/lxc/json/oci_runtime_hooks.c -index 3aa134e..43ff8d7 100644 +index 3aa134ef..43ff8d7f 100644 --- a/src/lxc/json/oci_runtime_hooks.c +++ b/src/lxc/json/oci_runtime_hooks.c @@ -46,8 +46,7 @@ oci_runtime_spec_hooks *oci_runtime_spec_hooks_parse_file(const char *filename, @@ -969,7 +969,7 @@ index 3aa134e..43ff8d7 100644 return ptr; } diff --git a/src/lxc/json/oci_runtime_spec.c b/src/lxc/json/oci_runtime_spec.c -index 1f6073c..4ccb635 100644 +index 1f6073c9..4ccb6358 100644 --- a/src/lxc/json/oci_runtime_spec.c +++ b/src/lxc/json/oci_runtime_spec.c @@ -15,7 +15,7 @@ oci_runtime_spec_hooks *make_oci_runtime_spec_hooks(yajl_val tree, struct parser @@ -1085,5 +1085,5 @@ index 1f6073c..4ccb635 100644 } if (!len && !(ctx->options & GEN_OPTIONS_SIMPLIFY)) -- -1.8.3.1 +2.23.0 diff --git a/0086-confile-add-support-systemd.patch b/0086-confile-add-support-systemd.patch index 9bb4620..de44790 100644 --- a/0086-confile-add-support-systemd.patch +++ b/0086-confile-add-support-systemd.patch @@ -1,7 +1,7 @@ -From 196510dd784d195dfc131b56249a5aac0b9eab54 Mon Sep 17 00:00:00 2001 +From 994b69da275c77f060e9247f9fdf401a357af280 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Sat, 20 Apr 2019 22:40:18 +0800 -Subject: [PATCH 086/122] confile: add support systemd +Subject: [PATCH 086/131] confile: add support systemd lxc.isulad.systemd=true remount systemd cgroup path to rw @@ -15,7 +15,7 @@ Signed-off-by: LiFeng 4 files changed, 48 insertions(+) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index cc08737..b1f56b0 100644 +index cc087375..b1f56b07 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1567,6 +1567,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -53,7 +53,7 @@ index cc08737..b1f56b0 100644 return retval; } diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 20eb840..8cdccf1 100644 +index 20eb8408..8cdccf13 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -5320,6 +5320,7 @@ void lxc_conf_free(struct lxc_conf *conf) @@ -65,7 +65,7 @@ index 20eb840..8cdccf1 100644 /* isulad add end */ free(conf); diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 11cf596..fb3c156 100644 +index 11cf5960..fb3c1560 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -430,6 +430,7 @@ struct lxc_conf { @@ -77,7 +77,7 @@ index 11cf596..fb3c156 100644 }; diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 60e6c46..93936cc 100644 +index 60e6c462..93936ccd 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -157,6 +157,7 @@ lxc_config_define(init_args); @@ -146,5 +146,5 @@ index 60e6c46..93936cc 100644 struct lxc_conf *c, void *data) { -- -1.8.3.1 +2.23.0 diff --git a/0087-lxc-adapt-to-spec-of-oci-hook.patch b/0087-lxc-adapt-to-spec-of-oci-hook.patch index bcf1ab8..2161fd1 100644 --- a/0087-lxc-adapt-to-spec-of-oci-hook.patch +++ b/0087-lxc-adapt-to-spec-of-oci-hook.patch @@ -1,7 +1,7 @@ -From 917a306cfab2e0cef3a666b23bf7c788bcf466d3 Mon Sep 17 00:00:00 2001 +From e58415ad4f1e118a54c5d773e9873f65aa4f44c9 Mon Sep 17 00:00:00 2001 From: liuhao Date: Wed, 24 Apr 2019 22:22:55 +0800 -Subject: [PATCH 087/122] lxc: adapt to spec of oci hook +Subject: [PATCH 087/131] lxc: adapt to spec of oci hook poststart failed do not cause run failed @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 8cdccf1..a1d77eb 100644 +index 8cdccf13..a1d77ebc 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4782,6 +4782,7 @@ static int run_oci_hooks(const char *name, const char *lxcpath, struct lxc_conf @@ -37,5 +37,5 @@ index 8cdccf1..a1d77eb 100644 break; case OCI_HOOK_POSTSTOP: -- -1.8.3.1 +2.23.0 diff --git a/0088-fix-lxc-build-error.patch b/0088-fix-lxc-build-error.patch index 57b617f..041f8bb 100644 --- a/0088-fix-lxc-build-error.patch +++ b/0088-fix-lxc-build-error.patch @@ -1,7 +1,7 @@ -From f6ddc6eb341b7eca5616be1ffd6b403db1b83b11 Mon Sep 17 00:00:00 2001 +From 845d28355b85578a0ebc0d8aff3bb405d63ff8a3 Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 25 Apr 2019 10:12:16 +0800 -Subject: [PATCH 088/122] fix lxc build error +Subject: [PATCH 088/131] fix lxc build error cause by invalid print format @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index a1d77eb..14d5d80 100644 +index a1d77ebc..14d5d807 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4814,7 +4814,7 @@ static int run_oci_hooks(const char *name, const char *lxcpath, struct lxc_conf @@ -25,5 +25,5 @@ index a1d77eb..14d5d80 100644 break; case OCI_HOOK_POSTSTOP: -- -1.8.3.1 +2.23.0 diff --git a/0089-lxc-add-get-container-processes-pids-func.patch b/0089-lxc-add-get-container-processes-pids-func.patch index db70b9b..7894760 100644 --- a/0089-lxc-add-get-container-processes-pids-func.patch +++ b/0089-lxc-add-get-container-processes-pids-func.patch @@ -1,18 +1,18 @@ -From 4241f51abad788017ca5a0da5946ccc2672bdc3b Mon Sep 17 00:00:00 2001 +From bdc424289b3ad959bf55af176f5466b56a447e09 Mon Sep 17 00:00:00 2001 From: maoweiyong Date: Tue, 23 Apr 2019 12:12:55 +0800 -Subject: [PATCH 089/122] lxc:add get container processes pids func +Subject: [PATCH 089/131] lxc:add get container processes pids func Signed-off-by: maoweiyong --- - src/lxc/lxccontainer.c | 18 ++++++++++++ - src/lxc/lxccontainer.h | 11 ++++++++ - src/lxc/start.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/lxccontainer.c | 18 ++++++++++ + src/lxc/lxccontainer.h | 11 ++++++ + src/lxc/start.c | 76 ++++++++++++++++++++++++++++++++++++++++++ src/lxc/start.h | 2 ++ 4 files changed, 107 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 8a3724c..fa13e52 100644 +index 8a3724c6..fa13e522 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -5212,6 +5212,23 @@ static bool do_lxcapi_clean_container_resource(struct lxc_container *c, pid_t pi @@ -48,7 +48,7 @@ index 8a3724c..fa13e52 100644 return c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h -index c3368e4..608f815 100644 +index c3368e4f..608f8158 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -947,6 +947,17 @@ struct lxc_container { @@ -70,7 +70,7 @@ index c3368e4..608f815 100644 /*! diff --git a/src/lxc/start.c b/src/lxc/start.c -index f1cd7fa..2b0d43e 100644 +index f1cd7fa3..2b0d43ea 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2638,6 +2638,55 @@ on_error: @@ -161,7 +161,7 @@ index f1cd7fa..2b0d43e 100644 +} + diff --git a/src/lxc/start.h b/src/lxc/start.h -index 0298991..20e667c 100644 +index 02989919..20e667c1 100644 --- a/src/lxc/start.h +++ b/src/lxc/start.h @@ -188,5 +188,7 @@ extern int resolve_clone_flags(struct lxc_handler *handler); @@ -173,5 +173,5 @@ index 0298991..20e667c 100644 #endif -- -1.8.3.1 +2.23.0 diff --git a/0090-lxc-remove-unused-variable.patch b/0090-lxc-remove-unused-variable.patch index 6213607..c21ffc3 100644 --- a/0090-lxc-remove-unused-variable.patch +++ b/0090-lxc-remove-unused-variable.patch @@ -1,7 +1,7 @@ -From 83136d88470202915844a0bb0413af70fcd18efc Mon Sep 17 00:00:00 2001 +From 720b4a937fcd74bfdd1bd07e68b80eaa566bd6ee Mon Sep 17 00:00:00 2001 From: maoweiyong Date: Thu, 25 Apr 2019 21:21:12 +0800 -Subject: [PATCH 090/122] lxc: remove unused variable +Subject: [PATCH 090/131] lxc: remove unused variable Signed-off-by: maoweiyong --- @@ -9,7 +9,7 @@ Signed-off-by: maoweiyong 1 file changed, 2 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 2b0d43e..3657d4e 100644 +index 2b0d43ea..3657d4eb 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2824,8 +2824,6 @@ int do_lxcapi_get_pids(char *name, char *lxcpath, struct lxc_conf *conf, pid_t * @@ -22,5 +22,5 @@ index 2b0d43e..3657d4e 100644 handler = lxc_init_pids_handler(name, lxcpath, conf); -- -1.8.3.1 +2.23.0 diff --git a/0091-lxc-support-namespaced-kernel-params-can-be-changed-.patch b/0091-lxc-support-namespaced-kernel-params-can-be-changed-.patch index 7536a3c..fb8ef5f 100644 --- a/0091-lxc-support-namespaced-kernel-params-can-be-changed-.patch +++ b/0091-lxc-support-namespaced-kernel-params-can-be-changed-.patch @@ -1,18 +1,18 @@ -From 639248d8b9bcbaabe789f7d12f28191a4e65752f Mon Sep 17 00:00:00 2001 +From 542fd40b355d670ad5beadb06ee5b4bfe01fa8d8 Mon Sep 17 00:00:00 2001 From: liuhao Date: Fri, 26 Apr 2019 07:13:53 +0800 -Subject: [PATCH 091/122] lxc: support namespaced kernel params can be changed +Subject: [PATCH 091/131] lxc: support namespaced kernel params can be changed in system container support namespaced kernel params can be changed in system container Signed-off-by: yangchenliang --- - src/lxc/conf.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/lxc/conf.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 14d5d80..0f227aa 100644 +index 14d5d807..0f227aa1 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1516,6 +1516,66 @@ error: @@ -114,5 +114,5 @@ index 14d5d80..0f227aa 100644 if (!lxc_list_empty(&lxc_conf->caps)) { ERROR("Container requests lxc.cap.drop and " -- -1.8.3.1 +2.23.0 diff --git a/0092-lxc-add-output-error-when-create-unified-cgroup.patch b/0092-lxc-add-output-error-when-create-unified-cgroup.patch index 1787d8b..857c9ff 100644 --- a/0092-lxc-add-output-error-when-create-unified-cgroup.patch +++ b/0092-lxc-add-output-error-when-create-unified-cgroup.patch @@ -1,7 +1,7 @@ -From 548054179d5e5b43368491822ebed803c9a03a36 Mon Sep 17 00:00:00 2001 +From 5f78820667b5b19368d7d2255de95a4f1f4a0561 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 29 Apr 2019 04:13:52 -0400 -Subject: [PATCH 092/122] lxc: add output error when create unified cgroup +Subject: [PATCH 092/131] lxc: add output error when create unified cgroup Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index b1f56b0..2bf142f 100644 +index b1f56b07..2bf142f9 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1132,7 +1132,7 @@ __cgfsng_ops static bool cgfsng_payload_destroy(struct cgroup_ops *ops, @@ -41,5 +41,5 @@ index b1f56b0..2bf142f 100644 /* isulad: create hierarchies path, if fail, return the error */ -- -1.8.3.1 +2.23.0 diff --git a/0093-optimize-isulad_kit-operator.patch b/0093-optimize-isulad_kit-operator.patch index eded542..b1c54e9 100644 --- a/0093-optimize-isulad_kit-operator.patch +++ b/0093-optimize-isulad_kit-operator.patch @@ -1,23 +1,23 @@ -From d37fe422dc56c4904c138fdcb2c721a3cca2f0a8 Mon Sep 17 00:00:00 2001 +From fc2fc11d6985f14aea41021f9c4e85b664bcbbaf Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 2 May 2019 11:23:50 +0800 -Subject: [PATCH 093/122] optimize isulad_kit operator +Subject: [PATCH 093/131] optimize isulad_kit operator parse group add start container Signed-off-by: liuhao Signed-off-by: LiFeng --- - src/lxc/Makefile.am | 2 + - src/lxc/json/container_start_generate_config.c | 245 +++++++++++++++++++++++++ - src/lxc/json/container_start_generate_config.h | 43 +++++ - src/lxc/tools/lxc_start.c | 58 ++++++ + src/lxc/Makefile.am | 2 + + .../json/container_start_generate_config.c | 245 ++++++++++++++++++ + .../json/container_start_generate_config.h | 43 +++ + src/lxc/tools/lxc_start.c | 58 +++++ 4 files changed, 348 insertions(+) create mode 100644 src/lxc/json/container_start_generate_config.c create mode 100644 src/lxc/json/container_start_generate_config.h diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 698f8f9..4ec2081 100644 +index 698f8f95..4ec20812 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -45,6 +45,7 @@ noinst_HEADERS = attach.h \ @@ -38,7 +38,7 @@ index 698f8f9..4ec2081 100644 diff --git a/src/lxc/json/container_start_generate_config.c b/src/lxc/json/container_start_generate_config.c new file mode 100644 -index 0000000..5ec8311 +index 00000000..5ec83114 --- /dev/null +++ b/src/lxc/json/container_start_generate_config.c @@ -0,0 +1,245 @@ @@ -289,7 +289,7 @@ index 0000000..5ec8311 +} diff --git a/src/lxc/json/container_start_generate_config.h b/src/lxc/json/container_start_generate_config.h new file mode 100644 -index 0000000..e1dcf56 +index 00000000..e1dcf56f --- /dev/null +++ b/src/lxc/json/container_start_generate_config.h @@ -0,0 +1,43 @@ @@ -337,7 +337,7 @@ index 0000000..e1dcf56 + +#endif diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index af63f58..4069204 100644 +index af63f581..4069204f 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -50,6 +50,7 @@ @@ -420,5 +420,5 @@ index af63f58..4069204 100644 if (my_args.exit_monitor_fifo != NULL) { c->exit_fifo = strdup(my_args.exit_monitor_fifo); -- -1.8.3.1 +2.23.0 diff --git a/0094-exec-load-uid-gid-and-groups.patch b/0094-exec-load-uid-gid-and-groups.patch index a2acb22..5d1b41d 100644 --- a/0094-exec-load-uid-gid-and-groups.patch +++ b/0094-exec-load-uid-gid-and-groups.patch @@ -1,19 +1,19 @@ -From 900c2f8fe30d4ffdaef93f2c01d711705ab8cff9 Mon Sep 17 00:00:00 2001 +From 11edc9a59a72540f06ccb1bcfb43cc2d81b7e873 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 7 May 2019 12:55:03 +0800 -Subject: [PATCH 094/122] exec load uid gid and groups +Subject: [PATCH 094/131] exec load uid gid and groups exec load uid gid and groups Signed-off-by: liuhao Signed-off-by: LiFeng --- - src/lxc/lxccontainer.c | 69 +++++++++++++++++++++++++++++++++++++++++++++-- - src/lxc/tools/lxc_start.c | 58 --------------------------------------- + src/lxc/lxccontainer.c | 69 +++++++++++++++++++++++++++++++++++++-- + src/lxc/tools/lxc_start.c | 58 -------------------------------- 2 files changed, 67 insertions(+), 60 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index fa13e52..e0c4de3 100644 +index fa13e522..e0c4de3e 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -74,6 +74,7 @@ @@ -110,7 +110,7 @@ index fa13e52..e0c4de3 100644 if (ongoing_create(c) == 2) { diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index 4069204..af63f58 100644 +index 4069204f..af63f581 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -50,7 +50,6 @@ @@ -193,5 +193,5 @@ index 4069204..af63f58 100644 if (my_args.exit_monitor_fifo != NULL) { c->exit_fifo = strdup(my_args.exit_monitor_fifo); -- -1.8.3.1 +2.23.0 diff --git a/0095-lxc-don-t-use-the-unified-hierarchy-for-the-systemd-.patch b/0095-lxc-don-t-use-the-unified-hierarchy-for-the-systemd-.patch index 4fa4a52..c69cf1d 100644 --- a/0095-lxc-don-t-use-the-unified-hierarchy-for-the-systemd-.patch +++ b/0095-lxc-don-t-use-the-unified-hierarchy-for-the-systemd-.patch @@ -1,7 +1,7 @@ -From 92dfbde544492386418f02469af5380d7d5e7c00 Mon Sep 17 00:00:00 2001 +From 8e6ee8123309cc04ebd55b9088cd01c396cd5739 Mon Sep 17 00:00:00 2001 From: liuhao Date: Fri, 10 May 2019 11:05:42 +0800 -Subject: [PATCH 095/122] lxc: don't use the unified hierarchy for the systemd +Subject: [PATCH 095/131] lxc: don't use the unified hierarchy for the systemd cgroup reason:don't use the unified hierarchy for the systemd cgroup @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 1 file changed, 14 insertions(+) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 2bf142f..eee7ed6 100644 +index 2bf142f9..eee7ed6a 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1571,6 +1571,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -52,5 +52,5 @@ index 2bf142f..eee7ed6 100644 return retval; } -- -1.8.3.1 +2.23.0 diff --git a/0096-close-inherited-fd-in-hook-process.patch b/0096-close-inherited-fd-in-hook-process.patch index dec0378..4e2818d 100644 --- a/0096-close-inherited-fd-in-hook-process.patch +++ b/0096-close-inherited-fd-in-hook-process.patch @@ -1,7 +1,7 @@ -From 7f4352c61de6732d41285f6f949199708e459ac0 Mon Sep 17 00:00:00 2001 +From 95b371b3a04e99c63d8dab26c9c9e5f340a46f12 Mon Sep 17 00:00:00 2001 From: liuhao Date: Mon, 13 May 2019 16:45:50 +0800 -Subject: [PATCH 096/122] close inherited fd in hook process +Subject: [PATCH 096/131] close inherited fd in hook process close inherited fd in hook process @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 7 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 0f227aa..6cf86a4 100644 +index 0f227aa1..6cf86a4e 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4560,6 +4560,13 @@ static struct lxc_popen_FILE *lxc_popen_ocihook(char *commandpath, char **args, @@ -30,5 +30,5 @@ index 0f227aa..6cf86a4 100644 close(pipe_msg[1]); if (pipe_msg[0] != STDIN_FILENO) -- -1.8.3.1 +2.23.0 diff --git a/0097-lxc-report-error-when-fork-exec-error-for-hooks.patch b/0097-lxc-report-error-when-fork-exec-error-for-hooks.patch index f3e40c5..adcef24 100644 --- a/0097-lxc-report-error-when-fork-exec-error-for-hooks.patch +++ b/0097-lxc-report-error-when-fork-exec-error-for-hooks.patch @@ -1,7 +1,7 @@ -From 474a63f9c72ace7d1d49d58f6b844dc18f2b6456 Mon Sep 17 00:00:00 2001 +From 05cf3e2c1b015175be82d4040e2d2f421494ac57 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 15 May 2019 00:53:49 -0400 -Subject: [PATCH 097/122] lxc: report error when fork/exec error for hooks +Subject: [PATCH 097/131] lxc: report error when fork/exec error for hooks Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 6cf86a4..341fdab 100644 +index 6cf86a4e..341fdab5 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4559,21 +4559,12 @@ static struct lxc_popen_FILE *lxc_popen_ocihook(char *commandpath, char **args, @@ -68,5 +68,5 @@ index 6cf86a4..341fdab 100644 (conf->which >= NUM_LXC_HOOKS) ? "invalid type" : lxchook_names[conf->which], WEXITSTATUS(ret), output); -- -1.8.3.1 +2.23.0 diff --git a/0098-lxc-make-dev-bind-mount-from-host-tmpfs-for-system-c.patch b/0098-lxc-make-dev-bind-mount-from-host-tmpfs-for-system-c.patch index c812c87..70cec0d 100644 --- a/0098-lxc-make-dev-bind-mount-from-host-tmpfs-for-system-c.patch +++ b/0098-lxc-make-dev-bind-mount-from-host-tmpfs-for-system-c.patch @@ -1,7 +1,7 @@ -From 94b3ad110dc17ecad2f86ef166065293cb278295 Mon Sep 17 00:00:00 2001 +From 59487c2d1aeee28af0c74004196b5fa0f3da613c Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Wed, 15 May 2019 12:42:08 +0800 -Subject: [PATCH 098/122] lxc: make /dev bind mount from host tmpfs for system +Subject: [PATCH 098/131] lxc: make /dev bind mount from host tmpfs for system container reason:make /dev bind mount from host tmpfs for system container @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 341fdab..3780966 100644 +index 341fdab5..3780966a 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1122,7 +1122,7 @@ on_error: @@ -63,5 +63,5 @@ index 341fdab..3780966 100644 ERROR("Failed to mount \"/dev\""); goto on_error; -- -1.8.3.1 +2.23.0 diff --git a/0099-terminal-do-not-close-the-master-fd-of-pty.patch b/0099-terminal-do-not-close-the-master-fd-of-pty.patch index 2246157..3f1132a 100644 --- a/0099-terminal-do-not-close-the-master-fd-of-pty.patch +++ b/0099-terminal-do-not-close-the-master-fd-of-pty.patch @@ -1,7 +1,7 @@ -From d5d48aa449d782dce754ee87c6a3ee1706c1f967 Mon Sep 17 00:00:00 2001 +From 604a90c65668840645abfc852e26b35d4e24b81d Mon Sep 17 00:00:00 2001 From: LiFeng Date: Tue, 21 May 2019 04:53:16 -0400 -Subject: [PATCH 099/122] terminal: do not close the master fd of pty +Subject: [PATCH 099/131] terminal: do not close the master fd of pty Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index dfce92e..88653b4 100644 +index dfce92ed..88653b4f 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -595,6 +595,10 @@ int lxc_terminal_io_cb(int fd, uint32_t events, void *data, @@ -24,5 +24,5 @@ index dfce92e..88653b4 100644 if (terminal->tty_state) { lxc_terminal_signal_fini(terminal->tty_state); -- -1.8.3.1 +2.23.0 diff --git a/0100-start-add-check-save-pid-info-file.patch b/0100-start-add-check-save-pid-info-file.patch index 155b02d..708245d 100644 --- a/0100-start-add-check-save-pid-info-file.patch +++ b/0100-start-add-check-save-pid-info-file.patch @@ -1,17 +1,17 @@ -From 5f9953ea9fffa99ca3838e3b59ab3ee170e62795 Mon Sep 17 00:00:00 2001 +From 259f249756e9e67827ab1d53ac31cd985cd7d539 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 22 May 2019 23:00:17 -0400 -Subject: [PATCH 100/122] start: add check save pid info file +Subject: [PATCH 100/131] start: add check save pid info file Signed-off-by: LiFeng --- - src/lxc/start.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++-------- + src/lxc/start.c | 72 ++++++++++++++++++++++++++++++++++++++++++------- src/lxc/utils.c | 2 +- src/lxc/utils.h | 1 + 3 files changed, 64 insertions(+), 11 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 3657d4e..4541793 100644 +index 3657d4eb..45417930 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1850,14 +1850,10 @@ static inline int do_share_ns(void *arg) @@ -111,7 +111,7 @@ index 3657d4e..4541793 100644 * exec()s the requested container binary. * Note that lxc_spawn() runs in the parent namespaces. Any operations performed diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index fd6075f..dc0e6c5 100644 +index fd6075f8..dc0e6c51 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1909,7 +1909,7 @@ set_env: @@ -124,7 +124,7 @@ index fd6075f..dc0e6c5 100644 int fd, num_read; diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 20407af..4410ff2 100644 +index 20407af8..4410ff22 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -323,5 +323,6 @@ extern void lxc_write_error_message(int errfd, const char *format, ...); @@ -135,5 +135,5 @@ index 20407af..4410ff2 100644 #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0101-lxc-fix-code-error.patch b/0101-lxc-fix-code-error.patch index ad97aa3..a46fe55 100644 --- a/0101-lxc-fix-code-error.patch +++ b/0101-lxc-fix-code-error.patch @@ -1,32 +1,32 @@ -From ed19b6f4c950fc20be79f630812a3a8cfec847bd Mon Sep 17 00:00:00 2001 +From 187a14aa91f9b3c6ca6447f2de3b9df1f20ccf09 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 3 Jun 2019 05:14:46 -0400 -Subject: [PATCH 101/122] lxc: fix code error +Subject: [PATCH 101/131] lxc: fix code error Signed-off-by: LiFeng --- src/lxc/af_unix.c | 28 +- - src/lxc/cgroups/cgfsng.c | 263 ++++++------ - src/lxc/conf.c | 575 ++++++++++++++------------ + src/lxc/cgroups/cgfsng.c | 263 +++++----- + src/lxc/conf.c | 575 ++++++++++---------- src/lxc/conf.h | 28 +- - src/lxc/confile.c | 897 ++++++++++++++++++++-------------------- + src/lxc/confile.c | 897 ++++++++++++++++---------------- src/lxc/confile_utils.c | 42 +- - src/lxc/json/logger_json_file.c | 422 +++++++++---------- - src/lxc/json/read-file.c | 139 +++---- - src/lxc/log.c | 48 +-- - src/lxc/lxccontainer.c | 239 ++++++----- + src/lxc/json/logger_json_file.c | 422 +++++++-------- + src/lxc/json/read-file.c | 139 ++--- + src/lxc/log.c | 48 +- + src/lxc/lxccontainer.c | 239 +++++---- src/lxc/mainloop.c | 8 +- - src/lxc/path.c | 584 +++++++++++++++----------- + src/lxc/path.c | 584 ++++++++++++--------- src/lxc/path.h | 18 +- - src/lxc/start.c | 194 ++++----- + src/lxc/start.c | 194 +++---- src/lxc/storage/block.c | 3 +- - src/lxc/terminal.c | 129 +++--- - src/lxc/utils.c | 159 ++++--- + src/lxc/terminal.c | 129 ++--- + src/lxc/utils.c | 159 ++++-- src/lxc/utils.h | 11 +- 18 files changed, 2019 insertions(+), 1768 deletions(-) diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c -index 24500a8..4c45946 100644 +index 24500a8f..4c45946d 100644 --- a/src/lxc/af_unix.c +++ b/src/lxc/af_unix.c @@ -47,7 +47,7 @@ @@ -138,7 +138,7 @@ index 24500a8..4c45946 100644 errno = EACCES; return -1; diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index eee7ed6..67c7a0e 100644 +index eee7ed6a..67c7a0ee 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -149,7 +149,7 @@ static char *cg_legacy_must_prefix_named(char *entry) @@ -869,7 +869,7 @@ index eee7ed6..67c7a0e 100644 tmp = lxc_string_replace("%n", handler->name, ops->cgroup_pattern); if (!tmp) { diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 3780966..ec1667d 100644 +index 3780966a..ec1667d4 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -351,8 +351,8 @@ static int run_buffer(char *buffer) @@ -2382,7 +2382,7 @@ index 3780966..ec1667d 100644 * before lxc.cgroup.memory.limit_in_bytes, swap these * two items */ diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index fb3c156..26bb70f 100644 +index fb3c1560..26bb70fa 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -70,14 +70,14 @@ typedef void * scmp_filter_ctx; @@ -2466,7 +2466,7 @@ index fb3c156..26bb70f 100644 extern int setup_sysctl_parameters(struct lxc_list *sysctls); extern int lxc_clear_sysctls(struct lxc_conf *c, const char *key); diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 93936cc..216a688 100644 +index 93936ccd..216a6883 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -270,7 +270,7 @@ struct lxc_config_t *lxc_get_config(const char *key) @@ -5088,7 +5088,7 @@ index 93936cc..216a688 100644 int len; int fulllen = 0; diff --git a/src/lxc/confile_utils.c b/src/lxc/confile_utils.c -index 9049ce8..8c5208f 100644 +index 9049ce82..8c5208f1 100644 --- a/src/lxc/confile_utils.c +++ b/src/lxc/confile_utils.c @@ -46,7 +46,7 @@ @@ -5234,7 +5234,7 @@ index 9049ce8..8c5208f 100644 return -EINVAL; diff --git a/src/lxc/json/logger_json_file.c b/src/lxc/json/logger_json_file.c -index 6433b04..409ea11 100644 +index 6433b042..409ea119 100644 --- a/src/lxc/json/logger_json_file.c +++ b/src/lxc/json/logger_json_file.c @@ -8,236 +8,236 @@ @@ -5686,7 +5686,7 @@ index 6433b04..409ea11 100644 + return json_buf; } diff --git a/src/lxc/json/read-file.c b/src/lxc/json/read-file.c -index ad0eda1..70e73e5 100644 +index ad0eda1e..70e73e51 100644 --- a/src/lxc/json/read-file.c +++ b/src/lxc/json/read-file.c @@ -16,79 +16,80 @@ @@ -5840,7 +5840,7 @@ index ad0eda1..70e73e5 100644 + return buf; } diff --git a/src/lxc/log.c b/src/lxc/log.c -index 91fb7ef..e598a5f 100644 +index 91fb7efa..e598a5fb 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -157,7 +157,7 @@ static int isulad_open_fifo(const char *file_path) @@ -5975,7 +5975,7 @@ index 91fb7ef..e598a5f 100644 if (!log) return -1; diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index e0c4de3..e32f524 100644 +index e0c4de3e..e32f524d 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -111,7 +111,7 @@ static const char *lxcapi_get_config_path(struct lxc_container *c); @@ -6813,7 +6813,7 @@ index e0c4de3..e32f524 100644 int i, ret, active_cnt, ct_cnt, ct_list_cnt; char **active_name; diff --git a/src/lxc/mainloop.c b/src/lxc/mainloop.c -index 9603d1e..a127a13 100644 +index 9603d1ee..a127a13e 100644 --- a/src/lxc/mainloop.c +++ b/src/lxc/mainloop.c @@ -65,7 +65,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms) @@ -6841,7 +6841,7 @@ index 9603d1e..a127a13 100644 if (fd < 0) return 0; diff --git a/src/lxc/path.c b/src/lxc/path.c -index e917dcb..45ab4c3 100644 +index e917dcb8..45ab4c3b 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -10,6 +10,7 @@ @@ -7578,7 +7578,7 @@ index e917dcb..45ab4c3 100644 \ No newline at end of file +} diff --git a/src/lxc/path.h b/src/lxc/path.h -index e3a04cc..5100941 100644 +index e3a04cc5..51009413 100644 --- a/src/lxc/path.h +++ b/src/lxc/path.h @@ -13,7 +13,7 @@ bool has_traling_path_separator(const char *path); @@ -7622,7 +7622,7 @@ index e3a04cc..5100941 100644 // Rel returns a relative path that is lexically equivalent to targpath when // joined to basepath with an intervening separator. That is, diff --git a/src/lxc/start.c b/src/lxc/start.c -index 4541793..ccdd844 100644 +index 45417930..ccdd844c 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -93,7 +93,7 @@ extern void mod_all_rdeps(struct lxc_container *c, bool inc); @@ -8259,7 +8259,7 @@ index 4541793..ccdd844 100644 ret = -1; } diff --git a/src/lxc/storage/block.c b/src/lxc/storage/block.c -index eb75e70..8998923 100644 +index eb75e706..89989233 100644 --- a/src/lxc/storage/block.c +++ b/src/lxc/storage/block.c @@ -62,7 +62,8 @@ bool blk_detect(const char *path) @@ -8273,7 +8273,7 @@ index eb75e70..8998923 100644 return -22; diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 88653b4..802bf39 100644 +index 88653b4f..802bf392 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -113,7 +113,7 @@ void lxc_terminal_sigwinch(int sig) @@ -8638,7 +8638,7 @@ index 88653b4..802bf39 100644 lxc_terminal_delete_fifo(fifofd_in, &terminal->fifos); ret = -1; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index dc0e6c5..9ce2473 100644 +index dc0e6c51..9ce24739 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -56,6 +56,7 @@ @@ -8945,7 +8945,7 @@ index dc0e6c5..9ce2473 100644 +} + diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 4410ff2..2406ee1 100644 +index 4410ff22..2406ee15 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -229,8 +229,8 @@ extern bool switch_to_ns(pid_t pid, const char *ns); @@ -8979,5 +8979,5 @@ index 4410ff2..2406ee1 100644 +extern FILE *lxc_fopen(const char *filename, const char *mode); #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0102-lxc-fix-compile-warnings.patch b/0102-lxc-fix-compile-warnings.patch index 11c2e2a..706e343 100644 --- a/0102-lxc-fix-compile-warnings.patch +++ b/0102-lxc-fix-compile-warnings.patch @@ -1,7 +1,7 @@ -From 1693410ec532fb2197ae8f7152409ee4c29180a3 Mon Sep 17 00:00:00 2001 +From 7fbfd6a0e45744d9f779da857ddcf82e5eb92a30 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 3 Jun 2019 06:19:07 -0400 -Subject: [PATCH 102/122] lxc: fix compile warnings +Subject: [PATCH 102/131] lxc: fix compile warnings Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index ec1667d..e7df336 100644 +index ec1667d4..e7df3363 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4992,7 +4992,6 @@ int run_lxc_hooks(const char *name, char *hookname, struct lxc_conf *conf, @@ -23,7 +23,7 @@ index ec1667d..e7df336 100644 if (strcmp(hookname, "oci-prestart") == 0) { diff --git a/src/lxc/path.c b/src/lxc/path.c -index 45ab4c3..92692de 100644 +index 45ab4c3b..92692dea 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -141,7 +141,6 @@ int do_clean_path(const char *respath, const char *limit_respath, @@ -67,7 +67,7 @@ index 45ab4c3..92692de 100644 if (fullpath == NULL || rootpath == NULL) { return NULL; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 9ce2473..e674947 100644 +index 9ce24739..e6749471 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2106,7 +2106,7 @@ void *lxc_common_calloc_s(size_t size) @@ -80,5 +80,5 @@ index 9ce2473..e674947 100644 goto err_out; } -- -1.8.3.1 +2.23.0 diff --git a/0103-lxc-fix-code-error-in-conf.c.patch b/0103-lxc-fix-code-error-in-conf.c.patch index 14d1efe..f241f02 100644 --- a/0103-lxc-fix-code-error-in-conf.c.patch +++ b/0103-lxc-fix-code-error-in-conf.c.patch @@ -1,7 +1,7 @@ -From d3f6e8e611dd6b3160d58159e99565c3686e6398 Mon Sep 17 00:00:00 2001 +From ea13ba8a5d6958f6302482ca5a3d718381bca657 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 3 Jun 2019 11:14:22 -0400 -Subject: [PATCH 103/122] lxc: fix code error in conf.c +Subject: [PATCH 103/131] lxc: fix code error in conf.c Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index e7df336..127ef77 100644 +index e7df3363..127ef77b 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2446,7 +2446,8 @@ static int check_mount_destination(const char *rootfs, const char *dest) @@ -92,7 +92,7 @@ index e7df336..127ef77 100644 return 0; diff --git a/src/lxc/conf.h b/src/lxc/conf.h -index 26bb70f..e4bfc48 100644 +index 26bb70fa..e4bfc48f 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -445,7 +445,7 @@ extern struct lxc_conf *current_config; @@ -105,5 +105,5 @@ index 26bb70f..e4bfc48 100644 extern int detect_shared_rootfs(void); extern struct lxc_conf *lxc_conf_init(void); -- -1.8.3.1 +2.23.0 diff --git a/0104-lxc-fix-code-error.patch b/0104-lxc-fix-code-error.patch index 2e518a7..291e8b6 100644 --- a/0104-lxc-fix-code-error.patch +++ b/0104-lxc-fix-code-error.patch @@ -1,7 +1,7 @@ -From 6068ac0d2ac11c158749ffda00135cf5325207fe Mon Sep 17 00:00:00 2001 +From 79a38af7d57e0ec7e527d1d28e8575c3fcfa4a45 Mon Sep 17 00:00:00 2001 From: tanyifeng Date: Mon, 3 Jun 2019 11:27:34 -0400 -Subject: [PATCH 104/122] lxc: fix code error +Subject: [PATCH 104/131] lxc: fix code error Signed-off-by: tanyifeng Signed-off-by: LiFeng @@ -15,7 +15,7 @@ Signed-off-by: LiFeng 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c -index 4c45946..1fc8ab0 100644 +index 4c45946d..1fc8ab0e 100644 --- a/src/lxc/af_unix.c +++ b/src/lxc/af_unix.c @@ -204,12 +204,18 @@ int lxc_abstract_unix_recv_fds_timeout(int fd, int *recvfds, int num_recvfds, @@ -39,7 +39,7 @@ index 4c45946..1fc8ab0 100644 if (!cmsgbuf) { errno = ENOMEM; diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 67c7a0e..46f13f4 100644 +index 67c7a0ee..46f13f4d 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1688,7 +1688,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, @@ -68,7 +68,7 @@ index 67c7a0e..46f13f4 100644 p = strchr(controller, '.'); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index e32f524..72417ed 100644 +index e32f524d..72417ed6 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1208,6 +1208,7 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a @@ -88,7 +88,7 @@ index e32f524..72417ed 100644 on_error: if (c->pidfile) { diff --git a/src/lxc/path.c b/src/lxc/path.c -index 92692de..36d5e0b 100644 +index 92692dea..36d5e0be 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -31,6 +31,7 @@ bool specify_current_dir(const char *path) @@ -100,7 +100,7 @@ index 92692de..36d5e0b 100644 return false; } diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 802bf39..a8a0dc9 100644 +index 802bf392..a8a0dc97 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -231,7 +231,7 @@ static int lxc_terminal_truncate_log_file(struct lxc_terminal *terminal) @@ -145,7 +145,7 @@ index 802bf39..a8a0dc9 100644 } diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index e674947..9db762f 100644 +index e6749471..9db762fb 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1769,11 +1769,11 @@ int fd_cloexec(int fd, bool cloexec) @@ -175,5 +175,5 @@ index e674947..9db762f 100644 } -- -1.8.3.1 +2.23.0 diff --git a/0105-lxc-fix-code-error-warnings.patch b/0105-lxc-fix-code-error-warnings.patch index a7f9bf5..b588958 100644 --- a/0105-lxc-fix-code-error-warnings.patch +++ b/0105-lxc-fix-code-error-warnings.patch @@ -1,7 +1,7 @@ -From 2ec27dbac6d9e6e9b6aafb7eef205d4e89e2950e Mon Sep 17 00:00:00 2001 +From 9f0429283bfb550036831afcc19026963d42a4e8 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 3 Jun 2019 23:02:50 -0400 -Subject: [PATCH 105/122] lxc: fix code error warnings +Subject: [PATCH 105/131] lxc: fix code error warnings Signed-off-by: LiFeng --- @@ -11,7 +11,7 @@ Signed-off-by: LiFeng 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 127ef77..8311723 100644 +index 127ef77b..83117238 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -5325,9 +5325,12 @@ int lxc_clear_init_args(struct lxc_conf *lxc_conf) @@ -29,7 +29,7 @@ index 127ef77..8311723 100644 return 0; diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 72417ed..a09e066 100644 +index 72417ed6..a09e066a 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1180,6 +1180,7 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a @@ -57,7 +57,7 @@ index 72417ed..a09e066 100644 on_error: if (c->pidfile) { diff --git a/src/lxc/start.c b/src/lxc/start.c -index ccdd844..2380581 100644 +index ccdd844c..2380581f 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2421,7 +2421,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler, @@ -70,5 +70,5 @@ index ccdd844..2380581 100644 handler->ops = ops; handler->data = data; -- -1.8.3.1 +2.23.0 diff --git a/0106-set-timeout-to-1s-for-cmds-send-to-lxc-monitor.patch b/0106-set-timeout-to-1s-for-cmds-send-to-lxc-monitor.patch index 84ebf12..7f7724d 100644 --- a/0106-set-timeout-to-1s-for-cmds-send-to-lxc-monitor.patch +++ b/0106-set-timeout-to-1s-for-cmds-send-to-lxc-monitor.patch @@ -1,7 +1,7 @@ -From b3df22c4905ca0ad208643a015e01405ae395cdb Mon Sep 17 00:00:00 2001 +From 412831f8677bfe78a9e473a473c29e1441cf7fe9 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 6 Jun 2019 22:48:38 -0400 -Subject: [PATCH 106/122] set timeout to 1s for cmds send to [lxc monitor] +Subject: [PATCH 106/131] set timeout to 1s for cmds send to [lxc monitor] Signed-off-by: LiFeng --- @@ -9,7 +9,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index c74b8c1..0802a16 100644 +index c74b8c1f..0802a167 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -127,10 +127,10 @@ static int lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd) @@ -27,5 +27,5 @@ index c74b8c1..0802a16 100644 if (errno == ECONNRESET || errno == EAGAIN || errno == EWOULDBLOCK) { -- -1.8.3.1 +2.23.0 diff --git a/0107-add-log-for-failure-of-rename-file.patch b/0107-add-log-for-failure-of-rename-file.patch index 040184f..3a4d188 100644 --- a/0107-add-log-for-failure-of-rename-file.patch +++ b/0107-add-log-for-failure-of-rename-file.patch @@ -1,7 +1,7 @@ -From a3e02850527e08f396f8050c41afdd5f23d836b8 Mon Sep 17 00:00:00 2001 +From ab769b5cde6f65355eb395b7477acda3c5fbd381 Mon Sep 17 00:00:00 2001 From: liuhao Date: Mon, 17 Jun 2019 20:17:37 +0800 -Subject: [PATCH 107/122] add log for failure of rename file +Subject: [PATCH 107/131] add log for failure of rename file 1. add log message of rename operator 2. if rename console file failed, reopen terminal fd @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index a8a0dc9..778a0ab 100644 +index a8a0dc97..778a0abd 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -293,8 +293,9 @@ static int lxc_terminal_rotate_log_file(struct lxc_terminal *terminal) @@ -29,5 +29,5 @@ index a8a0dc9..778a0ab 100644 return lxc_terminal_create_log_file(terminal); } -- -1.8.3.1 +2.23.0 diff --git a/0108-check-calloc-input-valid.patch b/0108-check-calloc-input-valid.patch index 612c5aa..80a3e3d 100644 --- a/0108-check-calloc-input-valid.patch +++ b/0108-check-calloc-input-valid.patch @@ -1,7 +1,7 @@ -From 6c12aebb600013e2eb8b970be51bff4d4bed6fb6 Mon Sep 17 00:00:00 2001 +From b00c15567bc0fedc87f5e31106fadc5fbea1ca54 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 18 Jun 2019 23:16:09 +0800 -Subject: [PATCH 108/122] check calloc input valid +Subject: [PATCH 108/131] check calloc input valid check calloc input valid @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 778a0ab..6b117de 100644 +index 778a0abd..6b117de7 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -444,8 +444,11 @@ static ssize_t lxc_logger_write(struct lxc_terminal *terminal, const char *type, @@ -29,5 +29,5 @@ index 778a0ab..6b117de 100644 } msg->log = calloc(bytes_read, 1); -- -1.8.3.1 +2.23.0 diff --git a/0109-add-secure-compile-flags-to-lxc.patch b/0109-add-secure-compile-flags-to-lxc.patch index ebf2bb1..6465940 100644 --- a/0109-add-secure-compile-flags-to-lxc.patch +++ b/0109-add-secure-compile-flags-to-lxc.patch @@ -1,7 +1,7 @@ -From f6b39a07c8622c65bf10f484a455ba79f53b15f7 Mon Sep 17 00:00:00 2001 +From 75df0fd2adec8d697fc3d96df21dcdd74cb6f98e Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 20 Jun 2019 17:46:40 +0800 -Subject: [PATCH 109/122] add secure compile flags to lxc +Subject: [PATCH 109/131] add secure compile flags to lxc add secure compile flags to lxc @@ -13,7 +13,7 @@ Signed-off-by: LiFeng 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac -index 4da52a2..a714779 100644 +index 4da52a27..a7147794 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects]) @@ -78,7 +78,7 @@ index 4da52a2..a714779 100644 [AC_HELP_STRING([--enable-thread-safety], [enforce thread-safety otherwise fail the build [default=yes]])], [], [enable_thread_safety=yes]) diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index 4ec2081..b24fcfd 100644 +index 4ec20812..b24fcfdb 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -233,12 +233,17 @@ endif @@ -100,5 +100,5 @@ index 4ec2081..b24fcfd 100644 -version-info @LXC_ABI_MAJOR@ @YAJL_LIBS@ -- -1.8.3.1 +2.23.0 diff --git a/0110-add-doc-for-lxc.patch b/0110-add-doc-for-lxc.patch index e5fd45e..6d3df24 100644 --- a/0110-add-doc-for-lxc.patch +++ b/0110-add-doc-for-lxc.patch @@ -1,7 +1,7 @@ -From 4fcbbaad8e41594629cda4694e0f2b4b5850f398 Mon Sep 17 00:00:00 2001 +From 25640fa1a09fade4ae15ba9a14a110f4a36cd0c8 Mon Sep 17 00:00:00 2001 From: liuhao Date: Fri, 21 Jun 2019 17:20:43 +0800 -Subject: [PATCH 110/122] add doc for lxc +Subject: [PATCH 110/131] add doc for lxc add doc for lxc @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index a714779..5963fab 100644 +index a7147794..5963fab1 100644 --- a/configure.ac +++ b/configure.ac @@ -206,8 +206,8 @@ AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"]) @@ -27,5 +27,5 @@ index a714779..5963fab 100644 if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then db2xman="" -- -1.8.3.1 +2.23.0 diff --git a/0111-lxc-use-safe_strdup-instead-of-strdup.patch b/0111-lxc-use-safe_strdup-instead-of-strdup.patch index 51187c9..a7788bf 100644 --- a/0111-lxc-use-safe_strdup-instead-of-strdup.patch +++ b/0111-lxc-use-safe_strdup-instead-of-strdup.patch @@ -1,31 +1,31 @@ -From 3c466cfdde64c75addc902f6e367666c18040ac3 Mon Sep 17 00:00:00 2001 +From eb7e43a1814f9c1a3a02a4a17fd231ea1b31e3ab Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 3 Jul 2019 23:41:15 -0400 -Subject: [PATCH 111/122] lxc: use safe_strdup instead of strdup +Subject: [PATCH 111/131] lxc: use safe_strdup instead of strdup Signed-off-by: LiFeng --- - src/lxc/attach.c | 14 +++++--------- - src/lxc/conf.c | 32 +++++++++---------------------- - src/lxc/confile.c | 32 +++++++++---------------------- + src/lxc/attach.c | 14 ++++------- + src/lxc/conf.c | 32 +++++++------------------ + src/lxc/confile.c | 32 +++++++------------------ src/lxc/json/defs.c | 1 - - src/lxc/json/json_common.c | 41 ++++++++++++---------------------------- + src/lxc/json/json_common.c | 41 ++++++++++---------------------- src/lxc/json/json_common.h | 4 +--- src/lxc/json/logger_json_file.c | 1 - src/lxc/json/oci_runtime_hooks.c | 4 ++-- src/lxc/json/oci_runtime_spec.c | 1 - - src/lxc/lxccontainer.c | 16 +++++++--------- - src/lxc/path.c | 20 +++++--------------- - src/lxc/start.c | 18 +++++++++--------- - src/lxc/terminal.c | 18 +++++++----------- + src/lxc/lxccontainer.c | 16 ++++++------- + src/lxc/path.c | 20 ++++------------ + src/lxc/start.c | 18 +++++++------- + src/lxc/terminal.c | 18 ++++++-------- src/lxc/tools/lxc_attach.c | 4 ++-- src/lxc/tools/lxc_start.c | 2 +- - src/lxc/utils.c | 16 ++++++++++++++++ + src/lxc/utils.c | 16 +++++++++++++ src/lxc/utils.h | 2 ++ 17 files changed, 87 insertions(+), 139 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index 6480eb9..d7b16e3 100644 +index 6480eb99..d7b16e34 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1070,15 +1070,15 @@ static int lxc_attach_terminal(struct lxc_conf *conf, @@ -70,7 +70,7 @@ index 6480eb9..d7b16e3 100644 close_mainloop: if (options->attach_flags & LXC_ATTACH_TERMINAL) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 8311723..1dfdaf3 100644 +index 83117238..1dfdaf31 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1356,9 +1356,7 @@ static int rootfs_parent_mount_private(char *rootfs) @@ -166,7 +166,7 @@ index 8311723..1dfdaf3 100644 } diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 216a688..8262d1e 100644 +index 216a6883..8262d1e3 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -1011,9 +1011,7 @@ static int set_config_group(const char *key, const char *value, @@ -259,7 +259,7 @@ index 216a688..8262d1e 100644 } diff --git a/src/lxc/json/defs.c b/src/lxc/json/defs.c -index e7d9a09..8a052a8 100644 +index e7d9a092..8a052a88 100644 --- a/src/lxc/json/defs.c +++ b/src/lxc/json/defs.c @@ -4,7 +4,6 @@ @@ -271,7 +271,7 @@ index e7d9a09..8a052a8 100644 defs_hook *make_defs_hook(yajl_val tree, struct parser_context *ctx, parser_error *err) { diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index 54b7b61..bea9b14 100755 +index 54b7b610..bea9b14d 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -381,23 +381,6 @@ int common_safe_int(const char *numstr, int *converted) { @@ -389,7 +389,7 @@ index 54b7b61..bea9b14 100755 free(vals); return -1; diff --git a/src/lxc/json/json_common.h b/src/lxc/json/json_common.h -index 218a837..60aa5fd 100755 +index 218a8371..60aa5fd9 100755 --- a/src/lxc/json/json_common.h +++ b/src/lxc/json/json_common.h @@ -9,7 +9,7 @@ @@ -411,7 +411,7 @@ index 218a837..60aa5fd 100755 int *keys; int *values; diff --git a/src/lxc/json/logger_json_file.c b/src/lxc/json/logger_json_file.c -index 409ea11..842d35b 100644 +index 409ea119..842d35b5 100644 --- a/src/lxc/json/logger_json_file.c +++ b/src/lxc/json/logger_json_file.c @@ -4,7 +4,6 @@ @@ -423,7 +423,7 @@ index 409ea11..842d35b 100644 logger_json_file *make_logger_json_file(yajl_val tree, struct parser_context *ctx, parser_error *err) { diff --git a/src/lxc/json/oci_runtime_hooks.c b/src/lxc/json/oci_runtime_hooks.c -index 43ff8d7..41ddb67 100644 +index 43ff8d7f..41ddb672 100644 --- a/src/lxc/json/oci_runtime_hooks.c +++ b/src/lxc/json/oci_runtime_hooks.c @@ -34,7 +34,7 @@ oci_runtime_spec_hooks *oci_runtime_spec_hooks_parse_file(const char *filename, @@ -445,7 +445,7 @@ index 43ff8d7..41ddb67 100644 return NULL; } diff --git a/src/lxc/json/oci_runtime_spec.c b/src/lxc/json/oci_runtime_spec.c -index 4ccb635..fd342de 100644 +index 4ccb6358..fd342deb 100644 --- a/src/lxc/json/oci_runtime_spec.c +++ b/src/lxc/json/oci_runtime_spec.c @@ -4,7 +4,6 @@ @@ -457,7 +457,7 @@ index 4ccb635..fd342de 100644 oci_runtime_spec_hooks *make_oci_runtime_spec_hooks(yajl_val tree, struct parser_context *ctx, parser_error *err) { diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index a09e066..ede4c88 100644 +index a09e066a..ede4c885 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1055,9 +1055,7 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a @@ -520,7 +520,7 @@ index a09e066..ede4c88 100644 if (!c->config_path) { fprintf(stderr, "Failed to allocate memory for %s\n", name); diff --git a/src/lxc/path.c b/src/lxc/path.c -index 36d5e0b..c545887 100644 +index 36d5e0be..c545887a 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -23,11 +23,7 @@ bool specify_current_dir(const char *path) @@ -577,7 +577,7 @@ index 36d5e0b..c545887 100644 + return safe_strdup(targ + t0); } diff --git a/src/lxc/start.c b/src/lxc/start.c -index 2380581..d6c706e 100644 +index 2380581f..d6c706e7 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2795,35 +2795,35 @@ static int clean_resource_set_env(struct lxc_handler *handler) @@ -626,7 +626,7 @@ index 2380581..d6c706e 100644 conf->ocihooks->poststop[i]->env_len = j; /* End of environment variable setup for hooks. */ diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 6b117de..970db69 100644 +index 6b117de7..970db694 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -246,7 +246,7 @@ static int lxc_terminal_rename_old_log_file(struct lxc_terminal *terminal) @@ -678,7 +678,7 @@ index 6b117de..970db69 100644 in = strtok_r(tmp, "&&&&", &saveptr); if (!in) { diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c -index 854b3a2..7d51ad7 100644 +index 854b3a2c..7d51ad72 100644 --- a/src/lxc/tools/lxc_attach.c +++ b/src/lxc/tools/lxc_attach.c @@ -309,7 +309,7 @@ static int do_attach_foreground(struct lxc_container *c, lxc_attach_command_t *c @@ -700,7 +700,7 @@ index 854b3a2..7d51ad7 100644 } diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c -index af63f58..e48e5b3 100644 +index af63f581..e48e5b3e 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -360,7 +360,7 @@ int main(int argc, char *argv[]) @@ -713,7 +713,7 @@ index af63f58..e48e5b3 100644 /* isulad: add start timeout */ diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 9db762f..e6e8905 100644 +index 9db762fb..e6e8905b 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2157,3 +2157,19 @@ FILE *lxc_fopen(const char *filename, const char *mode) @@ -737,7 +737,7 @@ index 9db762f..e6e8905 100644 +} + diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 2406ee1..0b33f69 100644 +index 2406ee15..0b33f690 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -328,4 +328,6 @@ extern int lxc_mem_realloc(void **newptr, size_t newsize, void *oldptr, size_t o @@ -748,5 +748,5 @@ index 2406ee1..0b33f69 100644 + #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0112-fix-secure-errors.patch b/0112-fix-secure-errors.patch index 86bd6af..f01430a 100644 --- a/0112-fix-secure-errors.patch +++ b/0112-fix-secure-errors.patch @@ -1,7 +1,7 @@ -From aa6bea319eb9d86b296589e17219f96f6d0e3ed1 Mon Sep 17 00:00:00 2001 +From 0398da2058282e3627ec7fc3922b439c1541078c Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 4 Jul 2019 11:08:26 +0800 -Subject: [PATCH 112/122] fix secure errors +Subject: [PATCH 112/131] fix secure errors 1. use snprintf replace sprintf 2. use malloc replace alloca @@ -17,7 +17,7 @@ Signed-off-by: LiFeng 5 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 1dfdaf3..996d267 100644 +index 1dfdaf31..996d2671 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4543,18 +4543,20 @@ static char **merge_ocihook_env(char **oldenvs, size_t env_len, size_t *merge_en @@ -44,7 +44,7 @@ index 1dfdaf3..996d267 100644 continue; } diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 8262d1e..8a082d5 100644 +index 8262d1e3..8a082d55 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3802,9 +3802,11 @@ static int get_config_no_new_privs(const char *key, char *retv, int inlen, @@ -115,7 +115,7 @@ index 8262d1e..8a082d5 100644 strprint(retv, inlen, "%s", buf); } diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index bea9b14..5da1e6d 100755 +index bea9b14d..5da1e6de 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -16,7 +16,7 @@ yajl_gen_status reformat_uint(void *ctx, long long unsigned int num) { @@ -171,7 +171,7 @@ index bea9b14..5da1e6d 100755 \ No newline at end of file +} diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index ede4c88..3b2c5af 100644 +index ede4c885..3b2c5af2 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3196,7 +3196,11 @@ static bool container_destroy(struct lxc_container *c, @@ -197,7 +197,7 @@ index ede4c88..3b2c5af 100644 return -1; } diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 970db69..b9b65c6 100644 +index 970db694..b9b65c6f 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -241,13 +241,13 @@ static int lxc_terminal_rename_old_log_file(struct lxc_terminal *terminal) @@ -274,5 +274,5 @@ index 970db69..b9b65c6 100644 return true; } -- -1.8.3.1 +2.23.0 diff --git a/0113-Malloc-parameter-check-and-judgment.patch b/0113-Malloc-parameter-check-and-judgment.patch index 8416812..87ff59d 100644 --- a/0113-Malloc-parameter-check-and-judgment.patch +++ b/0113-Malloc-parameter-check-and-judgment.patch @@ -1,28 +1,28 @@ -From f53063c9edbb851756c4e0af0840a0d81e0b5276 Mon Sep 17 00:00:00 2001 +From c9bcf39716f166bc44e3d1d1cd65a246646a7bb4 Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 4 Jul 2019 12:08:17 +0800 -Subject: [PATCH 113/122] Malloc parameter check and judgment +Subject: [PATCH 113/131] Malloc parameter check and judgment Signed-off-by: wujing Signed-off-by: LiFeng --- - src/lxc/attach.c | 2 +- - src/lxc/commands.c | 9 ++- - src/lxc/conf.c | 20 ++++-- - src/lxc/confile.c | 8 +-- - src/lxc/json/container_start_generate_config.c | 12 +++- - src/lxc/json/defs.c | 8 +++ - src/lxc/json/json_common.c | 97 +++++++++----------------- - src/lxc/json/logger_json_file.c | 6 +- - src/lxc/lxccontainer.c | 12 +++- - src/lxc/path.c | 8 ++- - src/lxc/start.c | 6 +- - src/lxc/terminal.c | 2 +- - src/lxc/utils.c | 4 +- + src/lxc/attach.c | 2 +- + src/lxc/commands.c | 9 +- + src/lxc/conf.c | 20 ++-- + src/lxc/confile.c | 8 +- + .../json/container_start_generate_config.c | 12 ++- + src/lxc/json/defs.c | 8 ++ + src/lxc/json/json_common.c | 97 +++++++------------ + src/lxc/json/logger_json_file.c | 6 +- + src/lxc/lxccontainer.c | 12 ++- + src/lxc/path.c | 8 +- + src/lxc/start.c | 6 +- + src/lxc/terminal.c | 2 +- + src/lxc/utils.c | 4 +- 13 files changed, 104 insertions(+), 90 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index d7b16e3..ac4bd39 100644 +index d7b16e34..ac4bd390 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1188,7 +1188,7 @@ static int create_attach_timeout_thread(int64_t attach_timeout, pid_t pid) @@ -35,7 +35,7 @@ index d7b16e3..ac4bd39 100644 ret = -1; goto out; diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index 0802a16..fa02a4b 100644 +index 0802a167..fa02a4b7 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1075,11 +1075,16 @@ int lxc_cmd_set_terminal_fifos(const char *name, const char *lxcpath, const char @@ -58,7 +58,7 @@ index 0802a16..fa02a4b 100644 struct lxc_cmd_rr cmd = { .req = { diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 996d267..3ecccbd 100644 +index 996d2671..3ecccbd6 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4393,7 +4393,11 @@ int lxc_drop_caps(struct lxc_conf *conf) @@ -126,7 +126,7 @@ index 996d267..3ecccbd 100644 goto on_error; } diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 8a082d5..a75e023 100644 +index 8a082d55..a75e023b 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2318,13 +2318,13 @@ static int set_config_populate_device(const char *key, const char *value, @@ -164,7 +164,7 @@ index 8a082d5..a75e023 100644 list_item->elem = safe_strdup(value); diff --git a/src/lxc/json/container_start_generate_config.c b/src/lxc/json/container_start_generate_config.c -index 5ec8311..3748973 100644 +index 5ec83114..3748973c 100644 --- a/src/lxc/json/container_start_generate_config.c +++ b/src/lxc/json/container_start_generate_config.c @@ -41,6 +41,11 @@ container_start_generate_config *make_container_start_generate_config(yajl_val t @@ -195,7 +195,7 @@ index 5ec8311..3748973 100644 free_out: diff --git a/src/lxc/json/defs.c b/src/lxc/json/defs.c -index 8a052a8..4bf569a 100644 +index 8a052a88..4bf569a4 100644 --- a/src/lxc/json/defs.c +++ b/src/lxc/json/defs.c @@ -24,6 +24,10 @@ defs_hook *make_defs_hook(yajl_val tree, struct parser_context *ctx, parser_erro @@ -221,7 +221,7 @@ index 8a052a8..4bf569a 100644 for (i = 0; i < YAJL_GET_ARRAY(tmp)->len; i++) { yajl_val val = YAJL_GET_ARRAY(tmp)->values[i]; diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index 5da1e6d..ed2fe83 100755 +index 5da1e6de..ed2fe834 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -445,6 +445,9 @@ json_map_int_int *make_json_map_int_int(yajl_val src, struct parser_context *ctx @@ -420,7 +420,7 @@ index 5da1e6d..ed2fe83 100755 free(map->keys); map->keys = keys; diff --git a/src/lxc/json/logger_json_file.c b/src/lxc/json/logger_json_file.c -index 842d35b..6abeef4 100644 +index 842d35b5..6abeef45 100644 --- a/src/lxc/json/logger_json_file.c +++ b/src/lxc/json/logger_json_file.c @@ -230,8 +230,12 @@ char *logger_json_file_generate_json(logger_json_file *ptr, struct parser_contex @@ -438,7 +438,7 @@ index 842d35b..6abeef4 100644 free_out: diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 3b2c5af..5a72483 100644 +index 3b2c5af2..5a724838 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -928,6 +928,9 @@ static char **use_init_args(char **init_argv, size_t init_args) @@ -480,7 +480,7 @@ index 3b2c5af..5a72483 100644 if (snprintf(fpath, PATH_MAX, "%s/%s/%s", c->config_path, c->name, START_GENERATE_CONFIG) < 0) { fprintf(stderr, "Sprintf config path failed\n"); diff --git a/src/lxc/path.c b/src/lxc/path.c -index c545887..df285f5 100644 +index c545887a..df285f54 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -58,7 +58,7 @@ char *preserve_trailing_dot_or_separator(const char *cleanedpath, @@ -511,7 +511,7 @@ index c545887..df285f5 100644 return false; } diff --git a/src/lxc/start.c b/src/lxc/start.c -index d6c706e..00d478c 100644 +index d6c706e7..00d478c4 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2383,7 +2383,7 @@ static int create_start_timeout_thread(struct lxc_conf *conf, unsigned int start @@ -542,7 +542,7 @@ index d6c706e..00d478c 100644 memset(handler, 0, sizeof(*handler)); diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index b9b65c6..1fee651 100644 +index b9b65c6f..1fee6516 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -1330,7 +1330,7 @@ static int lxc_terminal_set_fifo(struct lxc_terminal *console, const char *in, c @@ -555,7 +555,7 @@ index b9b65c6..1fee651 100644 close(fifofd_in); if (fifofd_out >= 0) diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index e6e8905..656df4a 100644 +index e6e8905b..656df4a3 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1945,9 +1945,9 @@ static proc_t *lxc_stat2proc(const char *S) @@ -571,5 +571,5 @@ index e6e8905..656df4a 100644 /* parse these two strings separately, skipping the leading "(". */ num = sscanf(S, "%d (%15c", &P->pid, P->cmd); /* comm[16] in kernel */ -- -1.8.3.1 +2.23.0 diff --git a/0114-lxc-fix-code-errors.patch b/0114-lxc-fix-code-errors.patch index d755933..ba106ee 100644 --- a/0114-lxc-fix-code-errors.patch +++ b/0114-lxc-fix-code-errors.patch @@ -1,7 +1,7 @@ -From 5797a2ceac0c911adf3edbe3e50a9c9c23858ced Mon Sep 17 00:00:00 2001 +From 703f8955560af26e5390f7e3ee493c3c8204cacb Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 4 Jul 2019 05:10:00 -0400 -Subject: [PATCH 114/122] lxc: fix code errors +Subject: [PATCH 114/131] lxc: fix code errors Signed-off-by: LiFeng --- @@ -12,7 +12,7 @@ Signed-off-by: LiFeng 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c -index ac4bd39..1f14eb4 100644 +index ac4bd390..1f14eb45 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -841,7 +841,7 @@ static int attach_child_main(struct attach_clone_payload *payload) @@ -65,7 +65,7 @@ index ac4bd39..1f14eb4 100644 goto on_error; } diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 3ecccbd..e22e13e 100644 +index 3ecccbd6..e22e13e8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4790,6 +4790,7 @@ static int run_ocihook_buffer(struct oci_hook_conf *oconf, const char *inmsg) @@ -108,7 +108,7 @@ index 3ecccbd..e22e13e 100644 free(err_args_msg); free(err_envs_msg); diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index a75e023..0537ebc 100644 +index a75e023b..0537ebcf 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3828,9 +3828,7 @@ static int get_config_prlimit(const char *key, char *retv, int inlen, @@ -134,7 +134,7 @@ index a75e023..0537ebc 100644 nret = snprintf(buf + partlen, (MAX_LIMIT_BUF_LEN - partlen), ":%" PRIu64, (uint64_t)lim->limit.rlim_max); if (nret < 0) { diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 1fee651..32c69a4 100644 +index 1fee6516..32c69a49 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -289,10 +289,8 @@ static int lxc_terminal_rotate_log_file(struct lxc_terminal *terminal) @@ -151,5 +151,5 @@ index 1fee651..32c69a4 100644 ret = snprintf(tmp, len, "%s.1", terminal->log_path); if (ret < 0 || (size_t)ret >= len) { -- -1.8.3.1 +2.23.0 diff --git a/0115-fix-compile-error-on-ubuntu.patch b/0115-fix-compile-error-on-ubuntu.patch index ac4269d..a5590e5 100644 --- a/0115-fix-compile-error-on-ubuntu.patch +++ b/0115-fix-compile-error-on-ubuntu.patch @@ -1,7 +1,7 @@ -From 7fb5e2b059486b8bd466e2bcb9294653cc62c6d0 Mon Sep 17 00:00:00 2001 +From b1f801be29895369ae393b334005ad3bf87e371f Mon Sep 17 00:00:00 2001 From: liuhao Date: Thu, 11 Jul 2019 17:42:00 +0800 -Subject: [PATCH 115/122] fix compile error on ubuntu +Subject: [PATCH 115/131] fix compile error on ubuntu fix compile error on ubuntu @@ -9,20 +9,20 @@ Signed-off-by: liuhao Signed-off-by: LiFeng --- configure.ac | 1 - - src/lxc/Makefile.am | 10 ++++-- + src/lxc/Makefile.am | 10 ++++- src/lxc/conf.c | 2 +- src/lxc/confile.c | 2 +- - src/lxc/isulad_utils.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/lxc/isulad_utils.h | 13 ++++++++ + src/lxc/isulad_utils.c | 87 ++++++++++++++++++++++++++++++++++++++++++ + src/lxc/isulad_utils.h | 13 +++++++ src/lxc/path.c | 2 +- - src/lxc/utils.c | 82 +---------------------------------------------- - src/lxc/utils.h | 6 +--- + src/lxc/utils.c | 82 +-------------------------------------- + src/lxc/utils.h | 6 +-- 9 files changed, 113 insertions(+), 92 deletions(-) create mode 100644 src/lxc/isulad_utils.c create mode 100644 src/lxc/isulad_utils.h diff --git a/configure.ac b/configure.ac -index 5963fab..dc85f74 100644 +index 5963fab1..dc85f746 100644 --- a/configure.ac +++ b/configure.ac @@ -706,7 +706,6 @@ AX_CHECK_LINK_FLAG([-z relro], [LDFLAGS="$LDFLAGS -z relro"],,[]) @@ -34,7 +34,7 @@ index 5963fab..dc85f74 100644 CFLAGS="$CFLAGS -Wvla -std=gnu11 -D_FORTIFY_SOURCE=2 -Wall -fPIC -fPIE -pie" if test "x$enable_werror" = "xyes"; then diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am -index b24fcfd..27240cc 100644 +index b24fcfdb..27240cc4 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -50,6 +50,7 @@ noinst_HEADERS = attach.h \ @@ -96,7 +96,7 @@ index b24fcfd..27240cc 100644 namespace.c namespace.h \ string_utils.c string_utils.h diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index e22e13e..d9a7aae 100644 +index e22e13e8..d9a7aae1 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4934,7 +4934,7 @@ static int do_run_oci_hooks(const char *name, const char *lxcpath, struct lxc_co @@ -109,7 +109,7 @@ index e22e13e..d9a7aae 100644 break; case OCI_HOOK_POSTSTOP: diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 0537ebc..01fc944 100644 +index 0537ebcf..01fc9443 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2212,7 +2212,7 @@ static int set_config_init_args(const char *key, const char *value, @@ -123,7 +123,7 @@ index 0537ebc..01fc944 100644 ret = set_config_string_item(&new_value, value); diff --git a/src/lxc/isulad_utils.c b/src/lxc/isulad_utils.c new file mode 100644 -index 0000000..66516a8 +index 00000000..66516a80 --- /dev/null +++ b/src/lxc/isulad_utils.c @@ -0,0 +1,87 @@ @@ -216,7 +216,7 @@ index 0000000..66516a8 +} diff --git a/src/lxc/isulad_utils.h b/src/lxc/isulad_utils.h new file mode 100644 -index 0000000..852d956 +index 00000000..852d9562 --- /dev/null +++ b/src/lxc/isulad_utils.h @@ -0,0 +1,13 @@ @@ -234,7 +234,7 @@ index 0000000..852d956 + +#endif diff --git a/src/lxc/path.c b/src/lxc/path.c -index df285f5..7a5dce9 100644 +index df285f54..7a5dce95 100644 --- a/src/lxc/path.c +++ b/src/lxc/path.c @@ -10,7 +10,7 @@ @@ -247,7 +247,7 @@ index df285f5..7a5dce9 100644 lxc_log_define(lxc_path_ui, lxc); diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 656df4a..1d2e9ee 100644 +index 656df4a3..1d2e9ee4 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -57,6 +57,7 @@ @@ -344,7 +344,7 @@ index 656df4a..1d2e9ee 100644 -} - diff --git a/src/lxc/utils.h b/src/lxc/utils.h -index 0b33f69..1c9bf41 100644 +index 0b33f690..1c9bf418 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -42,6 +42,7 @@ @@ -367,5 +367,5 @@ index 0b33f69..1c9bf41 100644 #endif /* __LXC_UTILS_H */ -- -1.8.3.1 +2.23.0 diff --git a/0116-lxc-set-base-cgroup-path-to.patch b/0116-lxc-set-base-cgroup-path-to.patch index b1eaa84..0795fb9 100644 --- a/0116-lxc-set-base-cgroup-path-to.patch +++ b/0116-lxc-set-base-cgroup-path-to.patch @@ -1,7 +1,7 @@ -From 575a5f505195e9282b0cbffa3f8a446613252861 Mon Sep 17 00:00:00 2001 +From e384c4e2a1088b2456ef58ed932218f5be77d349 Mon Sep 17 00:00:00 2001 From: liuhao Date: Wed, 19 Jun 2019 16:48:50 +0800 -Subject: [PATCH 116/122] lxc: set base cgroup path to '/' +Subject: [PATCH 116/131] lxc: set base cgroup path to '/' reason:base cgroup may be started with /system.slice when cg_hybrid_init read /proc/1/cgroup on host, and cgroup init will set all containers @@ -16,7 +16,7 @@ Signed-off-by: LiFeng 1 file changed, 3 insertions(+) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c -index 46f13f4..7c92abe 100644 +index 46f13f4d..7c92abe6 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2545,6 +2545,9 @@ static bool cg_hybrid_init(struct cgroup_ops *ops) @@ -30,5 +30,5 @@ index 46f13f4..7c92abe 100644 char *cgv2_ctrl_path; -- -1.8.3.1 +2.23.0 diff --git a/0117-pupulate-device-with-dir-mode-750-and-set-uid-gid.patch b/0117-pupulate-device-with-dir-mode-750-and-set-uid-gid.patch index 696a933..85d7285 100644 --- a/0117-pupulate-device-with-dir-mode-750-and-set-uid-gid.patch +++ b/0117-pupulate-device-with-dir-mode-750-and-set-uid-gid.patch @@ -1,7 +1,7 @@ -From d17249766b7e2de7246b5c2bfcd30dca2da6d38e Mon Sep 17 00:00:00 2001 +From 6f4194128b0387e19f5e7ad65bfa157f52335871 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Wed, 31 Jul 2019 05:24:11 -0400 -Subject: [PATCH 117/122] pupulate device with dir mode 750 and set uid/gid +Subject: [PATCH 117/131] pupulate device with dir mode 750 and set uid/gid Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index d9a7aae..0b10a2d 100644 +index d9a7aae1..0b10a2dd 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4005,13 +4005,11 @@ static int setup_populate_devs(const struct lxc_rootfs *rootfs, struct lxc_list @@ -36,7 +36,7 @@ index d9a7aae..0b10a2d 100644 INFO("Populated devices into container /dev"); return 0; diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 01fc944..3a02e09 100644 +index 01fc9443..3a02e099 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2335,6 +2335,8 @@ static int set_config_populate_device(const char *key, const char *value, @@ -49,5 +49,5 @@ index 01fc944..3a02e09 100644 lxc_list_add_elem(dev_list, dev_elem); -- -1.8.3.1 +2.23.0 diff --git a/0118-fix-sscanf-return-value-check.patch b/0118-fix-sscanf-return-value-check.patch index de4ff9d..b905231 100644 --- a/0118-fix-sscanf-return-value-check.patch +++ b/0118-fix-sscanf-return-value-check.patch @@ -1,7 +1,7 @@ -From 0aade3f699ec02ead3b4707be0e259ded5c1e9ec Mon Sep 17 00:00:00 2001 +From 2c693d3ec05daf3c647bf87fdc4f1fcab2f43741 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 2 Sep 2019 06:24:07 -0400 -Subject: [PATCH 118/122] fix sscanf return value check +Subject: [PATCH 118/131] fix sscanf return value check Signed-off-by: LiFeng --- @@ -10,7 +10,7 @@ Signed-off-by: LiFeng 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c -index 00d478c..c1e0d5d 100644 +index 00d478c4..c1e0d5d2 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1904,7 +1904,7 @@ static int lxc_check_container_info(char *filename, pid_t pid, pid_t p_pid, unsi @@ -23,7 +23,7 @@ index 00d478c..c1e0d5d 100644 ret = -1; goto out; diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index 1d2e9ee..c83c7a3 100644 +index 1d2e9ee4..c83c7a38 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1952,8 +1952,8 @@ static proc_t *lxc_stat2proc(const char *S) @@ -51,5 +51,5 @@ index 1d2e9ee..c83c7a3 100644 P->tty = -1; /* the old notty val, update elsewhere bef. moving to 0 */ return P; -- -1.8.3.1 +2.23.0 diff --git a/0119-remove-unuse-binary.patch b/0119-remove-unuse-binary.patch index 1526df1..3538380 100644 --- a/0119-remove-unuse-binary.patch +++ b/0119-remove-unuse-binary.patch @@ -1,7 +1,7 @@ -From 787c3c652d02b6398d6b7fcf2a2f8c9e406552fb Mon Sep 17 00:00:00 2001 +From 37d15f82b25e21c466b6632d8e56b50d60cb0444 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Wed, 4 Sep 2019 18:01:39 +0800 -Subject: [PATCH 119/122] remove unuse binary +Subject: [PATCH 119/131] remove unuse binary Signed-off-by: LiuHao --- @@ -9,7 +9,7 @@ Signed-off-by: LiuHao 1 file changed, 11 deletions(-) diff --git a/hooks/Makefile.am b/hooks/Makefile.am -index 5ae73d7..f55c4a9 100644 +index 5ae73d72..f55c4a90 100644 --- a/hooks/Makefile.am +++ b/hooks/Makefile.am @@ -10,15 +10,4 @@ hooks_SCRIPTS = \ @@ -29,5 +29,5 @@ index 5ae73d7..f55c4a9 100644 - EXTRA_DIST=$(hooks_SCRIPTS) -- -1.8.3.1 +2.23.0 diff --git a/0120-remove-unuse-unmount-namespace.patch b/0120-remove-unuse-unmount-namespace.patch index 8127da7..ba176e7 100644 --- a/0120-remove-unuse-unmount-namespace.patch +++ b/0120-remove-unuse-unmount-namespace.patch @@ -1,7 +1,7 @@ -From 14cba1d8fc2139afeb0db68c969540c3315768f2 Mon Sep 17 00:00:00 2001 +From 57584932914c0979260573e6c599f59688629019 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Thu, 5 Sep 2019 11:48:57 +0800 -Subject: [PATCH 120/122] remove unuse unmount-namespace +Subject: [PATCH 120/131] remove unuse unmount-namespace Signed-off-by: LiuHao --- @@ -9,7 +9,7 @@ Signed-off-by: LiuHao 1 file changed, 1 deletion(-) diff --git a/lxc.spec.in b/lxc.spec.in -index 7fcd811..2ca12fe 100644 +index 7fcd811f..2ca12fef 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -259,7 +259,6 @@ fi @@ -21,5 +21,5 @@ index 7fcd811..2ca12fe 100644 %{_libexecdir}/%{name}/lxc-monitord %attr(4111,root,root) %{_libexecdir}/%{name}/lxc-user-nic -- -1.8.3.1 +2.23.0 diff --git a/0121-optimize-log-when-root-path-is-invalid.patch b/0121-optimize-log-when-root-path-is-invalid.patch index 8bc5ce9..a52c549 100644 --- a/0121-optimize-log-when-root-path-is-invalid.patch +++ b/0121-optimize-log-when-root-path-is-invalid.patch @@ -1,7 +1,7 @@ -From a466acb2c1e5d54822e9a7b93f75e9ff93ad511a Mon Sep 17 00:00:00 2001 +From 326d45d73d0061431822040a37ced879f3c6b490 Mon Sep 17 00:00:00 2001 From: TanYifeng Date: Sat, 21 Sep 2019 06:19:25 -0400 -Subject: [PATCH 121/122] optimize log when root path is invalid +Subject: [PATCH 121/131] optimize log when root path is invalid Signed-off-by: TanYifeng --- @@ -9,7 +9,7 @@ Signed-off-by: TanYifeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 0b10a2d..5fd65e7 100644 +index 0b10a2dd..5fd65e73 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4881,7 +4881,7 @@ static char *get_root_path(const char *path, const char *backend) @@ -22,5 +22,5 @@ index 0b10a2d..5fd65e7 100644 } tmp++; -- -1.8.3.1 +2.23.0 diff --git a/0122-lxc-fix-code-reivew-errors.patch b/0122-lxc-fix-code-reivew-errors.patch index 5feefc2..ead32d7 100644 --- a/0122-lxc-fix-code-reivew-errors.patch +++ b/0122-lxc-fix-code-reivew-errors.patch @@ -1,7 +1,7 @@ -From 2313b7a2a444d841e57dca83814e7b17e67354db Mon Sep 17 00:00:00 2001 +From 61e763bceb56821eb36b4c8efda510e1a55394ff Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 26 Sep 2019 07:47:19 -0400 -Subject: [PATCH 122/122] lxc: fix code reivew errors +Subject: [PATCH 122/131] lxc: fix code reivew errors Signed-off-by: LiFeng --- @@ -15,7 +15,7 @@ Signed-off-by: LiFeng 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c -index fa02a4b..7d6cf6f 100644 +index fa02a4b7..7d6cf6f3 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1083,7 +1083,7 @@ int lxc_cmd_set_terminal_fifos(const char *name, const char *lxcpath, const char @@ -28,7 +28,7 @@ index fa02a4b..7d6cf6f 100644 struct lxc_cmd_rr cmd = { diff --git a/src/lxc/commands_utils.c b/src/lxc/commands_utils.c -index f48f118..56ecce7 100644 +index f48f1188..56ecce7d 100644 --- a/src/lxc/commands_utils.c +++ b/src/lxc/commands_utils.c @@ -144,7 +144,7 @@ int lxc_make_abstract_socket_name(char *path, size_t pathlen, @@ -41,7 +41,7 @@ index f48f118..56ecce7 100644 return -1; } diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index 3a02e09..3eaae4a 100644 +index 3a02e099..3eaae4a9 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3834,7 +3834,7 @@ static int get_config_prlimit(const char *key, char *retv, int inlen, @@ -63,7 +63,7 @@ index 3a02e09..3eaae4a 100644 } } diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c -index ed2fe83..ec20c59 100755 +index ed2fe834..ec20c598 100755 --- a/src/lxc/json/json_common.c +++ b/src/lxc/json/json_common.c @@ -17,7 +17,7 @@ yajl_gen_status reformat_uint(void *ctx, long long unsigned int num) { @@ -124,7 +124,7 @@ index ed2fe83..ec20c59 100755 *(err) = safe_strdup("error allocating memory"); } diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c -index 5a72483..9f9cbfc 100644 +index 5a724838..9f9cbfc3 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3200,7 +3200,7 @@ static bool container_destroy(struct lxc_container *c, @@ -155,7 +155,7 @@ index 5a72483..9f9cbfc 100644 return -1; } diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c -index 32c69a4..e81f57e 100644 +index 32c69a49..e81f57ee 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -242,13 +242,13 @@ static int lxc_terminal_rename_old_log_file(struct lxc_terminal *terminal) @@ -193,7 +193,7 @@ index 32c69a4..e81f57e 100644 } diff --git a/src/lxc/utils.c b/src/lxc/utils.c -index c83c7a3..31bcac7 100644 +index c83c7a38..31bcac71 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2041,7 +2041,7 @@ void lxc_write_error_message(int errfd, const char *format, ...) @@ -206,5 +206,5 @@ index c83c7a3..31bcac7 100644 sret = write(errfd, errbuf, strlen(errbuf)); if (sret < 0) -- -1.8.3.1 +2.23.0 diff --git a/0123-in-accordance-with-hook-spec-in-oci.patch b/0123-in-accordance-with-hook-spec-in-oci.patch new file mode 100644 index 0000000..4cf430a --- /dev/null +++ b/0123-in-accordance-with-hook-spec-in-oci.patch @@ -0,0 +1,81 @@ +From eb283f2a97b6c409ba516a7ab29bb5ad4f86c0db Mon Sep 17 00:00:00 2001 +From: LiuHao +Date: Mon, 25 Nov 2019 21:15:40 +0800 +Subject: [PATCH 123/131] in accordance with hook spec in oci + +Signed-off-by: LiuHao +--- + src/lxc/cgroups/cgfsng.c | 4 ++-- + src/lxc/conf.c | 6 +++--- + src/lxc/start.c | 14 ++++---------- + 3 files changed, 9 insertions(+), 15 deletions(-) + +diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c +index 7c92abe6..87b49b0f 100644 +--- a/src/lxc/cgroups/cgfsng.c ++++ b/src/lxc/cgroups/cgfsng.c +@@ -2013,8 +2013,8 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name, + + path = lxc_cmd_get_cgroup_path(name, lxcpath, h->controllers[0]); + /* not running */ +- if (!path) +- continue; ++ if (path == NULL) ++ return false; + + fullpath = build_full_cgpath_from_monitorpath(h, path, "cgroup.procs"); + free(path); +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index 5fd65e73..21ec340f 100644 +--- a/src/lxc/conf.c ++++ b/src/lxc/conf.c +@@ -4937,9 +4937,9 @@ static int do_run_oci_hooks(const char *name, const char *lxcpath, struct lxc_co + case OCI_HOOK_POSTSTOP: + for (i = 0; i < lc->ocihooks->poststop_len; i++) { + work_conf.ocihook = lc->ocihooks->poststop[i]; +- ret = run_ocihook_script_argv(name, "lxc", &work_conf, lxcpath, rootpath); +- if (ret != 0) +- break; ++ nret = run_ocihook_script_argv(name, "lxc", &work_conf, lxcpath, rootpath); ++ if (nret != 0) ++ WARN("running poststart hook %zu failed, ContainerId: %s", i, name); + } + break; + default: +diff --git a/src/lxc/start.c b/src/lxc/start.c +index c1e0d5d2..7246283e 100644 +--- a/src/lxc/start.c ++++ b/src/lxc/start.c +@@ -1185,14 +1185,11 @@ void lxc_fini(const char *name, struct lxc_handler *handler) + while (namespace_count--) + free(namespaces[namespace_count]); + +- // if we shared pid namespace with others, should kill all processes within container cgroup +- if (handler->conf->ns_share[LXC_NS_PID] != NULL) { +- TRACE("Trying to kill all subprocess"); +- signal_all_processes(handler); +- TRACE("Finished kill all subprocess"); +- } + retry: + if (!cgroup_ops->destroy(cgroup_ops, handler)) { ++ TRACE("Trying to kill all subprocess"); ++ signal_all_processes(handler); ++ TRACE("Finished kill all subprocess"); + if (retry_count < max_retry) { + usleep(100 * 1000); /* 100 millisecond */ + retry_count++; +@@ -2851,10 +2848,7 @@ int do_lxcapi_clean_resource(char *name, char *lxcpath, struct lxc_conf *conf, p + ret = -1; + goto out; + } +- // if we shared pid namespace with others, should kill all processes within container cgroup +- if (handler->conf->ns_share[LXC_NS_PID] != NULL) { +- signal_all_processes(handler); +- } ++ signal_all_processes(handler); + + if (run_oci_hooks(handler->name, "oci-poststop", handler->conf, handler->lxcpath)) { + ERROR("Failed to run lxc.hook.post-stop for container \"%s\".", handler->name); +-- +2.23.0 + diff --git a/0124-lxc-close-maincmd-fd-before-destroy-cgroup.patch b/0124-lxc-close-maincmd-fd-before-destroy-cgroup.patch new file mode 100644 index 0000000..001e65c --- /dev/null +++ b/0124-lxc-close-maincmd-fd-before-destroy-cgroup.patch @@ -0,0 +1,102 @@ +From 8f85eda569912dce488d2e951f853958ba800ada Mon Sep 17 00:00:00 2001 +From: LiFeng +Date: Wed, 27 Nov 2019 22:33:46 -0500 +Subject: [PATCH 124/131] lxc: close maincmd fd before destroy cgroup + +Signed-off-by: LiFeng +--- + src/lxc/cgroups/cgfsng.c | 6 ++++-- + src/lxc/start.c | 33 ++++++++++++++++++--------------- + 2 files changed, 22 insertions(+), 17 deletions(-) + +diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c +index 87b49b0f..c96285e1 100644 +--- a/src/lxc/cgroups/cgfsng.c ++++ b/src/lxc/cgroups/cgfsng.c +@@ -2013,8 +2013,10 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name, + + path = lxc_cmd_get_cgroup_path(name, lxcpath, h->controllers[0]); + /* not running */ +- if (path == NULL) +- return false; ++ if (path == NULL) { ++ ERROR("Failed to attach %d to cgroup of %s", (int)pid, name); ++ return false; ++ } + + fullpath = build_full_cgpath_from_monitorpath(h, path, "cgroup.procs"); + free(path); +diff --git a/src/lxc/start.c b/src/lxc/start.c +index 7246283e..63be4e3e 100644 +--- a/src/lxc/start.c ++++ b/src/lxc/start.c +@@ -1185,19 +1185,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler) + while (namespace_count--) + free(namespaces[namespace_count]); + +-retry: +- if (!cgroup_ops->destroy(cgroup_ops, handler)) { +- TRACE("Trying to kill all subprocess"); +- signal_all_processes(handler); +- TRACE("Finished kill all subprocess"); +- if (retry_count < max_retry) { +- usleep(100 * 1000); /* 100 millisecond */ +- retry_count++; +- goto retry; +- } +- SYSERROR("Failed to destroy cgroup path for container: \"%s\"", handler->name); +- } +- + if (handler->conf->reboot == REBOOT_NONE) { + /* For all new state clients simply close the command socket. + * This will inform all state clients that the container is +@@ -1208,13 +1195,27 @@ retry: + lxc_abstract_unix_close(handler->conf->maincmd_fd); + handler->conf->maincmd_fd = -1; + TRACE("Closed command socket"); ++ } + ++retry: ++ if (!cgroup_ops->destroy(cgroup_ops, handler)) { ++ TRACE("Trying to kill all subprocess"); ++ signal_all_processes(handler); ++ TRACE("Finished kill all subprocess"); ++ if (retry_count < max_retry) { ++ usleep(100 * 1000); /* 100 millisecond */ ++ retry_count++; ++ goto retry; ++ } ++ SYSERROR("Failed to destroy cgroup path for container: \"%s\"", handler->name); ++ } ++ ++ if (handler->conf->reboot == REBOOT_NONE) { + /* This function will try to connect to the legacy lxc-monitord + * state server and only exists for backwards compatibility. + */ + lxc_monitor_send_state(name, STOPPED, handler->lxcpath); + +- + /* isuald: write exit code to exit fifo */ + if (handler->conf->exit_fd >= 0) { + ret = write(handler->conf->exit_fd, &handler->exit_code, sizeof(int)); +@@ -2848,7 +2849,6 @@ int do_lxcapi_clean_resource(char *name, char *lxcpath, struct lxc_conf *conf, p + ret = -1; + goto out; + } +- signal_all_processes(handler); + + if (run_oci_hooks(handler->name, "oci-poststop", handler->conf, handler->lxcpath)) { + ERROR("Failed to run lxc.hook.post-stop for container \"%s\".", handler->name); +@@ -2857,6 +2857,9 @@ int do_lxcapi_clean_resource(char *name, char *lxcpath, struct lxc_conf *conf, p + + retry: + if (!handler->cgroup_ops->destroy(handler->cgroup_ops, handler)) { ++ TRACE("Trying to kill all subprocess"); ++ signal_all_processes(handler); ++ TRACE("Finished kill all subprocess"); + if (retry_count < max_retry) { + usleep(100 * 1000); /* 100 millisecond */ + retry_count++; +-- +2.23.0 + diff --git a/0125-lxc-fix-strcat-bug-in-cleanpath.patch b/0125-lxc-fix-strcat-bug-in-cleanpath.patch new file mode 100644 index 0000000..871d66f --- /dev/null +++ b/0125-lxc-fix-strcat-bug-in-cleanpath.patch @@ -0,0 +1,28 @@ +From b6bbee74d4021f0063fabf64be0dae7fcc6a480e Mon Sep 17 00:00:00 2001 +From: LiFeng +Date: Fri, 29 Nov 2019 22:16:05 -0500 +Subject: [PATCH 125/131] lxc: fix strcat bug in cleanpath + +Signed-off-by: LiFeng +--- + src/lxc/path.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lxc/path.c b/src/lxc/path.c +index 7a5dce95..083893e7 100644 +--- a/src/lxc/path.c ++++ b/src/lxc/path.c +@@ -200,6 +200,10 @@ char *cleanpath(const char *path, char *realpath, size_t realpath_len) + ERROR("Failed to get the end of respath"); + goto error; + } ++ if (strlen(path) > (PATH_MAX - strlen(respath) - 1)) { ++ ERROR("Path is too long"); ++ goto error; ++ } + strcat(respath, path); + stpos = path; + } else { +-- +2.23.0 + diff --git a/0126-add-user-option-for-lxc-attach.patch b/0126-add-user-option-for-lxc-attach.patch new file mode 100644 index 0000000..d45d7d6 --- /dev/null +++ b/0126-add-user-option-for-lxc-attach.patch @@ -0,0 +1,134 @@ +From 37a243271540f6f5be2a5cdd01460cf68b92bcf3 Mon Sep 17 00:00:00 2001 +From: wujing +Date: Wed, 30 Oct 2019 18:41:02 +0800 +Subject: [PATCH 126/131] add user option for lxc-attach + +Signed-off-by: wujing +--- + src/lxc/tools/lxc_attach.c | 75 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + +diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c +index 7d51ad72..0d401555 100644 +--- a/src/lxc/tools/lxc_attach.c ++++ b/src/lxc/tools/lxc_attach.c +@@ -62,6 +62,8 @@ static char **extra_env; + static ssize_t extra_env_size; + static char **extra_keep; + static ssize_t extra_keep_size; ++static uid_t custom_uid = (uid_t)-1; ++static gid_t custom_gid = (gid_t)-1; + + static const struct option my_longopts[] = { + {"elevated-privileges", optional_argument, 0, 'e'}, +@@ -75,6 +77,7 @@ static const struct option my_longopts[] = { + {"set-var", required_argument, 0, 'v'}, + {"pty-log", required_argument, 0, 'L'}, + {"rcfile", required_argument, 0, 'f'}, ++ {"user", required_argument, 0, 'u'}, + {"in-fifo", required_argument, 0, OPT_INPUT_FIFO}, /* isulad add terminal fifos*/ + {"out-fifo", required_argument, 0, OPT_OUTPUT_FIFO}, + {"err-fifo", required_argument, 0, OPT_STDERR_FIFO}, +@@ -130,6 +133,7 @@ Options :\n\ + -f, --rcfile=FILE\n\ + Load configuration file FILE\n\ + --timeout Timeout in seconds (default: 0)\n\ ++ -u, --user User ID (format: UID[:GID])\n\ + ", + .options = my_longopts, + .parser = my_parser, +@@ -141,6 +145,69 @@ Options :\n\ + // isulad: send '128 + signal' if container is killed by signal. + #define ExitSignalOffset 128 + ++static int parse_user_id(const char *username, char **uid, char **gid, char **tmp_dup) ++{ ++ char *tmp = NULL; ++ char *pdot = NULL; ++ ++ if (uid == NULL || gid == NULL || tmp_dup == NULL) { ++ return -1; ++ } ++ ++ if (username != NULL) { ++ tmp = strdup(username); ++ if (tmp == NULL) { ++ ERROR("Failed to duplicate user name"); ++ return -1; ++ } ++ ++ // for free tmp in caller ++ *tmp_dup = tmp; ++ pdot = strstr(tmp, ":"); ++ if (pdot != NULL) { ++ *pdot = '\0'; ++ if (pdot != tmp) { ++ // uid found ++ *uid = tmp; ++ } ++ ++ if (*(pdot + 1) != '\0') { ++ // gid found ++ *gid = pdot + 1; ++ } ++ } else { ++ // No : found ++ if (*tmp != '\0') { ++ *uid = tmp; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int get_attach_uid_gid(uid_t *user_id, gid_t *group_id, const char *username) ++{ ++ char *tmp = NULL; ++ char *uid = NULL; ++ char *gid = NULL; ++ ++ // parse uid and gid by username ++ if (parse_user_id(username, &uid, &gid, &tmp) != 0) { ++ return -1; ++ } ++ ++ if (uid != NULL) { ++ *user_id = (unsigned int)atoll(uid); ++ } ++ if (gid != NULL) { ++ *group_id = (unsigned int)atoll(gid); ++ } ++ ++ free(tmp); ++ return 0; ++} ++ + static int my_parser(struct lxc_arguments *args, int c, char *arg) + { + int ret; +@@ -198,6 +265,12 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg) + case 'f': + args->rcfile = arg; + break; ++ case 'u': ++ if (get_attach_uid_gid(&custom_uid, &custom_gid, arg) != 0) { ++ ERROR("Failed to get attach user U/GID"); ++ return -1; ++ } ++ break; + case OPT_INPUT_FIFO: + args->terminal_fifos[0] = arg; + break; +@@ -488,6 +561,8 @@ int main(int argc, char *argv[]) + attach_options.extra_env_vars = extra_env; + attach_options.extra_keep_env = extra_keep; + attach_options.timeout = my_args.attach_timeout; ++ attach_options.uid = custom_uid; ++ attach_options.gid = custom_gid; + + if (my_args.argc > 0) { + command.program = my_args.argv[0]; +-- +2.23.0 + diff --git a/0127-log-only-write-size-begin-if-buffer-is-full.patch b/0127-log-only-write-size-begin-if-buffer-is-full.patch new file mode 100644 index 0000000..4e22780 --- /dev/null +++ b/0127-log-only-write-size-begin-if-buffer-is-full.patch @@ -0,0 +1,26 @@ +From 331f06d4322e17db05949ee29cd1fe92217b73f5 Mon Sep 17 00:00:00 2001 +From: TanYifeng +Date: Tue, 3 Dec 2019 22:43:25 -0500 +Subject: [PATCH 127/131] log: only write (size - begin) if buffer is full + +Signed-off-by: TanYifeng +--- + src/lxc/terminal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c +index e81f57ee..b547013c 100644 +--- a/src/lxc/terminal.c ++++ b/src/lxc/terminal.c +@@ -538,7 +538,7 @@ static int lxc_terminal_write_log_file(struct lxc_terminal *terminal, const char + * noting that it's a partial log line. */ + if (buf == NULL || (begin == 0 && size == __BUF_CACHE_SIZE)) { + if (begin < size) { +- ret = lxc_logger_write(terminal, type, cache + begin, index - begin + 1); ++ ret = lxc_logger_write(terminal, type, cache + begin, size - begin); + if (ret < 0) { + WARN("Failed to log msg"); + } +-- +2.23.0 + diff --git a/0128-link-proc-mounts-to-etc-mtab.patch b/0128-link-proc-mounts-to-etc-mtab.patch new file mode 100644 index 0000000..5f93003 --- /dev/null +++ b/0128-link-proc-mounts-to-etc-mtab.patch @@ -0,0 +1,77 @@ +From 9735e11b3ecbaab9c3028d467c2b1706bcaff7bc Mon Sep 17 00:00:00 2001 +From: wujing +Date: Tue, 10 Dec 2019 21:28:47 +0800 +Subject: [PATCH 128/131] link /proc/mounts to /etc/mtab + +Signed-off-by: wujing +--- + src/lxc/conf.c | 39 ++++++++++++++++++++++++++++++++++++++- + 1 file changed, 38 insertions(+), 1 deletion(-) + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index 21ec340f..b66e7bcf 100644 +--- a/src/lxc/conf.c ++++ b/src/lxc/conf.c +@@ -4101,6 +4101,37 @@ static int setup_rootfs_mountopts(const struct lxc_rootfs *rootfs) + return 0; + } + ++static int create_mtab_link() ++{ ++ ssize_t ret; ++ int mret; ++ struct stat sbuf; ++ const char *pathname = "/proc/mounts"; ++ const char *slink = "/etc/mtab"; ++ ++ if (file_exists(slink)) { ++ return 0; ++ } ++ ++ ret = stat(pathname, &sbuf); ++ if (ret < 0) { ++ SYSERROR("Failed to stat %s: %s", pathname, strerror(errno)); ++ return -1; ++ } ++ ++ mret = symlink(pathname, slink); ++ if (mret < 0 && errno != EEXIST) { ++ if (errno == EROFS) { ++ WARN("Failed to create link %s for target %s. Read-only filesystem", slink, pathname); ++ } else { ++ SYSERROR("Failed to create \"%s\"", slink); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ + int lxc_setup(struct lxc_handler *handler) + { + int ret; +@@ -4331,7 +4362,7 @@ int lxc_setup(struct lxc_handler *handler) + } + } + +- //isulad: system container, remount /proc/sys/xxx by mount_list ++ // isulad: system container, remount /proc/sys/xxx by mount_list + if (lxc_conf->systemd != NULL && strcmp(lxc_conf->systemd, "true") == 0) { + if (!lxc_list_empty(&lxc_conf->mount_list)) { + if (remount_proc_sys_mount_entries(&lxc_conf->mount_list)) { +@@ -4341,6 +4372,12 @@ int lxc_setup(struct lxc_handler *handler) + } + } + ++ // isulad: create link /etc/mtab for /proc/mounts ++ if (create_mtab_link() != 0) { ++ ERROR("failed to create link /etc/mtab for target /proc/mounts"); ++ goto on_error; ++ } ++ + if (!lxc_list_empty(&lxc_conf->keepcaps)) { + if (!lxc_list_empty(&lxc_conf->caps)) { + ERROR("Container requests lxc.cap.drop and " +-- +2.23.0 + diff --git a/0129-cgfsng-add-retry-for-enter-cgroup.patch b/0129-cgfsng-add-retry-for-enter-cgroup.patch new file mode 100644 index 0000000..90f39fd --- /dev/null +++ b/0129-cgfsng-add-retry-for-enter-cgroup.patch @@ -0,0 +1,70 @@ +From 2e2f66f4d2dc0eec584cb701649e20d9cf6eebc5 Mon Sep 17 00:00:00 2001 +From: LiFeng +Date: Tue, 10 Dec 2019 05:40:20 -0500 +Subject: [PATCH 129/131] cgfsng: add retry for enter cgroup + +Signed-off-by: LiFeng +--- + src/lxc/cgroups/cgfsng.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c +index c96285e1..50bdc771 100644 +--- a/src/lxc/cgroups/cgfsng.c ++++ b/src/lxc/cgroups/cgfsng.c +@@ -1300,11 +1300,23 @@ __cgfsng_ops static bool cgfsng_payload_enter(struct cgroup_ops *ops, pid_t pid) + for (int i = 0; ops->hierarchies[i]; i++) { + int ret; + char *fullpath; ++ int retry_count = 0; ++ int max_retry = 10; + + fullpath = must_make_path(ops->hierarchies[i]->container_full_path, + "cgroup.procs", NULL); ++retry: + ret = lxc_write_to_file(fullpath, pidstr, len, false, 0666); + if (ret != 0) { ++ if (errno == ENOENT) { ++ if (retry_count < max_retry) { ++ SYSERROR("Failed to enter cgroup \"%s\" with retry count:%d", fullpath, retry_count); ++ (void)mkdir_eexist_on_last(ops->hierarchies[i]->container_full_path, 0755); ++ usleep(100 * 1000); /* 100 millisecond */ ++ retry_count++; ++ goto retry; ++ } ++ } + SYSERROR("Failed to enter cgroup \"%s\"", fullpath); + free(fullpath); + return false; +@@ -2201,6 +2213,8 @@ static int cg_legacy_set_data(struct cgroup_ops *ops, const char *filename, + struct hierarchy *h; + int ret = 0; + char *controller = NULL; ++ int retry_count = 0; ++ int max_retry = 10; + + len = strlen(filename); + controller = alloca(len + 1); +@@ -2228,8 +2242,19 @@ static int cg_legacy_set_data(struct cgroup_ops *ops, const char *filename, + } + + fullpath = must_make_path(h->container_full_path, filename, NULL); ++ ++retry: + ret = lxc_write_to_file(fullpath, value, strlen(value), false, 0666); + if (ret) { ++ if (errno == ENOENT) { ++ if (retry_count < max_retry) { ++ SYSERROR("setting cgroup config for ready process caused \"failed to write %s to %s\".", value, fullpath); ++ (void)mkdir_eexist_on_last(h->container_full_path, 0755); ++ usleep(100 * 1000); /* 100 millisecond */ ++ retry_count++; ++ goto retry; ++ } ++ } + lxc_write_error_message(ops->errfd, + "%s:%d: setting cgroup config for ready process caused \"failed to write %s to %s: %s\".", + __FILE__, __LINE__, value, fullpath, strerror(errno)); +-- +2.23.0 + diff --git a/0130-fix-snprintf-create-abstract-socket-name-bug.patch b/0130-fix-snprintf-create-abstract-socket-name-bug.patch new file mode 100644 index 0000000..7f0818f --- /dev/null +++ b/0130-fix-snprintf-create-abstract-socket-name-bug.patch @@ -0,0 +1,26 @@ +From 022bf651ae6a068f7cbaa608432fd3c09d783e03 Mon Sep 17 00:00:00 2001 +From: wujing +Date: Tue, 17 Dec 2019 21:24:24 +0800 +Subject: [PATCH 130/131] fix snprintf create abstract socket name bug + +Signed-off-by: wujing +--- + src/lxc/commands_utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lxc/commands_utils.c b/src/lxc/commands_utils.c +index 56ecce7d..f48f1188 100644 +--- a/src/lxc/commands_utils.c ++++ b/src/lxc/commands_utils.c +@@ -144,7 +144,7 @@ int lxc_make_abstract_socket_name(char *path, size_t pathlen, + } + + ret = snprintf(offset, len, "%s/%s/%s", lxcpath, name, suffix); +- if (ret < 0 || ret >= len) { ++ if (ret < 0) { + ERROR("Failed to create abstract socket name"); + return -1; + } +-- +2.23.0 + diff --git a/0131-fix-commands-and-terminal-memory-leak-bug.patch b/0131-fix-commands-and-terminal-memory-leak-bug.patch new file mode 100644 index 0000000..32d8089 --- /dev/null +++ b/0131-fix-commands-and-terminal-memory-leak-bug.patch @@ -0,0 +1,43 @@ +From 6556417fa407074368a0b959fd478b8816d7c796 Mon Sep 17 00:00:00 2001 +From: wujing +Date: Wed, 18 Dec 2019 15:44:19 +0800 +Subject: [PATCH 131/131] fix commands and terminal memory leak bug + +Signed-off-by: wujing +--- + src/lxc/commands.c | 5 ++++- + src/lxc/terminal.c | 1 + + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/lxc/commands.c b/src/lxc/commands.c +index 7d6cf6f3..b70564fd 100644 +--- a/src/lxc/commands.c ++++ b/src/lxc/commands.c +@@ -1083,8 +1083,11 @@ int lxc_cmd_set_terminal_fifos(const char *name, const char *lxcpath, const char + if (tmp == NULL) + return -1; + ret = snprintf(tmp, len, "%s%s%s%s%s", cmd_in_fifo, split, cmd_out_fifo, split, cmd_err_fifo); +- if (ret < 0 || ret >= len) ++ if (ret < 0 || ret >= len) { ++ ERROR("Failed to snprintf in fifo of command"); ++ free(tmp); + return -1; ++ } + + struct lxc_cmd_rr cmd = { + .req = { +diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c +index b547013c..bccc23d9 100644 +--- a/src/lxc/terminal.c ++++ b/src/lxc/terminal.c +@@ -243,6 +243,7 @@ static int lxc_terminal_rename_old_log_file(struct lxc_terminal *terminal) + for (i = terminal->log_rotate - 1; i > 1; i--) { + ret = snprintf(tmp, PATH_MAX, "%s.%u", terminal->log_path, i); + if (ret < 0 || ret >= PATH_MAX) { ++ free(rename_fname); + return -EFBIG; + } + free(rename_fname); +-- +2.23.0 + diff --git a/lxc.spec b/lxc.spec index ca3bb56..9ebcb0c 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,5 +1,4 @@ -%global with_seccomp 1 -%global _release 20191105 +%global _release 20191226 %global debug_package %{nil} Name: lxc @@ -134,13 +133,20 @@ Patch9121: 0119-remove-unuse-binary.patch Patch9122: 0120-remove-unuse-unmount-namespace.patch Patch9123: 0121-optimize-log-when-root-path-is-invalid.patch Patch9124: 0122-lxc-fix-code-reivew-errors.patch +Patch9125: 0123-in-accordance-with-hook-spec-in-oci.patch +Patch9126: 0124-lxc-close-maincmd-fd-before-destroy-cgroup.patch +Patch9127: 0125-lxc-fix-strcat-bug-in-cleanpath.patch +Patch9128: 0126-add-user-option-for-lxc-attach.patch +Patch9129: 0127-log-only-write-size-begin-if-buffer-is-full.patch +Patch9130: 0128-link-proc-mounts-to-etc-mtab.patch +Patch9131: 0129-cgfsng-add-retry-for-enter-cgroup.patch +Patch9132: 0130-fix-snprintf-create-abstract-socket-name-bug.patch +Patch9133: 0131-fix-commands-and-terminal-memory-leak-bug.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath -%if 0%{?with_seccomp} BuildRequires: pkgconfig(libseccomp) -%endif BuildRequires: libcap libcap-devel libselinux-devel yajl yajl-devel -BuildRequires: libsecurec libsecurec-devel pkgconfig(bash-completion) +BuildRequires: pkgconfig(bash-completion) Requires: rsync Requires(post): systemd @@ -149,6 +155,9 @@ Requires(postun): systemd Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig +Provides: lxc-libs +Obsoletes: lxc-libs + %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/lxc-3.0.3} %description @@ -179,140 +188,13 @@ BuildArch: noarch This package contains documentation for lxc for creating containers. %prep -%setup -q -n lxc-3.0.3 -%patch6000 -p1 -%patch6001 -p1 -%patch6002 -p1 -%patch9003 -p1 -%patch9004 -p1 -%patch9005 -p1 -%patch9006 -p1 -%patch9007 -p1 -%patch9008 -p1 -%patch9009 -p1 -%patch9010 -p1 -%patch9011 -p1 -%patch9012 -p1 -%patch9013 -p1 -%patch9014 -p1 -%patch9015 -p1 -%patch9016 -p1 -%patch9017 -p1 -%patch9018 -p1 -%patch9019 -p1 -%patch9020 -p1 -%patch9021 -p1 -%patch9022 -p1 -%patch9023 -p1 -%patch9024 -p1 -%patch9025 -p1 -%patch9026 -p1 -%patch9027 -p1 -%patch9028 -p1 -%patch9029 -p1 -%patch9030 -p1 -%patch9031 -p1 -%patch9032 -p1 -%patch9033 -p1 -%patch9034 -p1 -%patch9035 -p1 -%patch9036 -p1 -%patch9037 -p1 -%patch9038 -p1 -%patch9039 -p1 -%patch9040 -p1 -%patch9041 -p1 -%patch9042 -p1 -%patch9043 -p1 -%patch9044 -p1 -%patch9045 -p1 -%patch9046 -p1 -%patch9047 -p1 -%patch9048 -p1 -%patch9049 -p1 -%patch9050 -p1 -%patch9051 -p1 -%patch9052 -p1 -%patch9053 -p1 -%patch9054 -p1 -%patch9055 -p1 -%patch9056 -p1 -%patch9057 -p1 -%patch9058 -p1 -%patch9059 -p1 -%patch9060 -p1 -%patch9061 -p1 -%patch9062 -p1 -%patch9063 -p1 -%patch9064 -p1 -%patch9065 -p1 -%patch9066 -p1 -%patch9067 -p1 -%patch9068 -p1 -%patch9069 -p1 -%patch9070 -p1 -%patch9071 -p1 -%patch9072 -p1 -%patch9073 -p1 -%patch9074 -p1 -%patch9075 -p1 -%patch9076 -p1 -%patch9077 -p1 -%patch9078 -p1 -%patch9079 -p1 -%patch9080 -p1 -%patch9081 -p1 -%patch9082 -p1 -%patch9083 -p1 -%patch9084 -p1 -%patch9085 -p1 -%patch9086 -p1 -%patch9087 -p1 -%patch9088 -p1 -%patch9089 -p1 -%patch9090 -p1 -%patch9091 -p1 -%patch9092 -p1 -%patch9093 -p1 -%patch9094 -p1 -%patch9095 -p1 -%patch9096 -p1 -%patch9097 -p1 -%patch9098 -p1 -%patch9099 -p1 -%patch9100 -p1 -%patch9101 -p1 -%patch9102 -p1 -%patch9103 -p1 -%patch9104 -p1 -%patch9105 -p1 -%patch9106 -p1 -%patch9107 -p1 -%patch9108 -p1 -%patch9109 -p1 -%patch9110 -p1 -%patch9111 -p1 -%patch9112 -p1 -%patch9113 -p1 -%patch9114 -p1 -%patch9115 -p1 -%patch9116 -p1 -%patch9117 -p1 -%patch9118 -p1 -%patch9119 -p1 -%patch9120 -p1 -%patch9121 -p1 -%patch9122 -p1 -%patch9123 -p1 -%patch9124 -p1 +%autosetup -n lxc-3.0.3 -Sgit -p1 %build %configure --enable-doc --enable-api-docs \ --disable-silent-rules --docdir=%{_pkgdocdir} --disable-rpath \ --disable-static --disable-apparmor --enable-selinux \ -%if 0%{?with_seccomp} --enable-seccomp \ -%endif --with-init-script=systemd --disable-werror %{make_build} @@ -410,3 +292,7 @@ make check %{_mandir}/man7/%{name}* %{_mandir}/*/man5/%{name}* %{_mandir}/*/man7/%{name}* + +%changelog +* Thu Dec 19 2019 openEuler Buildteam - 3.0.3-20191218 +- Package init -- Gitee