Bug 812972
Summary: | disable auto-mount of devices when USB auto share is enabled and active | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | David Jaša <djasa> | |
Component: | spice-gtk | Assignee: | Default Assignee for SPICE Bugs <rh-spice-bugs> | |
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.3 | CC: | cfergeau, cwei, dblechte, desktop-qa-list, hdegoede, jwu, marcandre.lureau, mclasen, mjenner, mkrcmari, mzhan, rbalakri, tpelka, zpeng | |
Target Milestone: | rc | |||
Target Release: | 6.8 | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 922714 (view as bug list) | Environment: | ||
Last Closed: | 2015-10-22 12:26:46 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 844075, 844076 | |||
Bug Blocks: | 808057, 922714 |
Description
David Jaša
2012-04-16 17:10:00 UTC
I think this is a reasonable request, but I wonder if there is an API to suspend automounting in gnome / hal / udisks (does RHEL-6 have udisks?). I guess David Zeuthen probably knows, adding him to the CC. David? (In reply to comment #3) > I think this is a reasonable request, but I wonder if there is an API to > suspend automounting in gnome / hal / udisks (does RHEL-6 have udisks?). I > guess David Zeuthen probably knows, adding him to the CC. David? RHEL6 has udisks 1.x and the D-Bus API there is http://hal.freedesktop.org/docs/udisks/UDisks.html#UDisks.Inhibit You can also use the udisks(1) command for this (the --inhibit option), see http://hal.freedesktop.org/docs/udisks/udisks.1.html Hope this helps. This should be done in spice-gtk, changing component. HI, (In reply to comment #4) > (In reply to comment #3) > > I think this is a reasonable request, but I wonder if there is an API to > > suspend automounting in gnome / hal / udisks (does RHEL-6 have udisks?). I > > guess David Zeuthen probably knows, adding him to the CC. David? > > RHEL6 has udisks 1.x and the D-Bus API there is > > http://hal.freedesktop.org/docs/udisks/UDisks.html#UDisks.Inhibit > > You can also use the udisks(1) command for this (the --inhibit option), see > > http://hal.freedesktop.org/docs/udisks/udisks.1.html Hmm, this seems to require root rights, and we want to inhibit it from the spice-client process which runs as normal user. Is there a way to just stop automounting for one user? Regards, Hans (In reply to comment #6) > HI, > > (In reply to comment #4) > > (In reply to comment #3) > > > I think this is a reasonable request, but I wonder if there is an API to > > > suspend automounting in gnome / hal / udisks (does RHEL-6 have udisks?). I > > > guess David Zeuthen probably knows, adding him to the CC. David? > > > > RHEL6 has udisks 1.x and the D-Bus API there is > > > > http://hal.freedesktop.org/docs/udisks/UDisks.html#UDisks.Inhibit > > > > You can also use the udisks(1) command for this (the --inhibit option), see > > > > http://hal.freedesktop.org/docs/udisks/udisks.1.html > > Hmm, this seems to require root rights, and we want to inhibit it from the > spice-client process which runs as normal user. Is there a way to just stop > automounting for one user? Not that I can easily think of - if you need this, the best would be to add an inhibitor interface to the automounter (for GNOME 3, it's in the Shell nowadays I think)... which is messy because you'd need all the desktops to implement it. Best is probably to just unmount all the partitions on the device (including tearing down LUKS) if opening fails? Sure, it's not the "right" or "correct" solution but it may be a lot easier and robust than adding inbitors frameworks. [1] : just running the umount(8) command is fine and preferred as it is the most portable solution (works on both RHEL6 and F17/RHEL7) (In reply to comment #7) > > Hmm, this seems to require root rights, and we want to inhibit it from the > > spice-client process which runs as normal user. Is there a way to just stop > > automounting for one user? > > Not that I can easily think of - if you need this, the best would be to add > an inhibitor interface to the automounter (for GNOME 3, it's in the Shell > nowadays I think)... which is messy because you'd need all the desktops to > implement it. > > Best is probably to just unmount all the partitions on the device (including > tearing down LUKS) if opening fails? Sure, it's not the "right" or "correct" > solution but it may be a lot easier and robust than adding inbitors > frameworks. For those reading along here, after much discussions through other channels we've decided to go with the "add an inhibitor interface to the desktop automounter" solution, for the following reasons: 1) udisks inhibit is global (not per seat / session), udisks inhibit requires root rights and udisk2 does not have an inhibit interface, so doing this at the udisks level is not an option 2) The problem we're trying to fix is a race between automount and auto-usbredir, unmounting partitions first is not going to help, since the may get mounted until after the unmount code runs and before the device redir code detach the usb-storage driver. With that said unmounting partitions first is a good idea for the manual usbredir case and I've put it on my to-do list. This is fixed upstream by these 3 commits: http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=633586ba643f474235d1fc0a4656f8e00f2ffcac http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=c64a959722dcec76e7988f505b0e8f051e10aff0 http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=2157ea0bf87989ccc29814aece3fa7f434f25840 In order to do this for 6.4, we not only need spice-gtk support, but we also need to have automount-inhibit support added to gnome-session and nautilus. I've filed 2 new bugs for tracking this, gnome-session bug 844075 and nautilus bug 844076, all 3 bugs need to be fixed for this to be actually fixed, and even then it will only be fixed for spice-gtk running under gnome. taking the bug, since we need an assignee, and I will update spice-gtk gnome-session bug 844075 and nautilus bug 844076 are still in NEW. closing this bug in rhel 6.x. No customer impact, and the solution is already in rhel 7 |