linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yan Seiner <yan@seiner.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: multi-user, udev, consolkit, oh my
Date: Sun, 16 Nov 2008 16:47:18 +0000	[thread overview]
Message-ID: <49204E96.6030302@seiner.com> (raw)
In-Reply-To: <49203CEA.2030201@seiner.com>

Kay Sievers wrote:
> On Sun, Nov 16, 2008 at 16:31, Yan Seiner <yan@seiner.com> wrote:
>   
>> I'm working on multi-user setups.
>>
>> I'd like to be assign some resources - like a USB hub - to a seat and have
>> hotplug for that hub work only for that seat.
>>
>> Currently, what happens is that a user plugs in a camera, and hal reports
>> the event.  All of the concurrent gnome-volume-manager instances then try to
>> grab that resource, and what results is a mess.
>>
>> consolekit has been suggested as a way to resolve this, but I can't figure
>> out how to use it.
>>     
>
> Yes, ConsoleKit/PolicyKit/HAL should be used as the basic
> infrastructure to properly assign ACL's to devices for specific users.
> ConsoleKit is the only way to track activitty of sessions, which is
> what you need for shared devices, to grant access only to active
> sessions. But I don't think anybody ever really used multi-seat
> setups, so there is likely stuff that needs to be implemented.
>
>   
>> googling around, I've found suggestions for using udev to limit access to
>> usb devices by creating a group that only has access to the usb subsystem.
>>
>> If I want to group some resources and only have those resources on behalf of
>> a specific user, and not any other, is there a way to do that?
>>     
>
> You can assign an owner or group to all devices below a specific USB
> hub. You onlt need to identify the hub reliably.
>
>   

Thanks for the information.  At least I'm on the right track...  I've 
been reading up on dbus and hal, but I can't really find how dbus, 
ConsoleKit, and hal all work together.  It looks like the policies in 
/etc/dbus-1/session.conf might do what I need, but I can't find any 
documentation on what policies are available and how to set them.

The overall idea is that we put up an X session on every available 
screen and ask the user to hit a specific key on the keyboard.  The key 
is different for each X session.  Once we have the keyboard event, we 
can tell which USB hub it came from and we can assign the USB hub it's 
plugged into to that seat.  We can then scan the hub for mouse, audio, 
mass storage, whatever and handle them on behalf of that user.

 From that point on, any event that takes place on that hub only gets 
handled by that user's session.  That's the long-term goal. Right now it 
would be nice just to be able to limit gnome-volume-manager to a single 
hub, even if I have to hard-code the hub in some config file.

I'm new to the whole dbus/hal thing so I would appreciate any pointers 
to docs or discussion that might help me out.

--Yan

      parent reply	other threads:[~2008-11-16 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 15:31 multi-user, udev, consolkit, oh my Yan Seiner
2008-11-16 16:32 ` Kay Sievers
2008-11-16 16:47 ` Yan Seiner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49204E96.6030302@seiner.com \
    --to=yan@seiner.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).