summaryrefslogtreecommitdiff
path: root/sys-fs/ntfs3g
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/ntfs3g')
-rw-r--r--sys-fs/ntfs3g/Manifest2
-rw-r--r--sys-fs/ntfs3g/files/CVE-2019-9755.patch63
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild106
3 files changed, 171 insertions, 0 deletions
diff --git a/sys-fs/ntfs3g/Manifest b/sys-fs/ntfs3g/Manifest
index f216ca08e433..59bd1f359787 100644
--- a/sys-fs/ntfs3g/Manifest
+++ b/sys-fs/ntfs3g/Manifest
@@ -1,4 +1,5 @@
AUX 99-ntfs3g.rules 51 BLAKE2B 11dd7b3deb9276b38be508ec3de5bdb79ceb5e272e24d5dab60ad6103df9003b6ba7654a78966b90d0aa9a3ff949ba14764f53ad04dc2826f19dc90eb0b8c1db SHA512 9310dd1dceec9a6252d3e8b95a9a1002c84a6f077457892eefe1255c85557041defbd8dcf6acef86285b45abd8bbe85822dd59a9e4c307bba80dd2c17f971851
+AUX CVE-2019-9755.patch 2111 BLAKE2B 5655cbef5789dc0de3f461f97f41e3c1d87fd64047a80ae5e2b848920afeff6fb464cec70c73ab367bb28bf77e7e73bf699f2fe9f491f380194abf058e96ba3c SHA512 2b08f609cca17740e610dd90f39c6187f5c92f74e66458df784da0fbff8490294ee5a942cb403f101fa446310f43af9d5ad451a7939e0dc84347d07912967f9f
AUX ntfs3g-2014.2.15-no-split-usr.patch 1322 BLAKE2B efc71e28913d649484c1cf0d51dc34d8515cfba484a6a36a7cf158b142346255d403457ce0418148bbaa9e3e6e2cd494a509aa0c205ae944609844f4b9a04bc1 SHA512 232a1a7b84339c86758365564fce2058c3e652f833c6908245aa5f6f0e91d5c09cedcb978a1ebe62897c7288df4fe8671ba7085af403056742d897181e479e05
AUX ntfs3g-2016.2.22-CVE-2017-0358.patch 1169 BLAKE2B 47ee2ae7724f77d6c50e4eb816a4558fc296990c2f65e56d40f71db642e75e2bb35aeb2d6880e3faf21f61d9c51619de003903dba93cb742170bf4df56d6e744 SHA512 223f7b4fcd962d3c2499787f9a32c09f35705de98d3d1c96677cea18c67f77f5a086b7839892cb25b62c9145b2543c02d5abca89a82cda2345d5f993d6a60131
AUX ntfs3g-2016.2.22-sysmacros.patch 911 BLAKE2B a53765dc5cd4ae8320584167fbf202b50827e07f4599ab8572d434cc61110bb190854b24e567b210843002b74245e5a7f271ea4548cc52a0d3d893eb622702b2 SHA512 34768ef1ebf42b125cdc4d86937042f21b7146c4c76c1ed37e66e59a4bfaa863b54f7dbcca14a9d842782113e6ac70b2a96e62022dc2c8f717ec43c9985bf79f
@@ -10,4 +11,5 @@ DIST ntfs-3g_ntfsprogs-2017.3.23.tgz 1259054 BLAKE2B 4f12a6061ef0c116f26225eb3fb
EBUILD ntfs3g-2016.2.22-r2.ebuild 2648 BLAKE2B 9e973a9296943a6c61adba256c76913e04f0b8076b9f763fbea2947248997321ce650e6a55f79fc3de7814c7b2968a5fbebdcbe3a710689e897699f0923cedbd SHA512 dc942abb0b74430ea29cb2fb3cf1ff2af11f79779f23b4fb1b66302ae4a456e4b47699835e1c7e3200d3a4b4e6e64631a07fb22bf3c9ca99ced6c1bf8169ab32
EBUILD ntfs3g-2017.3.23-r1.ebuild 2512 BLAKE2B 155458dc34e1f37d79d7897cc25418982a0870f9de1e8e4d87c157b375c5b4c16b8b237a1eb51663be9c5753cbf721f232ae66b2af4217c165e4cc1d1f37a1fa SHA512 2cb2fac4ae5de791be2f7d68809d675f21e714a91119ad710c4230afcd9b356eaf1f63022004d41966e16f97be01fcdfce80c54c23032c83e253ddeb389ba8a8
EBUILD ntfs3g-2017.3.23-r2.ebuild 2934 BLAKE2B 7bb5e3ede744866356917076f62c5c887c7da7c7866b30083043eaf93a0a8c84aaa6a62b0562642e00c1b240c3bd00ebb5826bf1e4207dd93c01bedc002782a4 SHA512 ba910621e742844e38c0e038982bf78b5744a3c42367b806dab8268e300570682de2e2cb279e6c3f580b9d520d9c88335f179f0baa846ab6185f98a555b5b43e
+EBUILD ntfs3g-2017.3.23-r3.ebuild 2930 BLAKE2B ea3cc4778fc6fc4af6d8e15c9c8fa7d2bb5ddda8c3d32202512cdfeca746c2d609147703b4f90fdc5875cd1dcf9d9816c86f02a1f3dd950a94c6f781b8271c4e SHA512 0be319c53b19da4c253d7b8b299a383e277b71ecce45e35f0f68adb0e98d0c5bf6cecf0aa3537b89b2734ce4ea67281f817dd238cad857962496c1cb2f7b58c8
MISC metadata.xml 1188 BLAKE2B cd693b8b1281d056a5e75baeb04019684a67033607e16479c58830fbf9a19b88ba6e263c5e0637b5501cd5fe2fd000f92e8212354576242fa31c513158b38774 SHA512 6d9aa23202090132c37fe6915aa300597f2c88474065749de36143b8a47090c5bdb2e6449dffbb3843c9b7d30254fdde849b1aa230641910189d00134bd88c85
diff --git a/sys-fs/ntfs3g/files/CVE-2019-9755.patch b/sys-fs/ntfs3g/files/CVE-2019-9755.patch
new file mode 100644
index 000000000000..caa079d607ba
--- /dev/null
+++ b/sys-fs/ntfs3g/files/CVE-2019-9755.patch
@@ -0,0 +1,63 @@
+From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr>
+Date: Wed, 19 Dec 2018 15:57:50 +0100
+Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint
+
+The size check was inefficient because getcwd() uses an unsigned int
+argument.
+---
+ src/lowntfs-3g.c | 6 +++++-
+ src/ntfs-3g.c | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
+index 993867fa..0660439b 100644
+--- a/src/lowntfs-3g.c
++++ b/src/lowntfs-3g.c
+@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[])
+ else {
+ ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
+ if (ctx->abs_mnt_point) {
+- if (getcwd(ctx->abs_mnt_point,
++ if ((strlen(opts.mnt_point) < PATH_MAX)
++ && getcwd(ctx->abs_mnt_point,
+ PATH_MAX - strlen(opts.mnt_point) - 1)) {
+ strcat(ctx->abs_mnt_point, "/");
+ strcat(ctx->abs_mnt_point, opts.mnt_point);
+@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[])
+ /* Solaris also wants the absolute mount point */
+ opts.mnt_point = ctx->abs_mnt_point;
+ #endif /* defined(__sun) && defined (__SVR4) */
++ } else {
++ free(ctx->abs_mnt_point);
++ ctx->abs_mnt_point = (char*)NULL;
+ }
+ }
+ }
+diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
+index 6ce89fef..4e0912ae 100644
+--- a/src/ntfs-3g.c
++++ b/src/ntfs-3g.c
+@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[])
+ else {
+ ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
+ if (ctx->abs_mnt_point) {
+- if (getcwd(ctx->abs_mnt_point,
++ if ((strlen(opts.mnt_point) < PATH_MAX)
++ && getcwd(ctx->abs_mnt_point,
+ PATH_MAX - strlen(opts.mnt_point) - 1)) {
+ strcat(ctx->abs_mnt_point, "/");
+ strcat(ctx->abs_mnt_point, opts.mnt_point);
+@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[])
+ /* Solaris also wants the absolute mount point */
+ opts.mnt_point = ctx->abs_mnt_point;
+ #endif /* defined(__sun) && defined (__SVR4) */
++ } else {
++ free(ctx->abs_mnt_point);
++ ctx->abs_mnt_point = (char*)NULL;
+ }
+ }
+ }
+--
+2.26.1
+
diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild
new file mode 100644
index 000000000000..2915df67727f
--- /dev/null
+++ b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit linux-info udev toolchain-funcs libtool
+
+MY_PN=${PN/3g/-3g}
+MY_P=${MY_PN}_ntfsprogs-${PV}
+
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+# The subslot matches the SONAME major #.
+SLOT="0/88"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
+
+RDEPEND="
+ ntfsdecrypt? (
+ >=dev-libs/libgcrypt-1.2.2:0
+ >=net-libs/gnutls-1.4.4
+ )
+ external-fuse? (
+ >=sys-fs/fuse-2.8.0:0
+ )
+"
+DEPEND="${RDEPEND}
+ sys-apps/attr
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="AUTHORS ChangeLog CREDITS README"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
+ "${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
+ # Fedora fixes
+ "${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch
+ "${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch
+ "${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch
+ "${FILESDIR}"/CVE-2019-9755.patch
+)
+
+pkg_setup() {
+ if use external-fuse && use kernel_linux; then
+ if kernel_is lt 2 6 9; then
+ die "Your kernel is too old."
+ fi
+ CONFIG_CHECK="~FUSE_FS"
+ FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+ # Keep the symlinks in the same place we put the main binaries.
+ # Having them in / when all the progs are in /usr is pointless.
+ sed -i \
+ -e 's:/sbin:$(sbindir):g' \
+ {ntfsprogs,src}/Makefile.in || die #578336
+ # Note: patches apply to Makefile.in, so don't run autotools here.
+ elibtoolize
+}
+
+src_configure() {
+ # disable hd library until we have the right library in the tree and
+ # don't links to hwinfo one causing issues like bug #602360
+ tc-ld-disable-gold
+ # passing --exec-prefix is needed as the build system is trying to be clever
+ # and install itself into / instead of /usr in order to be compatible with
+ # separate-/usr setups (which we don't support without an initrd).
+ econf \
+ --exec-prefix="${EPREFIX}"/usr \
+ $(use_enable debug) \
+ --enable-ldscript \
+ --disable-ldconfig \
+ $(use_enable acl posix-acls) \
+ $(use_enable xattr xattr-mappings) \
+ $(use_enable ntfsdecrypt crypto) \
+ $(use_enable ntfsprogs) \
+ $(use_enable ntfsprogs quarantined) \
+ --without-uuid \
+ --without-hd \
+ --enable-extras \
+ $(use_enable static-libs static) \
+ --with-fuse=$(usex external-fuse external internal)
+}
+
+src_install() {
+ default
+
+ use suid && fperms u+s /usr/bin/ntfs-3g
+ # Not needed with the link of mount.ntfs being created, causes
+ # issues like bug #635080
+# udev_dorules "${FILESDIR}"/99-ntfs3g.rules
+ dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
+
+ find "${D}" -name '*.la' -type f -delete || die
+}