From 7bcc66d53437d6588d7c3a5482d7cba4149800a2 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 12 Nov 2020 04:30:11 +0800 Subject: [PATCH 1/2] [patch tracking] 20201112043007632460 - https://github.com/coreutils/coreutils/commit/6fc695cb4a26f09dfeef8b1c24895a707055334e --- ...95cb4a26f09dfeef8b1c24895a707055334e.patch | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 6fc695cb4a26f09dfeef8b1c24895a707055334e.patch diff --git a/6fc695cb4a26f09dfeef8b1c24895a707055334e.patch b/6fc695cb4a26f09dfeef8b1c24895a707055334e.patch new file mode 100644 index 0000000..c791747 --- /dev/null +++ b/6fc695cb4a26f09dfeef8b1c24895a707055334e.patch @@ -0,0 +1,72 @@ +diff --git a/NEWS b/NEWS +index 392d0ce1e..657477ac7 100644 +--- a/NEWS ++++ b/NEWS +@@ -17,6 +17,9 @@ GNU coreutils NEWS -*- outline -*- + heavily changed during the run. + [bug introduced in coreutils-8.25] + ++ ls no longer crashes when printing the SELinux context for unstatable files. ++ [bug introduced in coreutils-6.9.91] ++ + ** Changes in behavior + + cp and install now default to copy-on-write (COW) if available. +diff --git a/src/ls.c b/src/ls.c +index 1f6afbc0e..1b4834cec 100644 +--- a/src/ls.c ++++ b/src/ls.c +@@ -3424,6 +3424,9 @@ gobble_file (char const *name, enum filetype type, ino_t inode, + provokes an exit status of 1. */ + file_failure (command_line_arg, + _("cannot access %s"), full_name); ++ ++ f->scontext = UNKNOWN_SECURITY_CONTEXT; ++ + if (command_line_arg) + return 0; + +diff --git a/tests/local.mk b/tests/local.mk +index 799200393..e1c4675c2 100644 +--- a/tests/local.mk ++++ b/tests/local.mk +@@ -613,7 +613,7 @@ all_tests = \ + tests/ls/multihardlink.sh \ + tests/ls/no-arg.sh \ + tests/ls/no-cap.sh \ +- tests/ls/proc-selinux-segfault.sh \ ++ tests/ls/selinux-segfault.sh \ + tests/ls/quote-align.sh \ + tests/ls/readdir-mountpoint-inode.sh \ + tests/ls/recursive.sh \ +diff --git a/tests/ls/proc-selinux-segfault.sh b/tests/ls/selinux-segfault.sh +similarity index 77% +rename from tests/ls/proc-selinux-segfault.sh +rename to tests/ls/selinux-segfault.sh +index 831a00e17..e2b7ef638 100755 +--- a/tests/ls/proc-selinux-segfault.sh ++++ b/tests/ls/selinux-segfault.sh +@@ -1,5 +1,5 @@ + #!/bin/sh +-# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1 ++# Ensure we don't segfault in selinux handling + + # Copyright (C) 2008-2020 Free Software Foundation, Inc. + +@@ -19,9 +19,15 @@ + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src + print_ver_ ls + ++# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1 + f=/proc/sys + test -r $f || f=. +- + ls -l $f > out || fail=1 + ++# ls <= 8.32 would segfault when printing ++# the security context of broken symlink targets ++mkdir sedir || framework_failure_ ++ln -sf missing sedir/broken || framework_failure_ ++returns_ 1 ls -L -R -Z -m sedir > out || fail=1 ++ + Exit $fail -- Gitee From d45fe862d8c3de66f98348db20830552817a945b Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 12 Nov 2020 04:30:12 +0800 Subject: [PATCH 2/2] [patch tracking] 20201112043007632460 - update spec file --- coreutils.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index f5a08aa..30aaba0 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils Version: 8.32 -Release: 2 +Release: 3 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -25,6 +25,7 @@ Patch8: skip-the-tests-that-require-selinux-if-selinux-is-di.patch Patch9: coreutils-8.32-ls-removed-dir.patch Patch10: coreutils-8.32-leaf-opt-xfs.patch +Patch6000: 6fc695cb4a26f09dfeef8b1c24895a707055334e.patch Conflicts: filesystem < 3 # To avoid clobbering installs @@ -135,6 +136,9 @@ fi %{_mandir}/man*/* %changelog +* 20201112043007632460 patch-tracking 8.32-3 +- append patch file of upstream repository from <6fc695cb4a26f09dfeef8b1c24895a707055334e> to <6fc695cb4a26f09dfeef8b1c24895a707055334e> + * Wed Aug 26 2020 chenbo pan - 8.32-2 - fix patch error @@ -221,4 +225,4 @@ fi - reintroduce very old Provides (mktemp, sh-utils, textwrap, fileutils, stat) * Thu Jul 12 2018 hexiaowen - 8.30-1 -- Pacakge init +- Pacakge init \ No newline at end of file -- Gitee