Compare commits
No commits in common. "c8" and "imports/c8/sed-4.5-1.el8" have entirely different histories.
c8
...
imports/c8
@ -1,13 +0,0 @@
|
||||
diff --git a/sed/utils.c b/sed/utils.c
|
||||
index 4028d98..2e74654 100644
|
||||
--- a/sed/utils.c
|
||||
+++ b/sed/utils.c
|
||||
@@ -181,7 +181,7 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
|
||||
/* The ownership might change, so omit some permissions at first
|
||||
so unauthorized users cannot nip in before the file is ready.
|
||||
mkstemp forces O_BINARY on cygwin, so use mkostemp instead. */
|
||||
- mode_t save_umask = umask (0700);
|
||||
+ mode_t save_umask = umask (0077);
|
||||
int fd = mkostemp (template, 0);
|
||||
umask (save_umask);
|
||||
if (fd == -1)
|
@ -1,12 +0,0 @@
|
||||
--- a/sed-4.5/testsuite/inplace-selinux.sh 2018-03-31 06:33:01.000000000 +0200
|
||||
+++ b/sed-4.5/testsuite/inplace-selinux.sh 2021-10-05 17:10:32.259956822 +0200
|
||||
@@ -24,6 +24,9 @@
|
||||
chcon -u system_u a || skip_ "chcon doesn't work"
|
||||
chcon -u user_u a || skip_ "chcon doesn't work"
|
||||
|
||||
+cp --preserve=context ./a ./b 2>&1 | grep "cannot preserve security context" >/dev/null && skip_ "cannot preserve security context without an SELinux-enabled kernel"
|
||||
+
|
||||
+
|
||||
# Create the first file and symlink pointing at it.
|
||||
echo "Hello World" > inplace-selinux-file || framework_failure_
|
||||
ln -s ./inplace-selinux-file inplace-selinux-link || framework_failure_
|
29
SOURCES/sed-selinux.patch
Normal file
29
SOURCES/sed-selinux.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff --git a/NEWS b/NEWS
|
||||
index e9335f0..e762b2d 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -1,4 +1,9 @@ GNU sed NEWS -*- outline -*-
|
||||
GNU sed NEWS -*- outline -*-
|
||||
+
|
||||
+ sed -i now creates selinux context based on the context of the symlink
|
||||
+ instead of the symlink target. [Bug present since at least sed-4.2]
|
||||
+ sed -i --follow-symlinks remains unchanged.
|
||||
+
|
||||
|
||||
* Noteworthy changes in release 4.4 (2017-02-03) [stable]
|
||||
|
||||
diff --git a/sed/execute.c b/sed/execute.c
|
||||
index 1843392..453886e 100644
|
||||
--- a/sed/execute.c
|
||||
+++ b/sed/execute.c
|
||||
@@ -607,7 +607,7 @@ open_next_file(const char *name, struct input *input)
|
||||
if (is_selinux_enabled () > 0)
|
||||
{
|
||||
security_context_t con;
|
||||
- if (getfilecon (input->in_file_name, &con) != -1)
|
||||
+ if (lgetfilecon (input->in_file_name, &con) != -1)
|
||||
{
|
||||
/* Save and restore the old context for the sake of w and W
|
||||
commands. */
|
||||
2.9.5
|
||||
|
@ -3,15 +3,14 @@
|
||||
Summary: A GNU stream text editor
|
||||
Name: sed
|
||||
Version: 4.5
|
||||
Release: 5%{?dist}
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Text
|
||||
URL: http://sed.sourceforge.net/
|
||||
Source0: ftp://ftp.gnu.org/pub/gnu/sed/sed-%{version}.tar.xz
|
||||
Source1: http://sed.sourceforge.net/sedfaq.txt
|
||||
Patch0: sed-4.2.2-binary_copy_args.patch
|
||||
Patch2: sed-fuse.patch
|
||||
Patch3: sed-selinux-testsuite.patch
|
||||
Patch1: sed-selinux.patch
|
||||
BuildRequires: glibc-devel, libselinux-devel, libacl-devel, automake, autoconf
|
||||
BuildRequires: perl-Getopt-Long
|
||||
Requires(post): /sbin/install-info
|
||||
@ -32,8 +31,7 @@ specified in a script file or from the command line.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .copy
|
||||
%patch2 -p1
|
||||
%patch3 -p2
|
||||
#%patch1 -p1 -b .selinux
|
||||
|
||||
%build
|
||||
%configure --without-included-regex
|
||||
@ -73,22 +71,6 @@ fi
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 05 2021 Jakub Martisko <jamartis@redhat.com> - 4.5-5
|
||||
- Minor cleanup - remove unused patch from the spec file too (related to 4.5-3)
|
||||
- Resolves: rhbz#1869253
|
||||
|
||||
* Tue Oct 05 2021 Jakub Martisko <jamartis@redhat.com> - 4.5-4
|
||||
- Skip selinux test when selinux is not working
|
||||
- Resolves: rhbz#1905777
|
||||
|
||||
* Tue Oct 05 2021 Jakub Martisko <jamartis@redhat.com> - 4.5-3
|
||||
- Minor cleanup - remove unused patch from the git
|
||||
- Resolves: rhbz#1869253
|
||||
|
||||
* Mon May 18 2020 Jakub Martisko <jamartis@redhat.com> - 4.5-2
|
||||
- fix "in-place edits on FUSE filesystems create files with all-zero mode bits"
|
||||
- Resolves: #1835761
|
||||
|
||||
* Mon Apr 09 2018 Jakub Martisko <jamartis@redhat.com> - 4.5-1
|
||||
- Rebase to 4.5
|
||||
- Drop patch from 4.4-4 (is included in the upstream archive)
|
||||
|
Loading…
Reference in New Issue
Block a user