Commit 79849c60 authored by Dimitri Puzin's avatar Dimitri Puzin

vanilla upstream

parent 091f0621
......@@ -145,10 +145,10 @@ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.17])
AC_SUBST(LIBATASMART_CFLAGS)
AC_SUBST(LIBATASMART_LIBS)
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd >= 209], [have_libsystemd_login=yes],
[PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 44 libsystemd-daemon],
[have_libsystemd_login=yes],
[have_libsystemd_login=no])])
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN,
[libsystemd-login >= 44 libsystemd-daemon],
have_libsystemd_login=yes,
have_libsystemd_login=no)
AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, test x$have_libsystemd_login = xyes)
if test "x$have_libsystemd_login" = "xyes"; then
AC_DEFINE([HAVE_LIBSYSTEMD_LOGIN], 1, [Define to 1 if libsystemd-login is available])
......
This diff is collapsed.
......@@ -816,10 +816,12 @@ add_acl (const gchar *path,
acl_calc_mask (&acl) == -1 ||
acl_set_file (path, ACL_TYPE_ACCESS, acl) == -1)
{
udisks_warning(
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
"Adding read ACL for uid %d to `%s' failed: %m",
(gint) uid, path);
chown(path, uid, -1);
goto out;
}
ret = TRUE;
......@@ -889,26 +891,26 @@ calculate_mount_point (UDisksDaemon *daemon,
}
/* If we know the user-name and it doesn't have any '/' character in
* it, mount in /media/$USER
* it, mount in /run/media/$USER
*/
if (!fs_shared && (user_name != NULL && strstr (user_name, "/") == NULL))
{
mount_dir = g_strdup_printf ("/media/%s", user_name);
mount_dir = g_strdup_printf ("/run/media/%s", user_name);
if (!g_file_test (mount_dir, G_FILE_TEST_EXISTS))
{
/* First ensure that /media exists */
if (!g_file_test ("/media", G_FILE_TEST_EXISTS))
/* First ensure that /run/media exists */
if (!g_file_test ("/run/media", G_FILE_TEST_EXISTS))
{
if (g_mkdir ("/media", 0755) != 0)
if (g_mkdir ("/run/media", 0755) != 0)
{
g_set_error (error,
UDISKS_ERROR,
UDISKS_ERROR_FAILED,
"Error creating directory /media: %m");
"Error creating directory /run/media: %m");
goto out;
}
}
/* Then create the per-user /media/$USER */
/* Then create the per-user /run/media/$USER */
if (g_mkdir (mount_dir, 0700) != 0)
{
g_set_error (error,
......
......@@ -2235,10 +2235,7 @@ udisks_state_get (UDisksState *state,
* - could also mmap the file
*/
if (strcmp (key, "mounted-fs") == 0)
path = g_strdup_printf ("/var/lib/udisks2/%s", key);
else
path = g_strdup_printf ("/run/udisks2/%s", key);
path = g_strdup_printf ("/run/udisks2/%s", key);
/* see if it's already in the cache */
ret = g_hash_table_lookup (state->cache, path);
......@@ -2304,10 +2301,7 @@ udisks_state_set (UDisksState *state,
data = g_malloc (size);
g_variant_store (normalized, data);
if (strcmp (key, "mounted-fs") == 0)
path = g_strdup_printf ("/var/lib/udisks2/%s", key);
else
path = g_strdup_printf ("/run/udisks2/%s", key);
path = g_strdup_printf ("/run/udisks2/%s", key);
g_hash_table_insert (state->cache, g_strdup (path), g_variant_ref (value));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment