Magellan Linux

Contents of /trunk/pmount/patches/pmount-0.9.13-ntfs-3g.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 206 - (show annotations) (download)
Mon May 21 22:24:41 2007 UTC (16 years, 11 months ago) by niro
File size: 2726 byte(s)
-added new patches

1 diff -ur pmount-0.9.13-orig/src/fs.c pmount-0.9.13/src/fs.c
2 --- pmount-0.9.13-orig/src/fs.c 2006-08-06 19:21:17.000000000 -0400
3 +++ pmount-0.9.13/src/fs.c 2006-08-25 10:56:42.000000000 -0400
4 @@ -22,6 +22,7 @@
5 { "udf", "nosuid,nodev,user", 1, "000", 1 },
6 { "iso9660", "nosuid,nodev,user", 1, NULL, 1 },
7 { "vfat", "nosuid,nodev,user,quiet,shortname=mixed", 1, "077", 1 },
8 + { "ntfs-3g", "silent,nonempty", 1, "077", 1 },
9 { "ntfs", "nosuid,nodev,user", 1, "077", 1 },
10 { "hfsplus", "nosuid,nodev,user", 1, NULL, 0 },
11 { "hfs", "nosuid,nodev,user", 1, NULL, 0 },
12 Only in pmount-0.9.13/src: fs.c.orig
13 Only in pmount-0.9.13/src: fs.c.rej
14 diff -ur pmount-0.9.13-orig/src/pmount.c pmount-0.9.13/src/pmount.c
15 --- pmount-0.9.13-orig/src/pmount.c 2006-08-15 16:47:45.000000000 -0400
16 +++ pmount-0.9.13/src/pmount.c 2006-08-25 10:55:33.000000000 -0400
17 @@ -286,6 +286,12 @@
18 return -1;
19 }
20 snprintf( iocharset_opt, sizeof( iocharset_opt ), ",iocharset=%s", iocharset );
21 + /* for ntfs-3g we will use the locale= option */
22 + if (strcmp (fsname, "ntfs-3g") == 0) {
23 + debug( "filesystem is ntfs-3g. Setting locale to %s\n", setlocale( LC_ALL, "" ));
24 + snprintf( iocharset_opt, sizeof( iocharset_opt ), ",locale=%s", setlocale( LC_ALL, "" ));
25 + }
26 +
27 }
28
29 snprintf( options, sizeof( options ), "%s%s%s%s%s%s%s%s",
30 Only in pmount-0.9.13/src: pmount.c.orig
31 diff -ur pmount-0.9.13-orig/src/policy.c pmount-0.9.13/src/policy.c
32 --- pmount-0.9.13-orig/src/policy.c 2006-08-15 17:00:37.000000000 -0400
33 +++ pmount-0.9.13/src/policy.c 2006-08-25 10:55:33.000000000 -0400
34 @@ -242,7 +242,7 @@
35 return 0;
36 }
37
38 - if( !S_ISBLK( st.st_mode ) ) {
39 + if( !S_ISBLK( st.st_mode ) && (strcmp (device, "/dev/fuse") != 0) ) {
40 fprintf( stderr, _("Error: %s is not a block device\n"), device );
41 return 0;
42 }
43 diff -ur pmount-0.9.13-orig/src/pumount.c pmount-0.9.13/src/pumount.c
44 --- pmount-0.9.13-orig/src/pumount.c 2005-12-16 05:43:40.000000000 -0500
45 +++ pmount-0.9.13/src/pumount.c 2006-08-25 10:55:33.000000000 -0400
46 @@ -1,3 +1,4 @@
47 +
48 /**
49 * pumount.c - policy wrapper around 'umount' to allow mounting removable
50 * devices for normal users
51 @@ -76,10 +77,13 @@
52 }
53
54 /* mount point must be below MEDIADIR */
55 - if( strncmp( mntpt, MEDIADIR, sizeof( MEDIADIR )-1 ) ) {
56 + /* don't check for fuse cause the mount point could be an other one */
57 + if (strcmp (device, "/dev/fuse") != 0) {
58 + if( strncmp( mntpt, MEDIADIR, sizeof( MEDIADIR )-1 ) ) {
59 fprintf( stderr, _("Error: mount point %s is not below %s\n"), mntpt,
60 MEDIADIR );
61 return -1;
62 + }
63 }
64
65 debug( "policy check passed\n" );