diff --git a/ChangeLog b/ChangeLog index a49d76a1..c215f172 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,3 +4,6 @@ Detailed ChangeLog can be found at The changes and history may also be found on the source repository : http://sourceforge.net/p/ntfs-3g/ntfs-3g/ci/edge/tree/ + +The ChangeLog specific to the advanced version is available on + http://jp-andre.pagesperso-orange.fr/changelog.html diff --git a/README b/README index b829fd0b..329723e8 100644 --- a/README +++ b/README @@ -23,6 +23,10 @@ advanced features, please get the instructions from http://www.tuxera.com/community/ntfs-3g-advanced/ +This specific version has support for new features as described in + + http://jp-andre.pagesperso-orange.fr/ntfs-3g.html + News, support answers, problem submission instructions, support and discussion forums, performance numbers and other information are available on the project web site at @@ -73,7 +77,11 @@ There are also a few make targets for building parts : make drivers : only build drivers and libraries, without ntfsprogs make ntfsprogs : only build ntfsprogs and libntfs-3g, without drivers -Non-Linux: Please see +Solaris and OpenIndiana: Please see + + http://jp-andre.pagesperso-orange.fr/openindiana-ntfs-3g.html + +Other: Please see http://www.tuxera.com/community/ntfs-3g-download/ @@ -118,6 +126,25 @@ And, to end the test, unmount the usual way : umount /dev/sda1 +PRELINKED BINARY VERSION +======================== + +Statically prelinked versions for X86 are compiled with gcc 4.1.2 and +prepared as an upgrade to the ntfs-3g shipped with the live-CD Knoppix 5.1.1. +The statically prelinked versions for Sparc are compiled with gcc 4.0.0. +Both are restricting to using glibc 2.3.2 and should be usable on +virtually any configuration since kernel 2.6.20 having a fuse kernel +module (fuse.ko) installed. + +They can be used like ordinary versions. Just copy the appropriate +executable file into a readable directory, set the executable flags and +start as root with the mount arguments : + + linked-ntfs-3g /dev/sda1 /mnt/windows +or + sparc-ntfs-3g /dev/sda1 /mnt/windows + + NTFS UTILITIES ============== diff --git a/configure.ac b/configure.ac index 88733eb5..9b457fb1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,8 +24,8 @@ # Autoconf AC_PREREQ(2.59) -AC_INIT([ntfs-3g],[2017.3.23],[ntfs-3g-devel@lists.sf.net]) -LIBNTFS_3G_VERSION="88" +AC_INIT([ntfs-3g],[2017.3.23AR.2],[ntfs-3g-devel@lists.sf.net]) +LIBNTFS_3G_VERSION="882" AC_CONFIG_SRCDIR([src/ntfs-3g.c]) # Environment @@ -33,7 +33,7 @@ AC_CANONICAL_HOST AC_CANONICAL_TARGET # Automake -AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}]) +AM_INIT_AUTOMAKE() AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE @@ -497,7 +497,7 @@ AC_C_BIGENDIAN( ] , ) -AC_C_CONST +# AC_C_CONST AC_C_INLINE AC_TYPE_OFF_T AC_TYPE_SIZE_T diff --git a/fedora/ntfs-3g.spec b/fedora/ntfs-3g.spec new file mode 100644 index 00000000..230c7402 --- /dev/null +++ b/fedora/ntfs-3g.spec @@ -0,0 +1,581 @@ +# Pass --with externalfuse to compile against system fuse lib +# Default is internal fuse-lite. +%define with_externalfuse %{?_with_externalfuse:1}%{!?_with_externalfuse:0} + +# For release candidates +# %%global subver -RC + +%global oldrhel 0 + +%if 0%{?rhel} +%if 0%{?rhel} < 7 +%global oldrhel 1 +%endif +%endif + +Name: ntfs-3g +Summary: Linux NTFS userspace driver +Version: 2017.3.23AR.2 +Release: 1.el7 +License: GPLv2+ +Group: System Environment/Base +Source0: http://jp-andre.pagesperso-orange.fr/%{name}_ntfsprogs-%{version}%{?subver}.tgz +%if %{oldrhel} +Source1: 20-ntfs-config-write-policy.fdi +%endif +URL: http://jp-andre.pagesperso-orange.fr +%if %{with_externalfuse} +BuildRequires: fuse-devel +Requires: fuse +%endif +BuildRequires: libtool, libattr-devel +# ntfsprogs BuildRequires +BuildRequires: libconfig-devel, libuuid-devel +Epoch: 2 +Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release} +Obsoletes: ntfsprogs-fuse +Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release} + +%description +NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS +driver for Linux and many other operating systems. It provides safe +handling of the Windows XP, Windows Server 2003, Windows 2000, Windows +Vista, Windows Server 2008 and Windows 7 NTFS file systems. NTFS-3G can +create, remove, rename, move files, directories, hard links, and streams; +it can read and write normal and transparently compressed files, including +streams and sparse files; it can handle special files like symbolic links, +devices, and FIFOs, ACL, extended attributes; moreover it provides full +file access right and ownership support. + +%package devel +Summary: Development files and libraries for ntfs-3g +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: pkgconfig +Provides: ntfsprogs-devel = %{epoch}:%{version}-%{release} +# ntfsprogs-2.0.0-17 was never built. 2.0.0-16 was the last build for that +# standalone package. +Obsoletes: ntfsprogs-devel < 2.0.0-17 + +%description devel +Headers and libraries for developing applications that use ntfs-3g +functionality. + +%package -n ntfsprogs +Summary: NTFS filesystem libraries and utilities +Group: System Environment/Base +# We don't really provide this. This code is dead and buried now. +Provides: ntfsprogs-gnomevfs = %{epoch}:%{version}-%{release} +Obsoletes: ntfsprogs-gnomevfs +# Needed to fix multilib issue +# ntfsprogs-2.0.0-17 was never built. 2.0.0-16 was the last build for that +# standalone package. +Obsoletes: ntfsprogs < 2.0.0-17 + +%description -n ntfsprogs +The ntfsprogs package currently consists of a library and utilities such as +mkntfs, ntfscat, ntfsls, ntfsresize, and ntfsundelete (for a full list of +included utilities see man 8 ntfsprogs after installation). + +%prep +%setup -q -n %{name}_ntfsprogs-%{version}%{?subver} + +%build +CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" +%configure \ + --disable-static \ + --disable-ldconfig \ +%if 0%{?_with_externalfuse:1} + --with-fuse=external \ +%endif + --exec-prefix=/ \ +%if %{oldrhel} + --bindir=/bin \ + --sbindir=/sbin \ + --libdir=/%{_lib} \ +%endif + --enable-crypto \ + --enable-extras +make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool + +%install +make LIBTOOL=%{_bindir}/libtool DESTDIR=%{buildroot} install +%if %{oldrhel} +rm -rf %{buildroot}/%{_lib}/*.la +rm -rf %{buildroot}/%{_lib}/*.a +%else +rm -rf %{buildroot}%{_libdir}/*.la +rm -rf %{buildroot}%{_libdir}/*.a +%endif + +%if %{oldrhel} +rm -rf %{buildroot}/sbin/mount.ntfs-3g +cp -a %{buildroot}/bin/ntfs-3g %{buildroot}/sbin/mount.ntfs-3g +%else +rm -rf %{buildroot}/%{_sbindir}/mount.ntfs-3g +cp -a %{buildroot}/%{_bindir}/ntfs-3g %{buildroot}/%{_sbindir}/mount.ntfs-3g +%endif + +# Actually make some symlinks for simplicity... +# ... since we're obsoleting ntfsprogs-fuse +%if %{oldrhel} +pushd %{buildroot}/bin +ln -s ntfs-3g ntfsmount +popd +pushd %{buildroot}/sbin +%else +pushd %{buildroot}/%{_bindir} +ln -s ntfs-3g ntfsmount +popd +pushd %{buildroot}/%{_sbindir} +%endif +ln -s mount.ntfs-3g mount.ntfs-fuse +# And since there is no other package in Fedora that provides an ntfs +# mount... +ln -s mount.ntfs-3g mount.ntfs +popd + +%if %{oldrhel} +# Compat symlinks +mkdir -p %{buildroot}%{_bindir} +pushd %{buildroot}%{_bindir} +ln -s /bin/ntfs-3g ntfs-3g +ln -s /bin/ntfsmount ntfsmount +popd + +# Put the .pc file in the right place. +mkdir -p %{buildroot}%{_libdir}/pkgconfig/ +mv %{buildroot}/%{_lib}/pkgconfig/libntfs-3g.pc %{buildroot}%{_libdir}/pkgconfig/ +%else +mv %{buildroot}/sbin/* %{buildroot}/%{_sbindir} +rmdir %{buildroot}/sbin +%endif + +# We get this on our own, thanks. +rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README + +%if %{oldrhel} +mkdir -p %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/ +cp -a %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/ +%endif + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%doc AUTHORS ChangeLog COPYING COPYING.LIB CREDITS NEWS README +%if %{oldrhel} +/sbin/mount.ntfs +/sbin/mount.ntfs-3g +/sbin/mount.ntfs-fuse +/sbin/mount.lowntfs-3g +/bin/ntfs-3g +/bin/ntfsmount +#compat symlinks +%else +%{_sbindir}/mount.ntfs +%{_sbindir}/mount.ntfs-3g +%{_sbindir}/mount.ntfs-fuse +%{_sbindir}/mount.lowntfs-3g +%endif +%if %{oldrhel} +/bin/ntfs-3g.probe +/bin/lowntfs-3g +%else +%{_bindir}/ntfs-3g.probe +%{_bindir}/lowntfs-3g +%{_bindir}/ntfs-3g +%{_bindir}/ntfsmount +%endif +%if %{oldrhel} +/%{_lib}/libntfs-3g.so.* +/%{_lib}/ntfs-3g +%else +%{_libdir}/libntfs-3g.so.* +%{_libdir}/ntfs-3g +%endif +%{_mandir}/man8/mount.lowntfs-3g.* +%{_mandir}/man8/mount.ntfs-3g.* +%{_mandir}/man8/ntfs-3g* +%if %{oldrhel} +%{_datadir}/hal/fdi/policy/10osvendor/20-ntfs-config-write-policy.fdi +%endif + +%files devel +%{_includedir}/ntfs-3g/ +%if %{oldrhel} +/%{_lib}/libntfs-3g.so +%else +%{_libdir}/libntfs-3g.so +%endif +%{_libdir}/pkgconfig/libntfs-3g.pc + +%files -n ntfsprogs +%doc AUTHORS COPYING COPYING.LIB CREDITS ChangeLog NEWS README +%if %{oldrhel} +/bin/ntfscat +/bin/ntfscluster +/bin/ntfscmp +/bin/ntfsfix +/bin/ntfsinfo +/bin/ntfsls +%else +%{_bindir}/ntfscat +%{_bindir}/ntfscluster +%{_bindir}/ntfscmp +%{_bindir}/ntfsfix +%{_bindir}/ntfsinfo +%{_bindir}/ntfsls +%endif +%if %{oldrhel} +/bin/ntfsdecrypt +/bin/ntfstruncate +/bin/ntfswipe +/sbin/fsck.ntfs +/sbin/mkfs.ntfs +/sbin/mkntfs +/sbin/ntfsclone +/sbin/ntfscp +/sbin/ntfslabel +/sbin/ntfsresize +/sbin/ntfsundelete +%else +%{_bindir}/ntfsdecrypt +%{_bindir}/ntfsrecover +%{_bindir}/ntfssecaudit +%{_bindir}/ntfstruncate +%{_bindir}/ntfsusermap +%{_bindir}/ntfswipe +%{_sbindir}/mkfs.ntfs +%{_sbindir}/mkntfs +%{_sbindir}/ntfsclone +%{_sbindir}/ntfscp +%{_sbindir}/ntfslabel +%{_sbindir}/ntfsresize +%{_sbindir}/ntfsundelete +%endif +%{_mandir}/man8/mkntfs.8* +%{_mandir}/man8/mkfs.ntfs.8* +%{_mandir}/man8/ntfs[^m][^o]*.8* +%exclude %{_mandir}/man8/ntfs-3g* + +%changelog +* Thu Mar 1 2018 Jean-Pierre Andre 2017.3.23AR.2 +- adapted to advanced ntfs-3g and basic ntfsprogs + +* Wed Jun 17 2015 Fedora Release Engineering - 2:2015.3.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 22 2015 Tom Callaway 2:2015.3.14-2 +- fix CVE-2015-3202 + +* Tue Apr 7 2015 Tom Callaway 2:2015.3.14-1 +- update to 2015.3.14 + +* Sat Feb 21 2015 Till Maas - 2:2014.2.15-8 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Tue Jan 13 2015 Tom Callaway - 2:2014.2.15-7 +- add patch to ignore -s option + +* Sun Aug 17 2014 Fedora Release Engineering - 2:2014.2.15-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Aug 5 2014 Richard W.M. Jones - 2:2014.2.15-5 +- Add upstream patch to fix fstrim so it works on partitions as well + as whole disks. + +* Thu Jul 31 2014 Richard W.M. Jones - 2:2014.2.15-4 +- Upstream patches which add fstrim support. + +* Sat Jun 07 2014 Fedora Release Engineering - 2:2014.2.15-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Apr 24 2014 Tomáš Mráz - 2:2014.2.15-2 +- Rebuild for new libgcrypt + +* Wed Feb 26 2014 Tom Callaway 2:2014.2.15-1 +- update to 2014.2.15 + +* Sat Aug 03 2013 Fedora Release Engineering - 2:2013.1.13-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue May 28 2013 Tom Callaway - 2:2013.1.13-5 +- fix bug preventing reads on compressed files on windows 8 partitions (bz967301) + +* Mon May 6 2013 Tom Callaway - 2:2013.1.13-4 +- apply fixes from upstream for issue with 4K sector drives (bz951603) + and truncated check for Interix types on a 32-bit CPU (bz958681) + +* Thu Feb 7 2013 Tom Callaway - 2:2013.1.13-3 +- drop redundant manpages from ntfsprogs subpackage + +* Thu Jan 31 2013 Tom Callaway - 2:2013.1.13-2 +- drop hal files, since hal is very dead + +* Tue Jan 22 2013 Richard W.M. Jones - 2:2013.1.13-1 +- New upstream version 2013.1.13 (RHBZ#902729). +- Drop ntfs-3g-junction-point-fix.patch (now upstream). +- Drop Windows 8 patches x 2 (both now upstream). +- Remove obsolete patches from Fedora git repository. +- Fix .gitignore file. + +* Mon Oct 15 2012 Tom Callaway - 2:2012.1.15-5 +- Limit obsoletes to last ntfsprogs-* versions ( < 2.0.0-17 ) to + minimize yum churn (where it would obsolete itself on every upgrade) + BZ#863641 + +* Thu Oct 4 2012 Tom Callaway - 2:2012.1.15-4 +- add patches from upstream git to add a level of safety in the case where windows 8 + leaves the NTFS filesystem in an unsafe state and Linux access could result in data loss. + Basically, with these patches, Linux will refuse to mount the ntfs partition. For the details + refer to: https://bugzilla.redhat.com/show_bug.cgi?id=859373 + +* Sun Aug 19 2012 Tom Callaway - 2:2012.1.15-3 +- apply upstream fix for junction points (bz849332) + +* Fri Jul 20 2012 Fedora Release Engineering - 2:2012.1.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Feb 10 2012 Tom Callaway 2:2012.1.15-1 +- update to 2012.1.15 + +* Wed Feb 1 2012 Kay Sievers 2:2011.10.9-3 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Fri Jan 13 2012 Fedora Release Engineering - 2:2011.10.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Oct 11 2011 Tom Callaway - 2:2011.10.9-1 +- 2011.10.9-RC +- patch ntfsck to return 0 instead of 1 on unsupported filesystem cases + +* Mon Sep 12 2011 Tom Callaway - 2:2011.4.12-5 +- fix ntfsck symlink (thanks to Chris Smart for catching it) + +* Wed Sep 7 2011 Tom Callaway - 2:2011.4.12-4 +- fix issue preventing some volume types from not working properly (bz735862) +- create fsck.ntfs symlink to ntfsck (bz735612). +- apply cleanups from git trunk for ntfsck (bz 706638) +- apply cleanups from git trunk for ntfsfix (bz 711662, 723562) + +* Mon May 9 2011 Tom Callaway - 2:2011.4.12-3 +- add Obsoletes to resolve multi-lib upgrade issue (bz702671) + +* Mon Apr 25 2011 Tom Callaway - 2:2011.4.12-2 +- add --enable-extras flag (and use it) to ensure proper binary installation + +* Thu Apr 14 2011 Tom Callaway - 2:2011.4.12-1 +- update to 2011.4.12 +- pickup ntfsprogs and obsolete the old separate packages + +* Tue Feb 08 2011 Fedora Release Engineering - 2:2011.1.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 25 2011 Tom Callaway - 2:2011.1.15-1 +- update to 2011.1.15 + +* Mon Oct 11 2010 Tom "spot" Callaway - 2:2010.10.2-1 +- update to 2010.10.2, all patches merged upstream + +* Thu Sep 9 2010 Tom "spot" Callaway - 2:2010.8.8-2 +- add support for context= mount option (Till Maas) (bz502946) + +* Mon Aug 9 2010 Tom "spot" Callaway - 2:2010.8.8-1 +- update to 2010.8.8 + +* Fri Jul 9 2010 Tom "spot" Callaway - 2:2010.6.31-1 +- update to 2010.6.31-RC + +* Fri Jul 9 2010 Tom "spot" Callaway - 2:2010.5.22-1 +- update to 2010.5.22 + +* Tue May 18 2010 Tom "spot" Callaway - 2:2010.5.16-1 +- update to 2010.5.16 +- fix makefile to build secaudit/usermap tools + +* Mon Mar 8 2010 Tom "spot" Callaway - 2:2010.3.6-1 +- update to 2010.3.6 + +* Mon Feb 15 2010 Tom "spot" Callaway - 2:2010.2.6-1 +- update to 2010.2.6-RC +- fix summary text + +* Wed Jan 20 2010 Tom "spot" Callaway - 2:2010.1.16-1 +- update to 2010.1.16 + +* Fri Nov 20 2009 Tom "spot" Callaway - 2:2009.11.14-2 +- missing BuildRequires: libattr-devel + +* Fri Nov 20 2009 Tom "spot" Callaway - 2:2009.11.14-1 +- update to 2009.11.14 + +* Fri Oct 30 2009 Tom "spot" Callaway - 2:2009.10.5-0.1.RC +- bump to 2009.10.5-RC + +* Thu Sep 17 2009 Peter Lemenkov - 2:2009.4.4-3 +- Rebuilt with new fuse + +* Sat Jul 25 2009 Fedora Release Engineering - 2:2009.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Apr 3 2009 Tom "spot" Callaway - 2:2009.4.4-1 +- update to 4.4, patch for mount issue merged + +* Mon Mar 30 2009 Tom "spot" Callaway - 2:2009.3.8-2 +- Patch from upstream provided as temporary workaround for bz 486619 + +* Thu Mar 26 2009 Tom "spot" Callaway - 2:2009.3.8-1 +- update to 2009.3.8 + +* Wed Feb 25 2009 Fedora Release Engineering - 2:2009.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 16 2009 Tom "spot" Callaway - 2:2009.2.1-2 +- update fdi to fix nautilus mount bug + +* Thu Feb 12 2009 Tom "spot" Callaway - 2:2009.2.1-1 +- update to 2009.2.1 + +* Fri Jan 30 2009 Tom "spot" Callaway - 2:2009.1.1-1 +- new release, new versioning scheme from upstream + +* Thu Jan 8 2009 Tom "spot" Callaway - 2:1.5222-0.2.RC +- move pkgconfig Requires to -devel package where it belongs + +* Mon Dec 22 2008 Tom "spot" Callaway - 2:1.5222-0.1.RC +- 1.5222-RC + +* Tue Dec 2 2008 Tom "spot" Callaway - 2:1.5130-1 +- update to 1.5130 + +* Wed Oct 29 2008 Tom "spot" Callaway - 2:1.5012-4 +- fix hal file to properly ignore internal recovery partitions + +* Wed Oct 29 2008 Tom "spot" Callaway - 2:1.5012-3 +- fix hal file to cover all mount cases (thanks to Richard Hughes) + +* Mon Oct 20 2008 Tom "spot" Callaway - 2:1.5012-2 +- add fdi file to enable hal automounting + +* Wed Oct 15 2008 Tom "spot" Callaway - 2:1.5012-1 +- update to 1.5012 (same code as 1.2926-RC) + +* Mon Sep 22 2008 Tom "spot" Callaway - 2:1.2926-0.1.RC +- update to 1.2926-RC (rawhide, F10) + +* Fri Aug 22 2008 Tom "spot" Callaway - 2:1.2812-1 +- update to 1.2812 + +* Sat Jul 12 2008 Tom "spot" Callaway - 2:1.2712-1 +- update to 1.2712 + +* Mon May 5 2008 Tom "spot" Callaway - 2:1.2506-1 +- update to 1.2506 + +* Tue Apr 22 2008 Tom "spot" Callaway - 2:1.2412-1 +- update to 1.2412 + +* Mon Mar 10 2008 Tom "spot" Callaway - 2:1.2310-2 +- update sources + +* Mon Mar 10 2008 Tom "spot" Callaway - 2:1.2310-1 +- update to 1.2310 +- make -n a noop (bz 403291) + +* Tue Feb 26 2008 Tom "spot" Callaway - 2:1.2216-3 +- rebuild against fixed gcc (PR35264, bugzilla 433546) + +* Tue Feb 19 2008 Fedora Release Engineering - 2:1.2216-2 +- Autorebuild for GCC 4.3 + +* Mon Feb 18 2008 Tom "spot" Callaway 2:1.2216-1 +- update to 1.2216 + +* Tue Nov 20 2007 Tom "spot" Callaway 2:1.1120-1 +- bump to 1.1120 +- default to fuse-lite (internal to ntfs-3g), but enable --with externalfuse + as an option + +* Thu Nov 8 2007 Tom "spot" Callaway 2:1.1104-1 +- bump to 1.1104 + +* Mon Oct 29 2007 Tom "spot" Callaway 2:1.1030-1 +- bump to 1.1030 + +* Sat Oct 6 2007 Tom "spot" Callaway 2:1.1004-1 +- bump to 1.1004 + +* Thu Sep 20 2007 Tom "spot" Callaway 2:1.913-2 +- don't set /sbin/mount.ntfs-3g setuid + +* Mon Sep 17 2007 Tom "spot" Callaway 2:1.913-1 +- bump to 1.913 + +* Sun Aug 26 2007 Tom "spot" Callaway 2:1.826-1 +- bump to 1.826 +- glibc27 patch is upstreamed + +* Fri Aug 24 2007 Tom "spot" Callaway 2:1.810-1 +- bump to 1.810 +- fix license tag +- rebuild for ppc32 + +* Sun Jul 22 2007 Tom "spot" Callaway 2:1.710-1 +- bump to 1.710 +- add compat symlinks + +* Wed Jun 27 2007 Tom "spot" Callaway 2:1.616-1 +- bump to 1.616 + +* Tue May 15 2007 Tom "spot" Callaway 2:1.516-1 +- bump to 1.516 +- fix bugzilla 232031 + +* Sun Apr 15 2007 Tom "spot" Callaway 2:1.417-1 +- bump to 1.417 + +* Sun Apr 15 2007 Tom "spot" Callaway 2:1.416-1 +- bump to 1.416 +- drop patch0, upstreamed + +* Wed Apr 4 2007 Tom "spot" Callaway 2:1.328-2 +- allow non-root users to mount/umount ntfs volumes (Laszlo Dvornik) + +* Sat Mar 31 2007 Tom "spot" Callaway 2:1.328-1 +- bump to 1.328 +- drop patch, use --disable-ldconfig instead + +* Wed Feb 21 2007 Tom "spot" Callaway 2:1.0-1 +- 1.0 release! + +* Fri Jan 19 2007 Tom "spot" Callaway 2:0-0.9.20070118 +- symlink to mount.ntfs + +* Wed Jan 17 2007 Tom "spot" Callaway 2:0-0.8.20070118 +- bump to 20070118 + +* Wed Jan 17 2007 Tom "spot" Callaway 2:0-0.7.20070116 +- bump to latest version for all active dists + +* Wed Jan 3 2007 Tom "spot" Callaway 1:0-0.6.20070102 +- bump to latest version (note that upstream fixed their date mistake) + +* Wed Nov 1 2006 Tom "spot" Callaway 1:0-0.5.20070920 +- add an obsoletes for ntfsprogs-fuse +- make some convenience symlinks + +* Wed Oct 25 2006 Tom "spot" Callaway 1:0-0.4.20070920 +- add some extra Provides + +* Mon Oct 16 2006 Tom "spot" Callaway 1:0-0.3.20070920 +- add explicit Requires on fuse + +* Mon Oct 16 2006 Tom "spot" Callaway 1:0-0.2.20070920 +- fixed versioning (bumped epoch, since it now shows as older) +- change sbin symlink to actual copy to be safe + +* Sun Oct 15 2006 Tom "spot" Callaway 0.1.20070920-1 +- Initial package for Fedora Extras diff --git a/libntfs-3g/unix_io.c b/libntfs-3g/unix_io.c index 64b41d3e..c88e8f82 100644 --- a/libntfs-3g/unix_io.c +++ b/libntfs-3g/unix_io.c @@ -53,6 +53,9 @@ #ifdef HAVE_LINUX_FD_H #include #endif +#ifdef HAVE_LINUX_FS_H +#include +#endif #include "types.h" #include "mst.h" @@ -142,6 +145,21 @@ static int ntfs_device_unix_io_open(struct ntfs_device *dev, int flags) err = errno; goto err_out; } +#ifdef HAVE_LINUX_FS_H + /* Check whether the device was forced read-only */ + if (NDevBlock(dev) && ((flags & O_RDWR) == O_RDWR)) { + int r; + int state; + + r = ioctl(DEV_FD(dev), BLKROGET, &state); + if (!r && state) { + err = EROFS; + if (close(DEV_FD(dev))) + err = errno; + goto err_out; + } + } +#endif if ((flags & O_RDWR) != O_RDWR) NDevSetReadOnly(dev); diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 71eceeb4..c301dae2 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -518,99 +518,36 @@ static void set_fuse_error(int *err) } #if 0 && (defined(__APPLE__) || defined(__DARWIN__)) /* Unfinished. */ -static int ntfs_macfuse_getxtimes(const char *org_path, - struct timespec *bkuptime, struct timespec *crtime) + +static void ntfs_macfuse_getxtimes(fuse_req_t req, fuse_ino_t ino, + struct fuse_file_info *fi __attribute__((unused))) { int res = 0; ntfs_inode *ni; - char *path = NULL; ntfschar *stream_name; int stream_name_len; + struct timespec bkuptime; + struct timespec crtime; - stream_name_len = ntfs_fuse_parse_path(org_path, &path, &stream_name); - if (stream_name_len < 0) - return stream_name_len; - memset(bkuptime, 0, sizeof(struct timespec)); - memset(crtime, 0, sizeof(struct timespec)); - ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); + memset(&bkuptime, 0, sizeof(struct timespec)); + memset(&crtime, 0, sizeof(struct timespec)); + ni = ntfs_inode_open(ctx->vol, INODE(ino)); if (!ni) { res = -errno; - goto exit; + } else { + /* We have no backup timestamp in NTFS. */ + crtime = ntfs2timespec(ni->creation_time); + if (ntfs_inode_close(ni)) + set_fuse_error(&res); } - - /* We have no backup timestamp in NTFS. */ - crtime->tv_sec = ni->creation_time; -exit: - if (ntfs_inode_close(ni)) - set_fuse_error(&res); - free(path); if (stream_name_len) free(stream_name); - return res; -} - -int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv) -{ - ntfs_inode *ni; - int res = 0; - - if (ntfs_fuse_is_named_data_stream(path)) - return -EINVAL; /* n/a for named data streams. */ - ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); - if (!ni) - return -errno; - - if (tv) { - ni->creation_time = tv->tv_sec; - ntfs_fuse_update_times(ni, NTFS_UPDATE_CTIME); - } - - if (ntfs_inode_close(ni)) - set_fuse_error(&res); - return res; -} - -int ntfs_macfuse_setbkuptime(const char *path, const struct timespec *tv) -{ - ntfs_inode *ni; - int res = 0; - - if (ntfs_fuse_is_named_data_stream(path)) - return -EINVAL; /* n/a for named data streams. */ - ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); - if (!ni) - return -errno; - - /* - * Only pretending to set backup time successfully to please the APIs of - * Mac OS X. In reality, NTFS has no backup time. - */ - - if (ntfs_inode_close(ni)) - set_fuse_error(&res); - return res; + if (res < 0) + fuse_reply_err(req, -res); + else + fuse_reply_xtimes(req, &bkuptime, &crtime); } -int ntfs_macfuse_setchgtime(const char *path, const struct timespec *tv) -{ - ntfs_inode *ni; - int res = 0; - - if (ntfs_fuse_is_named_data_stream(path)) - return -EINVAL; /* n/a for named data streams. */ - ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); - if (!ni) - return -errno; - - if (tv) { - ni->last_mft_change_time = tv->tv_sec; - ntfs_fuse_update_times(ni, 0); - } - - if (ntfs_inode_close(ni)) - set_fuse_error(&res); - return res; -} #endif /* defined(__APPLE__) || defined(__DARWIN__) */ static void ntfs_init(void *userdata __attribute__((unused)), @@ -2195,6 +2132,277 @@ static void ntfs_fuse_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr, fuse_reply_attr(req, &stbuf, ATTR_TIMEOUT); } +#if 0 && (defined(__APPLE__) || defined(__DARWIN__)) /* Unfinished. */ + +#if defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) + + /* + * utimens_x (MacOsX) + * + * This is much similar to ntfs_fuse_utimens() + */ + +static int ntfs_fuse_utimens_x(struct SECURITY_CONTEXT *scx, fuse_ino_t ino, + struct setattr_x *stin, struct stat *stbuf, int to_set) +{ + ntfs_inode *ni; + int res = 0; + + ni = ntfs_inode_open(ctx->vol, INODE(ino)); + if (!ni) + return -errno; + + /* no check or update if both UTIME_OMIT */ + if (to_set & (FUSE_SET_ATTR_ATIME + + FUSE_SET_ATTR_MTIME + + FUSE_SET_ATTR_BKUPTIME + + FUSE_SET_ATTR_CHGTIME + + FUSE_SET_ATTR_CRTIME)) { +#if !KERNELPERMS | (POSIXACLS & !KERNELACLS) + if (ntfs_allowed_as_owner(scx, ni) + || ((to_set & FUSE_SET_ATTR_ATIME_NOW) + && (to_set & FUSE_SET_ATTR_MTIME_NOW) + && ntfs_allowed_access(scx, ni, S_IWRITE))) { +#endif + ntfs_time_update_flags mask = 0; + + if (to_set & FUSE_SET_ATTR_ATIME_NOW) + mask |= NTFS_UPDATE_ATIME; + else + if (to_set & FUSE_SET_ATTR_ATIME) + ni->last_access_time + = timespec2ntfs(stin->acctime); + if (to_set & FUSE_SET_ATTR_MTIME_NOW) + mask |= NTFS_UPDATE_MTIME; + else + if (to_set & FUSE_SET_ATTR_MTIME) + ni->last_data_change_time + = timespec2ntfs(stin->modtime); + if (to_set & FUSE_SET_ATTR_CRTIME) + ni->creation_time + = timespec2ntfs(stin->crtime); + if (to_set & FUSE_SET_ATTR_BKUPTIME) { + /* does not exist */ + } + if (to_set & FUSE_SET_ATTR_CHGTIME) { + ni->last_mft_change_time + = timespec2ntfs(stin->chgtime); + } else + mask |= FUSE_SET_ATTR_CTIME; + ntfs_inode_update_times(ni, mask); +#if !KERNELPERMS | (POSIXACLS & !KERNELACLS) + } else + res = -errno; +#endif + } + if (!res) + res = ntfs_fuse_getstat(scx, ni, stbuf); + if (ntfs_inode_close(ni)) + set_fuse_error(&res); + return res; +} + +#else /* defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) */ + + /* + * utime_x (MacOsX) + * + * This is somewhat similar to ntfs_fuse_utime() + * + * TODO : check whether there is any need for this function + * HAVE_UTIMENSAT may be always defined on MacOsX + */ + +static int ntfs_fuse_utime_x(struct SECURITY_CONTEXT *scx, fuse_ino_t ino, + struct setattr_x *stin, struct stat *stbuf) +{ + ntfs_inode *ni; + int res = 0; + ntfs_time_update_flags mask = 0; +#if !KERNELPERMS | (POSIXACLS & !KERNELACLS) + BOOL ownerok; + BOOL writeok; +#endif + + ni = ntfs_inode_open(ctx->vol, INODE(ino)); + if (!ni) + return -errno; + +#if !KERNELPERMS | (POSIXACLS & !KERNELACLS) + ownerok = ntfs_allowed_as_owner(scx, ni); + if (stin) { + /* + * fuse never calls with a NULL buf and we do not + * know whether the specific condition can be applied + * So we have to accept updating by a non-owner having + * write access. + */ + writeok = !ownerok + && (stin->st_atime == stin->st_mtime) + && ntfs_allowed_access(scx, ni, S_IWRITE); + /* Must be owner */ + if (!ownerok && !writeok) + res = (stin->acctime.tv_sec == stin->modtime.tv_sec + ? -EACCES : -EPERM); + else { + if (to_set & FUSE_SET_ATTR_ATIME) + ni->last_access_time + = timespec2ntfs(stin->acctime); + if (to_set & FUSE_SET_ATTR_CTIME) + ni->last_data_change_time + = timespec2ntfs(stin->modtime); + if (to_set & FUSE_SET_ATTR_CHGTIME) + ni->last_mft_change_time + = timespec2ntfs(stin->chgtime); + else + flags |= NTFS_UPDATE_CTIME; + if (to_set & FUSE_SET_ATTR_CRTIME) + ni->creation_time + = timespec2ntfs(stin->crtime); + ntfs_fuse_update_times(ni, mask); + } + } else { + /* Must be owner or have write access */ + writeok = !ownerok + && ntfs_allowed_access(scx, ni, S_IWRITE); + if (!ownerok && !writeok) + res = -EACCES; + else + ntfs_inode_update_times(ni, NTFS_UPDATE_AMCTIME); + } +#else + if (stin) { + if (to_set & FUSE_SET_ATTR_ATIME) + ni->last_access_time + = timespec2ntfs(stin->acctime); + if (to_set & FUSE_SET_ATTR_CTIME) + ni->last_data_change_time + = timespec2ntfs(stin->modtime); + if (to_set & FUSE_SET_ATTR_CHGTIME) + ni->last_mft_change_time + = timespec2ntfs(stin->chgtime); + else + flags |= NTFS_UPDATE_CTIME; + if (to_set & FUSE_SET_ATTR_CRTIME) + ni->creation_time + = timespec2ntfs(stin->crtime); + ntfs_fuse_update_times(ni, mask); + } else + ntfs_inode_update_times(ni, NTFS_UPDATE_AMCTIME); +#endif + + res = ntfs_fuse_getstat(scx, ni, stbuf); + if (ntfs_inode_close(ni)) + set_fuse_error(&res); + return res; +} + +#endif /* defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) */ + + /* + * setattr_x (MacOsX) + * + * This is much similar to ntfs_fuse_setattr() + * + * TODO : check whether ntfs_fuse_setattr() is needed when + * ntfs_fuse_setattr_x() is defined + */ + +static void ntfs_macfuse_setattr_x(fuse_req_t req, fuse_ino_t ino, + struct setattr_x *attr, int to_set, + struct fuse_file_info *fi __attribute__((unused))) +{ + struct stat stbuf; + ntfs_inode *ni; + int res; + struct SECURITY_CONTEXT security; + + res = 0; + ntfs_fuse_fill_security_context(req, &security); + /* no flags */ + if (!(to_set + & (FUSE_SET_ATTR_MODE + | FUSE_SET_ATTR_UID | FUSE_SET_ATTR_GID + | FUSE_SET_ATTR_SIZE + | FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME + | FUSE_SET_ATTR_BKUPTIME + | FUSE_SET_ATTR_CHGTIME + | FUSE_SET_ATTR_CRTIME))) { + ni = ntfs_inode_open(ctx->vol, INODE(ino)); + if (!ni) + res = -errno; + else { + res = ntfs_fuse_getstat(&security, ni, &stbuf); + if (ntfs_inode_close(ni)) + set_fuse_error(&res); + } + } + /* some set of uid/gid/mode */ + if (to_set + & (FUSE_SET_ATTR_MODE + | FUSE_SET_ATTR_UID | FUSE_SET_ATTR_GID)) { + switch (to_set + & (FUSE_SET_ATTR_MODE + | FUSE_SET_ATTR_UID | FUSE_SET_ATTR_GID)) { + case FUSE_SET_ATTR_MODE : + res = ntfs_fuse_chmod(&security, ino, + attr->st_mode & 07777, &stbuf); + break; + case FUSE_SET_ATTR_UID : + res = ntfs_fuse_chown(&security, ino, attr->st_uid, + (gid_t)-1, &stbuf); + break; + case FUSE_SET_ATTR_GID : + res = ntfs_fuse_chown(&security, ino, (uid_t)-1, + attr->st_gid, &stbuf); + break; + case FUSE_SET_ATTR_UID + FUSE_SET_ATTR_GID : + res = ntfs_fuse_chown(&security, ino, attr->st_uid, + attr->st_gid, &stbuf); + break; + case FUSE_SET_ATTR_UID + FUSE_SET_ATTR_MODE: + res = ntfs_fuse_chownmod(&security, ino, attr->st_uid, + (gid_t)-1,attr->st_mode, + &stbuf); + break; + case FUSE_SET_ATTR_GID + FUSE_SET_ATTR_MODE: + res = ntfs_fuse_chownmod(&security, ino, (uid_t)-1, + attr->st_gid,attr->st_mode, + &stbuf); + break; + case FUSE_SET_ATTR_UID + FUSE_SET_ATTR_GID + FUSE_SET_ATTR_MODE: + res = ntfs_fuse_chownmod(&security, ino, attr->st_uid, + attr->st_gid,attr->st_mode, &stbuf); + break; + default : + break; + } + } + /* size */ + if (!res && (to_set & FUSE_SET_ATTR_SIZE)) { + res = ntfs_fuse_trunc(&security, ino, attr->st_size, + !fi, &stbuf); + } + /* some set of times */ + if (!res && (to_set & (FUSE_SET_ATTR_ATIME + + FUSE_SET_ATTR_MTIME + + FUSE_SET_ATTR_BKUPTIME + + FUSE_SET_ATTR_CHGTIME + + FUSE_SET_ATTR_CRTIME))) { +#if defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) + res = ntfs_fuse_utimens_x(&security, ino, attr, &stbuf, to_set); +#else /* defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) */ + res = ntfs_fuse_utime_x(&security, ino, attr, &stbuf); +#endif /* defined(HAVE_UTIMENSAT) & defined(FUSE_SET_ATTR_ATIME_NOW) */ + } + if (res) + fuse_reply_err(req, -res); + else + fuse_reply_attr(req, &stbuf, ATTR_TIMEOUT); +} + +#endif /* defined(__APPLE__) || defined(__DARWIN__) */ + #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) static void ntfs_fuse_access(fuse_req_t req, fuse_ino_t ino, int mask) @@ -4030,9 +4238,7 @@ static struct fuse_lowlevel_ops ntfs_3g_ops = { #if 0 && (defined(__APPLE__) || defined(__DARWIN__)) /* Unfinished. */ /* MacFUSE extensions. */ .getxtimes = ntfs_macfuse_getxtimes, - .setcrtime = ntfs_macfuse_setcrtime, - .setbkuptime = ntfs_macfuse_setbkuptime, - .setchgtime = ntfs_macfuse_setchgtime, + .setattr_x = ntfs_macfuse_setattr_x, #endif /* defined(__APPLE__) || defined(__DARWIN__) */ .init = ntfs_init }; diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index b224e188..863d57fe 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -595,7 +595,7 @@ static int ntfs_macfuse_getxtimes(const char *org_path, } /* We have no backup timestamp in NTFS. */ - crtime->tv_sec = sle64_to_cpu(ni->creation_time); + *crtime = ntfs2timespec(ni->creation_time); exit: if (ntfs_inode_close(ni)) set_fuse_error(&res); @@ -605,7 +605,7 @@ static int ntfs_macfuse_getxtimes(const char *org_path, return res; } -int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv) +static int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv) { ntfs_inode *ni; int res = 0; @@ -617,7 +617,7 @@ int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv) return -errno; if (tv) { - ni->creation_time = cpu_to_sle64(tv->tv_sec); + ni->creation_time = timespec2ntfs(*tv); ntfs_fuse_update_times(ni, NTFS_UPDATE_CTIME); } @@ -626,7 +626,7 @@ int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv) return res; } -int ntfs_macfuse_setbkuptime(const char *path, const struct timespec *tv) +static int ntfs_macfuse_setbkuptime(const char *path, const struct timespec *tv) { ntfs_inode *ni; int res = 0; @@ -647,7 +647,7 @@ int ntfs_macfuse_setbkuptime(const char *path, const struct timespec *tv) return res; } -int ntfs_macfuse_setchgtime(const char *path, const struct timespec *tv) +static int ntfs_macfuse_setchgtime(const char *path, const struct timespec *tv) { ntfs_inode *ni; int res = 0; @@ -659,7 +659,7 @@ int ntfs_macfuse_setchgtime(const char *path, const struct timespec *tv) return -errno; if (tv) { - ni->last_mft_change_time = cpu_to_sle64(tv->tv_sec); + ni->last_mft_change_time = timespec2ntfs(*tv); ntfs_fuse_update_times(ni, 0); }