diff --git a/0042-add-x-permission-when-create-directory.patch b/0042-add-x-permission-when-create-directory.patch new file mode 100644 index 0000000000000000000000000000000000000000..2ba3593d1d2a2068fb0d4e34382b4638aaaab236 --- /dev/null +++ b/0042-add-x-permission-when-create-directory.patch @@ -0,0 +1,26 @@ +From 98d47f6ab07bbf28c6a053658628b47ef7a430ab Mon Sep 17 00:00:00 2001 +From: WangFengTu +Date: Sat, 21 May 2022 16:21:38 +0800 +Subject: [PATCH] add x permission when create directory + +Signed-off-by: WangFengTu +--- + src/lxc/commands.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lxc/commands.c b/src/lxc/commands.c +index b954453..b79fc3d 100644 +--- a/src/lxc/commands.c ++++ b/src/lxc/commands.c +@@ -1703,7 +1703,7 @@ int lxc_cmd_init(const char *name, const char *lxcpath, const char *suffix) + if (runtime_sock_dir == NULL) + return -1; + +- if (mkdir_p(runtime_sock_dir, 0600) < 0) ++ if (mkdir_p(runtime_sock_dir, 0700) < 0) + return log_error_errno(-1, errno, "Failed to create container runtime unix sock directory %s", path); + + if (generate_named_unix_sock_path(name, suffix, path, sizeof(path)) != 0) +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index d8504d675e3298fc6aab79b65d29305bd3024971..0d71de97e157ba608e06ba4933d7d3d4d81351a5 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022041501 +%global _release 2022052101 Name: lxc Version: 4.0.3 @@ -49,6 +49,7 @@ Patch0038: 0038-just-print-error-when-new-lock-failed.patch Patch0039: 0039-fix-bug-of-memory-free.patch Patch0040: 0040-refactor-the-way-to-convert-selinux-label-to-shared.path Patch0041: 0041-do-not-free-the-pointer-returned-by-dirname.patch +Patch0042: 0042-add-x-permission-when-create-directory.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -220,6 +221,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Sat May 21 2022 wangfengtu - 4.0.3-2022052101 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add x permission when create directory + * Fri Apr 15 2022 wujing - 4.0.3-2022041501 - Type:refactor - ID:NA