Bug 62976 - /dev/console not owned by user a la /etc/security/console.perms
/dev/console not owned by user a la /etc/security/console.perms
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gphoto2 (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Aaron Brown
:
Depends On:
Blocks: 61901
  Show dependency treegraph
 
Reported: 2002-04-08 15:54 EDT by Chris Runge
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-17 22:56:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chris Runge 2002-04-08 15:54:47 EDT
Description of Problem:

Hampton beta 4 (Skipjack beta 2)

/dev/console is not owned by the user like other devices in
/etc/security/console.perms . This is a problem because by default gPhoto2 is
configured to allow non-root usage of the app, but only if /dev/console is owned
by the user running gPhoto2

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

$ rpm -q pam
pam-0.75-31
[crunge@crunge crunge]$ rpm -q gphoto2
gphoto2-2.0-2


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:
$ rpm -q pam
pam-0.75-31
$ rpm -q gphoto2
gphoto2-2.0-2

Additional Information:
	
I tried manually adding console and /dev/console to the <console> line in
/etc/security/console.perms but that did not work. I had to create a separate
entry called <cons>. Everything worked then, but it would be helpful to either
change the pam behavior or the default gPhoto2 setup.

Interestingly, it appears that /etc/security/console.perms is setup to _revert_
ownership of /dev/console to root, but not to originally grant the ownership to
the user (if I understand this file correctly).
Comment 1 Nalin Dahyabhai 2002-04-09 19:18:49 EDT
This is expected.  Ownership of /dev/console should only be changed if you log
in using a display manager such as xdm, gdm, or kdm.

Which app are you referring to?
Comment 2 Alexander Larsson 2002-04-12 18:00:50 EDT
I tested this with my camera on a fresh install of the latest stuff, and i could
use gtkam perfectly as a user. 

pam 0.75-32
gphotot 2.0-2
Comment 3 Chris Runge 2002-04-13 17:13:50 EDT
if /dev/console should be owned by the user only if using a display manager,
perhaps this bug should be closed and/or reassigned to gphoto2, which by default
assumes ownership of /dev/console (in turn assuming the user is using a display
manager)

fwiw, I wasn't using a display manager--the system is in runlevel 3 and I use
startx to bring up X
Comment 4 Nalin Dahyabhai 2002-04-15 16:31:29 EDT
Please check if gphoto2-2.0-4 (coming soon to Raw Hide) fixes this for you (it
should).

This appeared to be caused by a slight problem with the logic in the
/etc/hotplug/usb/usbcam script, which assumes that the console user for
pam_console always owns /dev/console, which is only the case if a display
manager is being used.

The update changes the logic to look in the console lock file, which contains
the name of the user who is logged in on the console.
Comment 5 Jay Turner 2002-04-17 22:56:14 EDT
Not sure about Chris, but I'm still having problems with /dev/console when gtkam
is run as non-root:
haring (root):~ > ls -la /dev/console 
crw-------    1 root     root       5,   1 Apr 17 21:38 /dev/console

This is with gphoto2-2.0-4.
Comment 6 Jay Turner 2002-04-18 08:59:33 EDT
OK, while I'm still seeing /dev/console owned by root, gtkam appears to be
working just fine for non-root, as well as gphoto2 commandline stuff, so guess
that we are good to go here.

Note You need to log in before you can comment on or make changes to this bug.