Permissões de som do CentOS 6.5

2

Estou tentando configurar o ALSA para uma instalação mínima do CentOS 6.5, meu problema é que usuários não-root não têm permissão para acessar os dispositivos de som em / dev / snd porque os arquivos não possuem listas de controle de acesso:

dispcentos:~$ ls -l /dev/snd
total 0
drwxr-xr-x 2 root root      60 Jan  7 02:21 by-path/
crw-rw---- 1 root audio 116, 8 Jan  7 02:21 controlC0
crw-rw---- 1 root audio 116, 4 Jan  7 02:21 midiC0D0
crw-rw---- 1 root audio 116, 7 Jan  7 02:21 pcmC0D0c
crw-rw---- 1 root audio 116, 6 Jan  7 02:21 pcmC0D0p
crw-rw---- 1 root audio 116, 5 Jan  7 02:21 pcmC0D1p
crw-rw---- 1 root audio 116, 3 Jan  7 02:21 seq
crw-rw---- 1 root audio 116, 2 Jan  7 02:21 timer

As sugestões anteriores foram para adicionar os usuários ao grupo de áudio, mas isso não deve ser necessário. A saída das informações do udevadm mostra que a propriedade ACL_MANAGE está presente como resultado de /lib/udev/rules.d/70-acl.rules:

dispcentos:~$ udevadm info --query=all --name=/dev/snd/pcmC0D0c
P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
N: snd/pcmC0D0c
S: char/116:7
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
E: MAJOR=116
E: MINOR=7
E: DEVNAME=/dev/snd/pcmC0D0c
E: SUBSYSTEM=sound
E: ACL_MANAGE=1
E: DEVLINKS=/dev/char/116:7

Mas a saída do teste do udevadm mostra que o udev-acl não é executado para o dispositivo:

dispcentos:~$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
run_command: calling: test
udevadm_test: version 147
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/01-log-block.rules' as rules file
parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file
parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-multipath.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file
parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file
parse_file: reading '/lib/udev/rules.d/81-kvm-rhel.rules' as rules file
parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file
parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file
udev_rules_new: rules use 30936 bytes tokens (2578 * 12 bytes), 18240 bytes buffer
udev_rules_new: temporary index used 18460 bytes (923 * 20 bytes)
udev_device_new_from_syspath: device 0x1671c38 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'
udev_device_new_from_syspath: device 0x16620a8 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'
udev_device_read_db: device 0x16620a8 filled with db file data
udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46
udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'
udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied
udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63
udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t
udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63
node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
udevadm_test: MAJOR=116
udevadm_test: MINOR=7
udevadm_test: DEVNAME=/dev/snd/pcmC0D0c
udevadm_test: ACTION=add
udevadm_test: SUBSYSTEM=sound
udevadm_test: DEVLINKS=/dev/char/116:7
udevadm_test: ACL_MANAGE=1

Aqui está a saída de uma versão anterior (6.4) para comparação:

dispcentos:mms$ ls -l /dev/snd
total 0
drwxr-xr-x  2 root root      60 Jan  7 07:13 by-path/
crw-rw----+ 1 root audio 116, 8 Jan  7 07:13 controlC0
crw-rw----+ 1 root audio 116, 4 Jan  7 07:13 midiC0D0
crw-rw----+ 1 root audio 116, 7 Jan  7 07:14 pcmC0D0c
crw-rw----+ 1 root audio 116, 6 Jan  7 07:16 pcmC0D0p
crw-rw----+ 1 root audio 116, 5 Jan  7 07:13 pcmC0D1p
crw-rw----+ 1 root audio 116, 3 Jan  7 07:13 seq
crw-rw----+ 1 root audio 116, 2 Jan  7 07:13 timer

dispcentos:mms$ getfacl /dev/snd/pcmC0D0c 
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/pcmC0D0c
# owner: root
# group: audio
user::rw-
user:mms:rw-
group::rw-
mask::rw-
other::---
dispcentos:mms$ udevadm info --query=all --name=/dev/snd/pcmC0D0c
P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
N: snd/pcmC0D0c
S: char/116:7
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
E: MAJOR=116
E: MINOR=7
E: DEVNAME=/dev/snd/pcmC0D0c
E: SUBSYSTEM=sound
E: ACL_MANAGE=1
E: DEVLINKS=/dev/char/116:7
dispcentos:mms$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
run_command: calling: test
udevadm_test: version 147
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file
parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-libgphoto2.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-usb-media-players.rules' as rules file
parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-fprint-autosuspend.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-libmtp.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-pcmcia.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-wacom.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-uinput-stddev.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-uinput-wacom.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/65-libsane.rules' as rules file
parse_file: reading '/lib/udev/rules.d/65-libwacom.rules' as rules file
parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file
parse_file: reading '/lib/udev/rules.d/69-pilot-link.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-cups-libusb.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file
parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-printers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/71-biosdevname.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-ericsson-mbm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-longcheer-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-platform-serial-whitelist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-simtech-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-usb-device-blacklist.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-mm-zte-port-types.rules' as rules file
parse_file: reading '/lib/udev/rules.d/77-nm-olpc-mesh.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-udisks.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-regulatory.rules' as rules file
parse_file: reading '/lib/udev/rules.d/85-usbmuxd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file
parse_file: reading '/lib/udev/rules.d/89-microcode.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file
parse_file: reading '/lib/udev/rules.d/90-pulseaudio.rules' as rules file
parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-dell.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-fujitsu.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-gateway.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-ibm.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-lenovo.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-toshiba.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-csr.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-hid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-devkit-power-wup.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
parse_file: reading '/etc/udev/rules.d/97-bluetooth-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/97-bluetooth.rules' as rules file
parse_file: reading '/etc/udev/rules.d/98-kexec.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file
parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-vmware-scsi-udev.rules' as rules file
udev_rules_new: rules use 187884 bytes tokens (15657 * 12 bytes), 39574 bytes buffer
udev_rules_new: temporary index used 59740 bytes (2987 * 20 bytes)
udev_device_new_from_syspath: device 0x218d3e0 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'
udev_device_new_from_syspath: device 0x2175148 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'
udev_device_read_db: device 0x2175148 filled with db file data
udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46
udev_device_new_from_syspath: device 0x218d590 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0'
udev_device_new_from_syspath: device 0x218d858 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0'
udev_device_new_from_syspath: device 0x218da30 has devpath '/devices/pci0000:00/0000:00:11.0'
udev_device_new_from_syspath: device 0x218dbf0 has devpath '/devices/pci0000:00'
udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53
udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2
udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'
udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied
udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63
udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t
udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63
node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c
udevadm_test: MAJOR=116
udevadm_test: MINOR=7
udevadm_test: DEVNAME=/dev/snd/pcmC0D0c
udevadm_test: ACTION=add
udevadm_test: SUBSYSTEM=sound
udevadm_test: DEVLINKS=/dev/char/116:7
udevadm_test: ACL_MANAGE=1
udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'
udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'

Você verá as duas linhas a seguir do teste do udevadm que estão faltando na instalação mínima do CentOS 6.5:

udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53
udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'

Alguma ideia do porquê?

    
por Simononon 07.01.2014 / 23:23

0 respostas