sys-libs/libselinux: bump to 2.6_rc2
authorJason Zaman <perfinion@gentoo.org>
Fri, 7 Oct 2016 03:57:18 +0000 (11:57 +0800)
committerJason Zaman <perfinion@gentoo.org>
Fri, 7 Oct 2016 04:18:16 +0000 (12:18 +0800)
Package-Manager: portage-2.3.0

sys-libs/libselinux/Manifest
sys-libs/libselinux/files/libselinux-2.6-0001-libselinux-selinux_restorecon-fix-realpath-logic.patch [deleted file]
sys-libs/libselinux/libselinux-2.6_rc2.ebuild [moved from sys-libs/libselinux/libselinux-2.6_rc1-r1.ebuild with 97% similarity]
sys-libs/libselinux/libselinux-9999.ebuild

index c2a779ea79ebf72a88a45b5a76c1ebb26b33bcbd..1cc61aa5072a2c7b8f203e5dbc4df6530484fe7f 100644 (file)
@@ -1,2 +1,2 @@
 DIST libselinux-2.5.tar.gz 189019 SHA256 94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f SHA512 1c6718aa6fa05c8635427cd6f5a89ce47fb6bb9bd2fec417293122826695d1ebb0e0b86e83711abb5c4fe71c67dce6f2e18745592833d1711f0ab2d01246b8c7 WHIRLPOOL 96192b856d32a82b9b4413137085e69ad52cbf2e0d274603a90d904e9a318a80c83f337aef26f54c685a689972432955f0f9de67949e0bb4f844611df22d3589
