All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to use Udev to restrict USB access only to particular set
Date: Mon, 21 Feb 2011 15:57:35 +0000	[thread overview]
Message-ID: <20110221155735.GB785@kroah.com> (raw)
In-Reply-To: <AANLkTinqeg=o_bmdR0CKuVmP14x71kkrE3=zdaxx2AE=@mail.gmail.com>


A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top


On Mon, Feb 21, 2011 at 11:27:14AM +0200, Vilius Benetis wrote:
> Hi,
> 
> restrict - means that Linux users (non-root, to simplify the task)
> could be able to access only a particular predefined set of USB
> devices.
> 
> Devices:
>   Approved USB A (configured in the system), SN: XXX
>   Not approved USB B (not defined anywhere): SN: YYY
> 
> Scenario A:
>    USB A is plugged to the system, USB is allowed to be mounted
> (automatically, or manually) for the users.
> 
> Scenario B:
>    USB B is plugged to the system, USB is not allowed to be mounted
> (automatically, or manually) for the users.
> 
> Any ideas how to achieve this?

Yes, add a udev rule to not "enable" any usb device that is a mass
storage device that does not fall in your list of "valid" devices.
There is a single sysfs file to write to which would prevent any access
to that device, use that.

Hope this helps,

greg k-h

  parent reply	other threads:[~2011-02-21 15:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21  9:01 How to use Udev to restrict USB access only to particular set of USB sticks? Vilius Benetis
2011-02-21  9:05 ` How to use Udev to restrict USB access only to particular set of Andrey Borzenkov
2011-02-21  9:27 ` Vilius Benetis
2011-02-21 15:57 ` Greg KH [this message]
2011-02-22 13:46 ` Vilius Benetis
2011-02-22 13:54 ` How to use Udev to restrict USB access only to particular set Greg KH
2011-02-22 14:01 ` How to use Udev to restrict USB access only to particular set of Vilius Benetis
2011-02-22 14:28 ` Vilius Benetis
2011-02-22 14:38 ` How to use Udev to restrict USB access only to particular set Greg KH
2011-02-24 13:52 ` How to use Udev to restrict USB access only to particular set of Vilius Benetis
2011-02-24 15:46 ` Greg KH
2011-02-24 16:36 ` Vilius Benetis
2011-02-24 17:01 ` Greg KH
2011-02-24 17:36 ` Vilius Benetis
2011-03-01 14:32 ` Vilius Benetis
2011-03-02  7:06 ` How to use Udev to restrict USB access only to particular set Bryan Kadzban
2011-03-02  8:33 ` How to use Udev to restrict USB access only to particular set of Vilius Benetis
2011-03-03  4:01 ` How to use Udev to restrict USB access only to particular set Bryan Kadzban

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=20110221155735.GB785@kroah.com \
    --to=greg@kroah.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.