On 30 Jan 2009, at 07:52, Alexander Leidinger wrote:

Quoting Ed Schouten <e...@80386.nl> (from Thu, 29 Jan 2009 15:36:06 +0100):

* Alexander Leidinger <alexan...@leidinger.net> wrote:
So you want that either
- a daemon running as root is written which listens to user
  requests to set the backlight via sysctl
or
- a SUID root program is written that sets the backlight
  via sysctl
instead of
- a character device with appropriate filesystem permissions
  which allows to not go the SUID root or daemon running as
  root way
?

Yes. The primary reason is that it is more consistent with the rest of the operating system. powerd also uses sysctl's instead of a character
device, for example.

Powerd does not interact with the user, it is doing automatic power management. A backlight on the other hand needs to be adjustable by the user.

Normally I would expect some keys on the keyboard to handle this, so there should be no need to have some userland stuff, but as I don't know about how Apple is doing this, I assume there's some valid reason to handle it from userland. But then there needs to be some easy way to let an user handle it, even if you are on the console. A separate daemon or a SUID root program to control the backlight sounds like overkill to me.

Well, easy: only let the operator group change the sysctl and add your appropriate user accounts to the operator group. No daemon is needed. This is what I thought about when doing the Intel backlight driver, but I never actually did it.

Regards,
--
Rui Paulo

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to