Re: cups ppd files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Saltzman wrote:
On Tue, 29 Aug 2006, Paul Howarth wrote:

Matthew Saltzman wrote:
On Tue, 29 Aug 2006, Timothy Murphy wrote:
That seems perfectly sensible to me.
But I don't see why it requires you to have two different programs
with the same name.
I don't really get this either.  All of the system-config utilities 
in /usr/bin are symlinked to consolehelper.  Many have no /usr/sbin 
counterpart.  Yet they seem to start just fine when invoked as root.
My guess is that the /usr/sbin ones are artifacts of a 
pre-consolehelper era and could be removed with no ill effects.
You guess wrong. That would cause them to stop working. Consolehelper 
is not some super-configuration utility replacing all of the 
system-config-* programs, it's just a simple wrapper that prompts for 
the root password, switches to root (assuming the passwird was 
correct) and runs the requested program from /usr/sbin.
OK I stand corrected (makes sense, actually).  But I still don't get:

(a) It appears that invoking /usr/bin/system-config-* as root does not redundantly prompt for the root password as has been suggested in this thread.
(b) How does consolehelper know what utility to invoke?  It can't be 
quite as simple as you suggest.  For example, 
/usr/bin/system-config-users is a symlink to consolehelper, but there is 
no /usr/sbin/system-config-users program for consolehelper to invoke.
The actual program does not, as you say, need to be installed in 
/usr/sbin. It does have to be installed somewhere though, and /usr/sbin 
is a good location as it's not on the PATH of regular users. The 
consolehelper utility finds the program from the 
/etc/security/console.apps/programname file, which for 
system-config-users has:
PROGRAM=/usr/share/system-config-users/system-config-users

In the absence of a PROGRAM entry here, consolehelper looks in /usr/sbin (see pm-hibernate for example). So /usr/sbin is the efault location for the target program.
It's good to see that consolehelper doesn't prompt for the password if 
run as root in the first place, which makes sense.
Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux