!472 fix mount device path incorrect
From: @zh_xiaoyu Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
470cf2277f
27
0033-fix-mount-device-path-incorrect.patch
Normal file
27
0033-fix-mount-device-path-incorrect.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From f7da4786892ab6b4bbe1cfedad24127a7d059f3d Mon Sep 17 00:00:00 2001
|
||||
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||
Date: Fri, 16 Jun 2023 12:02:38 +0800
|
||||
Subject: [PATCH] fix mount device path incorrect
|
||||
|
||||
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||
---
|
||||
src/lxc/conf.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
|
||||
index 3335b0d..a5573ac 100644
|
||||
--- a/src/lxc/conf.c
|
||||
+++ b/src/lxc/conf.c
|
||||
@@ -6064,7 +6064,8 @@ static int setup_populate_devs(const struct lxc_rootfs *rootfs, struct lxc_list
|
||||
|
||||
// Unprivileged containers cannot create devices, so
|
||||
// try to bind mount the device from the host
|
||||
- ret = snprintf(hostpath, MAXPATHLEN, "/dev/%s", dev_elem->name);
|
||||
+ // dev_elem name is the device path
|
||||
+ ret = snprintf(hostpath, MAXPATHLEN, "%s", dev_elem->name);
|
||||
if (ret < 0 || ret >= MAXPATHLEN) {
|
||||
ret = -1;
|
||||
goto reset_umask;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
9
lxc.spec
9
lxc.spec
@ -1,4 +1,4 @@
|
||||
%global _release 2022102419
|
||||
%global _release 2022102420
|
||||
|
||||
Name: lxc
|
||||
Version: 4.0.3
|
||||
@ -40,6 +40,7 @@ Patch0029: 0029-fix-mixed-use-of-signed-and-unsigned-type.patch
|
||||
Patch0030: 0030-remove-unused-meminfo-stats.patch
|
||||
Patch0031: 0031-lxc-attach-Fix-lost-return-codes-of-spawned-processe.patch
|
||||
Patch0032: 0032-fix-load-bpf-failed.patch
|
||||
Patch0033: 0033-fix-mount-device-path-incorrect.patch
|
||||
|
||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||
BuildRequires: pkgconfig(libseccomp)
|
||||
@ -226,6 +227,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jun 16 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022102420
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: fix mount device path incorrect
|
||||
|
||||
* Sat May 06 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022102419
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user