同步操作将从 src-openEuler/runc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f4158e00cac1f576f61904a73530c373c15354e2 Mon Sep 17 00:00:00 2001From: Aleksa Sarai <asarai@suse.de>Date: 2017年3月18日 04:33:14 +1100Subject: [PATCH 08/94] libcontainer: init: fix unmapped consolefchownIf the stdio of the container is owned by a group which is not mapped inthe user namespace, attempting to fchown the file descriptor will resultin EINVAL. Counteract this by simply not doing an fchown if the groupowner of the file descriptor has no host mapping according to theconfigured GIDMappings.Change-Id: I7a7911f398a38b2d21e1bb6bc4b3131f6504ca8dSigned-off-by: Aleksa Sarai <asarai@suse.de>---libcontainer/init_linux.go | 14 ++++++++++++--1 file changed, 12 insertions(+), 2 deletions(-)diff --git a/libcontainer/init_linux.go b/libcontainer/init_linux.goindex 1187835..99cc02c 100644--- a/libcontainer/init_linux.go+++ b/libcontainer/init_linux.go@@ -277,7 +277,7 @@ func setupUser(config *initConfig) error {// before we change to the container's user make sure that the processes STDIO// is correctly owned by the user that we are switching to.- if err := fixStdioPermissions(execUser); err != nil {+ if err := fixStdioPermissions(config, execUser); err != nil {return err}@@ -312,7 +312,7 @@ func setupUser(config *initConfig) error {// fixStdioPermissions fixes the permissions of PID 1's STDIO within the container to the specified user.// The ownership needs to match because it is created outside of the container and needs to be// localized.-func fixStdioPermissions(u *user.ExecUser) error {+func fixStdioPermissions(config *initConfig, u *user.ExecUser) error {var null syscall.Stat_tif err := syscall.Stat("/dev/null", &null); err != nil {return err@@ -326,10 +326,20 @@ func fixStdioPermissions(u *user.ExecUser) error {if err := syscall.Fstat(int(fd), &s); err != nil {return err}+// Skip chown of /dev/null if it was used as one of the STDIO fds.if s.Rdev == null.Rdev {continue}++ // Skip chown if s.Gid is actually an unmapped gid in the host. While+ // this is a bit dodgy if it just so happens that the console _is_+ // owned by overflow_gid, there's no way for us to disambiguate this as+ // a userspace program.+ if _, err := config.Config.HostGID(int(s.Gid)); err != nil {+ continue+ }+// We only change the uid owner (as it is possible for the mount to// prefer a different gid, and there's no reason for us to change it).// The reason why we don't just leave the default uid=X mount setup is--2.7.4.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。