Bug 1052747 - Devices other than HID do not get correct permissions
Summary: Devices other than HID do not get correct permissions
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-14 00:45 UTC by Frederic Grelot
Modified: 2015-06-29 14:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 14:26:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journalctl while attaching device to seat1 while session is open on both seats (4.96 KB, text/plain)
2014-01-14 00:45 UTC, Frederic Grelot
no flags Details
journalctl while re-attaching device to seat0 while session is open on both seats (2.65 KB, text/plain)
2014-01-14 00:45 UTC, Frederic Grelot
no flags Details

Description Frederic Grelot 2014-01-14 00:45:05 UTC
Created attachment 849687 [details]
journalctl while attaching device to seat1 while session is open on both seats

Description of problem:
I use systemd/logind in a multiseat environment.
I created the second seat using the following commands :
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:15.0/0000:05:00.0/graphics/fb1
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:15.0/0000:05:00.0/drm/card1
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:12.0/usb4/4-5
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:13.2/usb2/2-1

The last two lines affect 2 USB husbs to this seat, where the user plugs keyboard, mouse, a small USB sound card and USB keys.

When I attach them to the 2nd seat, they effectively disappear from the first seat (in particular, I loose the sound card). If I re-attach them, they re-appear. Inbetween, the devices never appear for the second seat.
The same applies to the USB key.
After lots of trying, I think there is definitely a permission problem with devices other than HID (mouse/keyboard).

Version-Release number of selected component (if applicable):
systemd-208-9.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Setup a 2-seat environment
2. Affect a USB hub to the non-primary seat
3. Plug anything that is not a keyboard or a mouse to that Hub

Actual results:
The device does not appear in the session

Expected results:
The device should appear

Additional info:
With Fedora 19, I had no such problem : the USB key where correctly mounted, and the sound worked well on the secondary seat.
By the way, I nailed down another bug that involves permissions on the secondary seat :
https://bugzilla.redhat.com/show_bug.cgi?id=1008916
There may be a common cause to those 2 bugs.

I literally spent days (and nights...) trying to make my configuration work since I upgraded to F20 (everything was fine with F19!), and had lots of bugs related to multi-seat (I opened 4 reports and helped 3 others). It seems to gradually improve, but I would be really happy if anyone could help me on this one, since I feel pretty alone on multi-seat (literally speaking... considering how the 2nd seat works! :-) )

Thanks for everything!

Frederic.

Comment 1 Frederic Grelot 2014-01-14 00:45:39 UTC
Created attachment 849688 [details]
journalctl while re-attaching device to seat0 while session is open on both seats

Comment 2 Frederic Grelot 2014-01-14 01:00:33 UTC
Well, I'm not proud of myself considerring the ugly workaround I just found... (It's the 2nd time I do this...) : "chmod a+rw /dev/snd/*" actually allowed the 2ndary seat to play sound...
(I had to do it a few times though, I don't know why pulseaudio did not catch it at first).
This confirms what I thought about permissions : everything is set up "correctly", but something misses the right permissions...

Comment 3 Zbigniew Jędrzejewski-Szmek 2014-01-15 15:02:19 UTC
Yeah, it seems something is wrong indeed.

You can also use 'setfacl -m user:<user>:rw- /dev/snd/*' (where <user> is your user).

Comment 4 Frederic Grelot 2014-01-15 16:08:00 UTC
Thanks for the help. I have a few questions :
-As I understand, the ACL won't survive a reboot, am I right?
-There is a planned update (https://admin.fedoraproject.org/updates/systemd-208-11.fc20) for Fedora : is there a change that any of the mentionned patch solves the problem (I don't think so, but I may be wrong)
-do you need any other info/test/test case in order to track the bug?
I'm not very keen on playing with home-built versions of systemd, but I will do as much as possible...

Thanks again,                               

Frédéric.

(and if you want any pointers, I opened few other bugs on systemd :-) )

Comment 5 Zbigniew Jędrzejewski-Szmek 2014-01-15 16:28:20 UTC
(In reply to Frederic Grelot from comment #4)
> Thanks for the help. I have a few questions :
> -As I understand, the ACL won't survive a reboot, am I right?
> -There is a planned update
> (https://admin.fedoraproject.org/updates/systemd-208-11.fc20) for Fedora :
> is there a change that any of the mentionned patch solves the problem (I
> don't think so, but I may be wrong)
No, I don't recall anything related.

> -do you need any other info/test/test case in order to track the bug?
> I'm not very keen on playing with home-built versions of systemd, but I will
> do as much as possible...
On one of my machines assigns permissions on /dev/dri/card1 wrong. I think
it'll be the same issue. Let's see if I can reproduce this.

> (and if you want any pointers, I opened few other bugs on systemd :-) )
Bugs, what bugs? There are no bugs, just undocumented features. :)

Comment 6 Frederic Grelot 2014-02-25 17:14:33 UTC
There has been no update on this bug for more than 1 month : did you try to reproduce it?
Do you need anything else for tracking down the problem?
It is quite annoying to manually set the permission, let alone the security impact...

Furthermore, I'm not sure if there is any other side effects...

I updated to systemd-208-14.fc20.x86_64 (from the testing repo), and it did not change anything...

Please tell me if I can help!

Comment 7 Frederic Grelot 2014-02-26 08:50:20 UTC
Hi all, 

I hit another bug with my multiseat setup when updating to kernel 3.13. It might be related, but I posted it in package "kernel", so I just want to tell you here that I opened this bug :
https://bugzilla.redhat.com/show_bug.cgi?id=1070078

As you will see, Xorg/gdm does not detect any screen device for the secondary screen. This might be related to the previous permission issue.
The main problem here is that I did not find any workaround : I am thus forced to stick with kernel 3.12 and prevent further updates...
So I'll be very happy if you can have a look at it and see if there is any relation with this bug!

Thanks in advance, and tell me if I need to do anything to help!

Frédéric.

Comment 8 Fedora End Of Life 2015-05-29 10:29:31 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-06-29 14:26:20 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.