-DIST libselinux-2.6-rc1.tar.gz 203034 SHA256 4ef2bbb1bdb1d0c43ed14b237066364b07bd1d2ae0a16dcd475bbf7793723928 SHA512 72a8a1d244fea3902cecff69fda48c1bc8d7ce1789902126565272782105bd43205e517af8a4cac5cc5cab47c48f0cd3b287c42a408ae3889b51b19b0b38632b WHIRLPOOL b9012b74a3f073e25b63d83003194f23f7177cdd0e33443de87ff7491e0ecffa72eea07be04247cafd3045773427dbf98f592e02346c8fa32bc161be624cc2b4
+DIST libselinux-2.6-rc2.tar.gz 203126 SHA256 c0e297a046a2e07f9dbe14ef0ea8a36b44afeaf798fd51189638939eea741be7 SHA512 6e2c03a8bd41f08e5d45693862e13db7373dec639bd6962d1398644b1b1b1351d845fd93f8a952be3387af8242e17badd0a2e8e2b31d542f1d9e227d45e38d39 WHIRLPOOL 636702cdf5c7ea151fcc904712da3b419d0a50bf45d45dbe83ecb7b1dc418a8a179356f2af5a7d92179c82e1da7ec0f809b6c320dff0fa56ab588a852cc35dfe
diff --git a/sys-libs/libselinux/files/libselinux-2.6-0001-libselinux-selinux_restorecon-fix-realpath-logic.patch b/sys-libs/libselinux/files/libselinux-2.6-0001-libselinux-selinux_restorecon-fix-realpath-logic.patch
deleted file mode 100644 (file)
index 3a0d7fb..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From aa0c824bb2eeb8960ba02133faade72c837ea951 Mon Sep 17 00:00:00 2001
-From: Stephen Smalley <sds@tycho.nsa.gov>
-Date: Wed, 5 Oct 2016 10:45:35 -0400
-Subject: [PATCH] libselinux: selinux_restorecon: fix realpath logic
-
-The realpath logic in selinux_restorecon() was taken from the
-Android libselinux fork.  However, bionic dirname() and basename()
-do not modify their argument and therefore are safe to call on a
-const string.  POSIX dirname() and basename() can modify their argument.
-There is a GNU basename() that does not modify its argument, but not
-for dirname().
-For portability, create copies of the original pathname for each call
-and keep them around until finished using the result.
-
-Fixes "restorecon -r goes up the tree?" bug reported by Jason Zaman.
-
-Reported-by: Jason Zaman <jason@perfinion.com>
-Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
----
- libselinux/src/selinux_restorecon.c | 26 +++++++++++++++++++++-----
- 1 file changed, 21 insertions(+), 5 deletions(-)
-
-diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
-index 0945138..e38d1d0 100644
---- libselinux/src/selinux_restorecon.c
-+++ libselinux/src/selinux_restorecon.c
-@@ -797,25 +797,41 @@ int selinux_restorecon(const char *pathname_orig,
-        * realpath of containing dir, then appending last component name.
-        */
-       if (flags.userealpath) {
--              pathbname = basename((char *)pathname_orig);
-+              char *basename_cpy = strdup(pathname_orig);
-+              if (!basename_cpy)
-+                      goto realpatherr;
-+              pathbname = basename(basename_cpy);
-               if (!strcmp(pathbname, "/") || !strcmp(pathbname, ".") ||
-                                           !strcmp(pathbname, "..")) {
-                       pathname = realpath(pathname_orig, NULL);
--                      if (!pathname)
-+                      if (!pathname) {
-+                              free(basename_cpy);
-                               goto realpatherr;
-+                      }
-               } else {
--                      pathdname = dirname((char *)pathname_orig);
-+                      char *dirname_cpy = strdup(pathname_orig);
-+                      if (!dirname_cpy) {
-+                              free(basename_cpy);
-+                              goto realpatherr;
-+                      }
-+                      pathdname = dirname(dirname_cpy);
-                       pathdnamer = realpath(pathdname, NULL);
--                      if (!pathdnamer)
-+                      free(dirname_cpy);
-+                      if (!pathdnamer) {
-+                              free(basename_cpy);
-                               goto realpatherr;
-+                      }
-                       if (!strcmp(pathdnamer, "/"))
-                               error = asprintf(&pathname, "/%s", pathbname);
-                       else
-                               error = asprintf(&pathname, "%s/%s",
-                                                   pathdnamer, pathbname);
--                      if (error < 0)
-+                      if (error < 0) {
-+                              free(basename_cpy);
-                               goto oom;
-+                      }
-               }
-+              free(basename_cpy);
-       } else {
-               pathname = strdup(pathname_orig);
-               if (!pathname)
--- 
-2.7.3
-
similarity index 97%
rename from sys-libs/libselinux/libselinux-2.6_rc1-r1.ebuild
rename to sys-libs/libselinux/libselinux-2.6_rc2.ebuild
index fe8c78bde01e43aa04d28779502e252cbdbaa21b..0c6c84222e02ca7c8608868f54e92a29c898ae76 100644 (file)
@@ -11,7 +11,7 @@ inherit multilib python-r1 toolchain-funcs multilib-minimal
 
 MY_P="${P//_/-}"
 SEPOL_VER="${PV}"
-MY_RELEASEDATE="20160930"
+MY_RELEASEDATE="20161006"
 
 DESCRIPTION="SELinux userland library"
 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -47,7 +47,6 @@ DEPEND="${RDEPEND}
 src_prepare() {
        if [[ ${PV} != 9999 ]] ; then
                # If needed for live builds, place them in /etc/portage/patches
-               eapply "${FILESDIR}/libselinux-2.6-0001-libselinux-selinux_restorecon-fix-realpath-logic.patch"
                eapply "${FILESDIR}/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch"
                eapply "${FILESDIR}/libselinux-2.6-0007-build-related-fixes-bug-500674.patch"
        fi
index 84092cb7eb1dee80bd2b4cd0d4ec484a2cd75750..0c6c84222e02ca7c8608868f54e92a29c898ae76 100644 (file)
@@ -11,7 +11,7 @@ inherit multilib python-r1 toolchain-funcs multilib-minimal
 
 MY_P="${P//_/-}"
 SEPOL_VER="${PV}"
-MY_RELEASEDATE="20160930"
+MY_RELEASEDATE="20161006"
 
 DESCRIPTION="SELinux userland library"
 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"