~psusi/ubuntu/utopic/udisks2/fix-standby

« back to all changes in this revision

Viewing changes to .pc/mount_in_media.patch/src/udiskslinuxfilesystem.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Martin Pitt, Colin Watson, Andreas Henriksson
  • Date: 2014-01-14 10:04:52 UTC
  • mfrom: (14.2.3 sid)
  • Revision ID: package-import@ubuntu.com-20140114100452-hpj6k2wt5gtml2xb
Tags: 2.1.2-1
[ Martin Pitt ]
* New upstream release:
  - Add exfat support (Closes: #720695)
  - Fix crash when waiting for loop device (LP: #1128275)
  - Use dosfstools instead of mtools
  - Add polkit authorization variables for removable media
  - Hide more rescue partitions
* Drop dosfslabel.patch, fixed upstream.
* Add Recommends: gdisk, as we need it for manipulating GPT partition tables
  through sgdisk. (LP: #1080745)
* Bump Standards-Version to 3.9.5. No changes necessary.

[ Colin Watson ]
* Use dh-autoreconf to update libtool macros for new ports.
  (Closes: #732287)

[ Andreas Henriksson ]
* Add parted dependency. (Closes: #720491)

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
static const gchar *udf_allow_uid_self[] = { "uid=", NULL };
303
303
static const gchar *udf_allow_gid_self[] = { "gid=", NULL };
304
304
 
 
305
/* ---------------------- exfat -------------------- */
 
306
 
 
307
static const gchar *exfat_defaults[] = { "uid=", "gid=", "iocharset=utf8", "namecase=0", "errors=remount-ro", "umask=0077", NULL };
 
308
static const gchar *exfat_allow[] = { "dmask=", "errors=", "fmask=", "iocharset=", "namecase=", "umask=", NULL };
 
309
static const gchar *exfat_allow_uid_self[] = { "uid=", NULL };
 
310
static const gchar *exfat_allow_gid_self[] = { "gid=", NULL };
 
311
 
305
312
/* ------------------------------------------------ */
306
313
/* TODO: support context= */
307
314
 
313
320
    { "ntfs", ntfs_defaults, ntfs_allow, ntfs_allow_uid_self, ntfs_allow_gid_self },
314
321
    { "iso9660", iso9660_defaults, iso9660_allow, iso9660_allow_uid_self, iso9660_allow_gid_self },
315
322
    { "udf", udf_defaults, udf_allow, udf_allow_uid_self, udf_allow_gid_self },
 
323
    { "exfat", exfat_defaults, exfat_allow, exfat_allow_uid_self, exfat_allow_gid_self },
316
324
  };
317
325
 
318
326
/* ------------------------------------------------ */
1819
1827
  UDisksBaseJob *job;
1820
1828
  const gchar *action_id;
1821
1829
  const gchar *message;
 
1830
  gchar *real_label = NULL;
1822
1831
  uid_t caller_uid;
1823
1832
  gid_t caller_gid;
1824
1833
  pid_t caller_pid;
1893
1902
      goto out;
1894
1903
    }
1895
1904
 
1896
 
  /* VFAT does not allow some characters; as mlabel hangs with interactive
1897
 
   * question in this case, check in advance */
 
1905
  /* VFAT does not allow some characters; as dosfslabel does not enforce this,
 
1906
   * check in advance; also, VFAT only knows upper-case characters, dosfslabel
 
1907
   * enforces this */
1898
1908
  if (g_strcmp0 (probed_fs_type, "vfat") == 0)
1899
1909
    {
1900
1910
      const gchar *forbidden = "\"*/:<>?\\|";
1911
1921
               goto out;
1912
1922
            }
1913
1923
        }
 
1924
 
 
1925
      /* we need to remember that we make a copy, so assign it to a new
 
1926
       * variable, too */
 
1927
      real_label = g_ascii_strup (label, -1);
 
1928
      label = real_label;
1914
1929
    }
1915
1930
 
1916
1931
  /* Fail if the device is already mounted and the tools/drivers doesn't
1988
2003
                    invocation);
1989
2004
 
1990
2005
 out:
 
2006
  /* for some FSes we need to copy and modify label; free our copy */
 
2007
  g_free (real_label);
1991
2008
  g_free (command);
1992
2009
  g_clear_object (&object);
1993
2010
  return TRUE; /* returning TRUE means that we handled the method invocation */