Bug 36361 - UDisks: Add "ntfs-3g" to the list of well_known_filesystems in src/device.c
Summary: UDisks: Add "ntfs-3g" to the list of well_known_filesystems in src/device.c
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium minor
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL: http://www.tuxera.com/community/ntfs-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 07:24 UTC by Samuli Suominen
Modified: 2012-10-02 14:59 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen 2011-04-18 07:24:32 UTC
After applying this:

http://cgit.freedesktop.org/udisks/commit/?id=c933a929f07421ec747cebb24d5e620fc2b97037

Upstream commit for "Bug 32232 – CVE-2010-4661: Arbitrary kernel module load"

Filesystems such as "ntfs-3g" which works through FUSE no longer "work out of box" because it's not listed in the well_known_filesystems, where as plain "ntfs" is.

See short downstream discussion:

https://bugs.gentoo.org/show_bug.cgi?id=353343#c8

(Up to Comment #10 of same bug)

So why not add it to the well_known_filesystems, or are distributions expected to set "ntfs-3g" in the package which owns /etc/filesystems ? 
The file is owned by the "baselayout" package in Gentoo Linux, I don't know about others.
Comment 1 Benjamin Robin 2011-05-03 12:24:05 UTC
There is just a missing comma at line ~ 5905 (device.c)

static const gchar *well_known_filesystems[] =
{
"btrfs",
"ext2",
"ext3",
"ext4",
"udf",
"iso9660",
"xfs",
"jfs",
"nilfs",
"reiserfs",
"reiser4",
"msdos",
"umsdos",
"vfat",
"exfat" <---- Missing comma
"ntfs",
NULL,
};
Comment 2 David Zeuthen (not reading bugmail) 2011-05-09 09:04:14 UTC
Fixed

 http://cgit.freedesktop.org/udisks/commit/?id=75b6187f77ca95ce435dd78f2ecb244af55e7faf

Sorry for the lag.
Comment 3 Ozan Çağlayan 2011-05-09 23:49:25 UTC
You fixed the comment#2 but does that really fix the real bug? With the comma fix applied I can't still mount my ntfs partitions unless I add ntfs-3g to the well known filesystem list.
Comment 4 Samuli Suominen 2011-06-04 08:25:03 UTC
(In reply to comment #3)
> You fixed the comment#2 but does that really fix the real bug? With the comma
> fix applied I can't still mount my ntfs partitions unless I add ntfs-3g to the
> well known filesystem list.

Indeed, see:

http://bugs.gentoo.org/show_bug.cgi?id=353343#c16

Reopening since this does fix the missing comma in fs list, but doesn't fix the original problem of missing entry for "ntfs-3g" by default
Comment 5 David Zeuthen (not reading bugmail) 2012-09-28 17:38:32 UTC
Development focus has been on udisks 2.0 for a while which is a completely different codebase so closing WORKSFORME. Please reopen if it doesn't work for you in udisks 2.0. Thanks.
Comment 6 Samuli Suominen 2012-09-29 12:01:07 UTC
Yeah, I'm still applying this in Gentoo's package for ntfs-3g:

$ cat files/udisks-2.x-ntfs-3g.patch 
--- src/udiskslinuxfilesystem.c
+++ src/udiskslinuxfilesystem.c
@@ -164,6 +164,7 @@
   "vfat",
   "exfat",
   "ntfs",
+  "ntfs-3g",
   NULL,
 };

But I'm not reopening this bug because I think this patch might be redudant by the udev rules file we install:

$ cat files/99-ntfs3g.rules 
ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs-3g"

I'll report back if I find the patch still required. Thanks for now.
Comment 7 David Zeuthen (not reading bugmail) 2012-10-02 14:59:16 UTC
(In reply to comment #6)
> $ cat files/99-ntfs3g.rules 
> ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs-3g"

Ugh, please dont do this, it is completely wrong. Here's why: ID_FS_TYPE is intended for the filesystem _type_ and ntfs-3g is not a filesystem type - it's an identifier for a particular driver for the NTFS filesystem. By subtly changing ID_FS_TYPE this way you are breaking code (such as GNOME Disks) that special cases devices with a NTFS filesystem on it. Please don't do things like this.

But thanks for the heads-up - until you stop doing things like this, I will not look at Gentoo bugs involving NTFS - less work for me, I guess ;-)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.