- Don't fail if setfilecon() returns EPERM (bug #453365), although the
setfilecon man page suggests that ENOTSUP will be returned in this case.
This commit is contained in:
parent
32888bf23a
commit
b4bd8d00d9
@ -1,21 +1,19 @@
|
|||||||
diff -up patch-2.5.4/patch.c.selinux patch-2.5.4/patch.c
|
--- patch-2.5.4/patch.c 2008-06-12 11:09:17.000000000 +0100
|
||||||
--- patch-2.5.4/patch.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
+++ patch-2.5.4/patch.c 2008-06-30 10:56:48.000000000 +0100
|
||||||
+++ patch-2.5.4/patch.c 2008-06-12 11:09:17.000000000 +0100
|
@@ -414,6 +414,13 @@
|
||||||
@@ -414,6 +414,13 @@ main (int argc, char **argv)
|
|
||||||
if (! inerrno && chmod (outname, instat.st_mode) != 0)
|
if (! inerrno && chmod (outname, instat.st_mode) != 0)
|
||||||
pfatal ("Can't set permissions on file %s",
|
pfatal ("Can't set permissions on file %s",
|
||||||
quotearg (outname));
|
quotearg (outname));
|
||||||
+ if (! inerrno && incontext &&
|
+ if (! inerrno && incontext &&
|
||||||
+ setfilecon (outname, incontext) != 0)
|
+ setfilecon (outname, incontext) != 0)
|
||||||
+ {
|
+ {
|
||||||
+ if (errno != ENODATA && errno != ENOTSUP)
|
+ if (errno != ENOTSUP && errno != EPERM)
|
||||||
+ pfatal ("Can't set security context on file %s",
|
+ pfatal ("Can't set security context on file %s",
|
||||||
+ quotearg (outname));
|
+ quotearg (outname));
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff -up patch-2.5.4/util.c.selinux patch-2.5.4/util.c
|
|
||||||
--- patch-2.5.4/util.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
--- patch-2.5.4/util.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
||||||
+++ patch-2.5.4/util.c 2008-06-12 11:12:01.000000000 +0100
|
+++ patch-2.5.4/util.c 2008-06-12 11:12:01.000000000 +0100
|
||||||
@@ -375,7 +375,8 @@ version_controller (char const *filename
|
@@ -375,7 +375,8 @@ version_controller (char const *filename
|
||||||
@ -42,7 +40,6 @@ diff -up patch-2.5.4/util.c.selinux patch-2.5.4/util.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
diff -up patch-2.5.4/util.h.selinux patch-2.5.4/util.h
|
|
||||||
--- patch-2.5.4/util.h.selinux 1999-08-30 07:20:08.000000000 +0100
|
--- patch-2.5.4/util.h.selinux 1999-08-30 07:20:08.000000000 +0100
|
||||||
+++ patch-2.5.4/util.h 2008-06-12 11:09:17.000000000 +0100
|
+++ patch-2.5.4/util.h 2008-06-12 11:09:17.000000000 +0100
|
||||||
@@ -21,7 +21,7 @@ char *fetchname PARAMS ((char *, int, ti
|
@@ -21,7 +21,7 @@ char *fetchname PARAMS ((char *, int, ti
|
||||||
@ -54,7 +51,6 @@ diff -up patch-2.5.4/util.h.selinux patch-2.5.4/util.h
|
|||||||
int create_file PARAMS ((char const *, int, mode_t));
|
int create_file PARAMS ((char const *, int, mode_t));
|
||||||
int systemic PARAMS ((char const *));
|
int systemic PARAMS ((char const *));
|
||||||
char *format_linenum PARAMS ((char[LINENUM_LENGTH_BOUND + 1], LINENUM));
|
char *format_linenum PARAMS ((char[LINENUM_LENGTH_BOUND + 1], LINENUM));
|
||||||
diff -up patch-2.5.4/Makefile.in.selinux patch-2.5.4/Makefile.in
|
|
||||||
--- patch-2.5.4/Makefile.in.selinux 1999-08-30 07:37:54.000000000 +0100
|
--- patch-2.5.4/Makefile.in.selinux 1999-08-30 07:37:54.000000000 +0100
|
||||||
+++ patch-2.5.4/Makefile.in 2008-06-12 11:09:17.000000000 +0100
|
+++ patch-2.5.4/Makefile.in 2008-06-12 11:09:17.000000000 +0100
|
||||||
@@ -36,7 +36,7 @@ DEFS = @DEFS@
|
@@ -36,7 +36,7 @@ DEFS = @DEFS@
|
||||||
@ -66,7 +62,6 @@ diff -up patch-2.5.4/Makefile.in.selinux patch-2.5.4/Makefile.in
|
|||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
U = @U@
|
U = @U@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
diff -up patch-2.5.4/inp.c.selinux patch-2.5.4/inp.c
|
|
||||||
--- patch-2.5.4/inp.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
--- patch-2.5.4/inp.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
||||||
+++ patch-2.5.4/inp.c 2008-06-12 11:11:08.000000000 +0100
|
+++ patch-2.5.4/inp.c 2008-06-12 11:11:08.000000000 +0100
|
||||||
@@ -154,7 +154,20 @@ get_input_file (char const *filename, ch
|
@@ -154,7 +154,20 @@ get_input_file (char const *filename, ch
|
||||||
@ -108,7 +103,6 @@ diff -up patch-2.5.4/inp.c.selinux patch-2.5.4/inp.c
|
|||||||
}
|
}
|
||||||
else if (! S_ISREG (instat.st_mode))
|
else if (! S_ISREG (instat.st_mode))
|
||||||
fatal ("File %s is not a regular file -- can't patch",
|
fatal ("File %s is not a regular file -- can't patch",
|
||||||
diff -up patch-2.5.4/pch.c.selinux patch-2.5.4/pch.c
|
|
||||||
--- patch-2.5.4/pch.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
--- patch-2.5.4/pch.c.selinux 2008-06-12 11:09:17.000000000 +0100
|
||||||
+++ patch-2.5.4/pch.c 2008-06-12 11:11:48.000000000 +0100
|
+++ patch-2.5.4/pch.c 2008-06-12 11:11:48.000000000 +0100
|
||||||
@@ -258,7 +258,12 @@ there_is_another_patch (void)
|
@@ -258,7 +258,12 @@ there_is_another_patch (void)
|
||||||
@ -142,7 +136,6 @@ diff -up patch-2.5.4/pch.c.selinux patch-2.5.4/pch.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = OLD; i <= INDEX; i++)
|
for (i = OLD; i <= INDEX; i++)
|
||||||
diff -up patch-2.5.4/common.h.selinux patch-2.5.4/common.h
|
|
||||||
--- patch-2.5.4/common.h.selinux 1999-08-30 07:20:08.000000000 +0100
|
--- patch-2.5.4/common.h.selinux 1999-08-30 07:20:08.000000000 +0100
|
||||||
+++ patch-2.5.4/common.h 2008-06-12 11:09:17.000000000 +0100
|
+++ patch-2.5.4/common.h 2008-06-12 11:09:17.000000000 +0100
|
||||||
@@ -39,6 +39,8 @@
|
@@ -39,6 +39,8 @@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The GNU patch command, for modifying/upgrading files
|
Summary: The GNU patch command, for modifying/upgrading files
|
||||||
Name: patch
|
Name: patch
|
||||||
Version: 2.5.4
|
Version: 2.5.4
|
||||||
Release: 34%{?dist}
|
Release: 35%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.gnu.org/software/patch/patch.html
|
URL: http://www.gnu.org/software/patch/patch.html
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -68,6 +68,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-35
|
||||||
|
- Don't fail if setfilecon() returns EPERM (bug #453365), although the
|
||||||
|
setfilecon man page suggests that ENOTSUP will be returned in this
|
||||||
|
case.
|
||||||
|
|
||||||
* Mon Jun 16 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-34
|
* Mon Jun 16 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-34
|
||||||
- Only write simple backups for each file once during a run
|
- Only write simple backups for each file once during a run
|
||||||
(bug #234822).
|
(bug #234822).
|
||||||
|
Loading…
Reference in New Issue
Block a user