Avoid using $XDG_RUNTIME_DIR/media for now

This commit is contained in:
David Zeuthen 2012-02-22 10:38:02 -05:00
parent 30c554d2e0
commit 3289adf064
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From ffbee04d8f48ec153dba45b5392882413e3550ca Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Wed, 22 Feb 2012 10:34:16 -0500
Subject: [PATCH] Avoid using $XDG_RUNTIME_DIR/media for now
Needs a bit more thought on the security side.
Signed-off-by: David Zeuthen <davidz@redhat.com>
---
src/udiskslinuxfilesystem.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
index 9b2469a..4852357 100644
--- a/src/udiskslinuxfilesystem.c
+++ b/src/udiskslinuxfilesystem.c
@@ -652,6 +652,7 @@ calculate_mount_point (UDisksBlock *block,
uuid = udisks_block_get_id_uuid (block);
}
+#if 0 /* $XDG_RUNTIME_DIR/media turned off for now, may have security issues */
/* try mounting in user's $XDG_RUNTIME_DIR/media first - have to create it on demand... */
if (user_name != NULL)
{
@@ -683,6 +684,7 @@ calculate_mount_point (UDisksBlock *block,
}
g_free (s);
}
+#endif
/* fall back to mounting in /media */
if (mount_dir == NULL)
mount_dir = g_strdup ("/media");
--
1.7.9.1

View File

@ -8,7 +8,7 @@
Summary: Disk Manager
Name: udisks2
Version: 1.91.0
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/wiki/Software/udisks
@ -50,6 +50,8 @@ Requires: cryptsetup-luks
# for /proc/self/mountinfo, only available in 2.6.26 or higher
Conflicts: kernel < 2.6.26
Patch0: 0001-Avoid-using-XDG_RUNTIME_DIR-media-for-now.patch
%description
udisks provides a daemon, D-Bus API and command line tools for
managing disks and storage devices. This package is for the udisks 2.x
@ -79,6 +81,7 @@ daemon. This package is for the udisks 2.x series.
%prep
%setup -q -n udisks-%{version}
%patch0 -p1
%build
%configure --enable-gtk-doc
@ -136,6 +139,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# Note: please don't forget the %{?dist} in the changelog. Thanks
%changelog
* Wed Feb 22 2012 David Zeuthen <davidz@redhat.com> - 1.91.0-2%{?dist}
- Avoid using $XDG_RUNTIME_DIR/media for now
* Mon Feb 06 2012 David Zeuthen <davidz@redhat.com> - 1.91.0-1%{?dist}
- Update to release 1.91.0