Bug 130094

Summary: pam_console_setowner does not work
Product: [Fedora] Fedora Reporter: David Zeuthen <davidz>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-24 11:16:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 123268    

Description David Zeuthen 2004-08-16 19:08:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040706 Firefox/0.9.1

Description of problem:
Here is what happens when I hotplug my external DVD writer. Note that
PAM needs to be updated; I've manually had to add the /dev/sr* entry.

[root@laptop ~]# cat /etc/security/console.perms|grep /dev/sr
<cdrom>=/dev/cdrom* /dev/cdroms/* /dev/cdwriter* /mnt/cdrom* /dev/sr*
[root@laptop ~]# ls -l /dev/sr0
ls: /dev/sr0: No such file or directory

[root@laptop ~]# #insert device

[root@laptop ~]# ls -l /dev/sr0
brw-------  1 root root 11, 0 Aug 17 01:02 /dev/sr0
[root@laptop ~]# /sbin/pam_console_setowner /dev/sr0
[root@laptop ~]# ls -l /dev/sr0
brw-------  1 root root 11, 0 Aug 17 01:02 /dev/sr0
[root@laptop ~]# /sbin/pam_console_apply
[root@laptop ~]# ls -l /dev/sr0
brw-------  1 david root 11, 0 Aug 17 01:02 /dev/sr0



Version-Release number of selected component (if applicable):
udev-030-3

How reproducible:
Always

Steps to Reproduce:
Remove device and plug it in again
    

Actual Results:  The permissions for a console user isn't honoured

Expected Results:  The permissions should have changed

Additional info:
Comment 1 Harald Hoyer 2004-08-20 04:24:34 EDT
Do you have selinux enabled??
Comment 2 David Zeuthen 2004-08-20 04:49:44 EDT
Nope.

[root@laptop ~]# selinuxenabled
[root@laptop ~]# echo $?
1
Comment 3 David Zeuthen 2004-08-20 04:54:48 EDT
Btw, there is a related bug, bug #130095, that suggest that udev
should create symlinks such that console.perms will work without
changes when the console changes owner.

Beware, you can't open(2) the device file (that's bug #130232 which is
closed as WONTFIX) so you need to look at /proc/ide/hd?/media or
something.

Thanks,
David
Comment 4 Harald Hoyer 2004-08-20 05:46:37 EDT
ok, found the bug... the console.lock file changed its location.
Comment 5 David Zeuthen 2004-08-20 05:48:50 EDT
Great, should I file a new bug regarding the symlinks?
Comment 6 Harald Hoyer 2004-08-24 11:16:27 EDT
yep