ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Андрей Черепанов" <cas@altlinux.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: [devel] Работа udev-acl
Date: Wed, 30 Nov 2011 16:51:45 +0400
Message-ID: <201111301651.54840.cas@altlinux.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]

Собственно, проблема:
при подключении сканера он не работает под обычным пользователем.
Свежее обсуждение проблемы у коллег из Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/773617

Как я понял, все дружно перешли с прав на группу, ранее прибиваемые гвоздями в 
/etc/udev/rules.d/25-libsane.rules (и ныне оставшееся в /etc/udev/rules.d/40-
hplip.rules, подробности: http://lists.altlinux.org/pipermail/devel/2009-
October/175807.html) на udev-acl

Собственно, поведение для сканеров (кроме HP) задаётся в 

$ grep libsane /lib/udev/rules.d/70-acl.rules
ENV{libsane_matched}=="yes", TAG+="udev-acl"

По логике udev-acl должен выставить права на запись на устройства для 
пользователей, зарегистрированных в /var/run/ConsoleKit/database

Несмотря на то, что локальные пользователи там есть:

[cas@cas ~]$ grep uid /var/run/ConsoleKit/database
uid=500
uid=0

На устройство сканера никаких дополнительных ACL не вешается:

$ getfacl /dev/bus/usb/006/009 | grep -v ^#
getfacl: Removing leading '/' from absolute path names
user::rw-
group::rw-
other::r--

Собственно, мысли две:
1. Не будет ли правильнее для устройств типа сканеров давать через ACL доступ 
на группу scanner, а не на доступных на момент подключения пользователей? Ибо 
юзер может залогиниться после подключения сканера. 

2. Почему не отрабатывает udev-acl? Есть мысли или стоит лезть в код этого 
эльфа?

P.S. Рецепт с прописыванием RUN+="/usr/bin/setfacl..." в /lib/udev/rules.d/70-
acl.rules тоже не срабатывает. Тупо прибивать GROUP="scanner" будет некрасиво, 
так как есть всякие МФУ.

-- 
Андрей Черепанов
ALT Linux
cas@altlinux.ru

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2011-11-30 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 12:51 Андрей Черепанов [this message]
2011-11-30 15:31 ` Андрей Черепанов
2011-11-30 15:49   ` Андрей Черепанов

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=201111301651.54840.cas@altlinux.ru \
    --to=cas@altlinux.ru \
    --cc=devel@lists.altlinux.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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git