Some privilege reduction patches

Richard Hughes hughsient at gmail.com
Wed Feb 15 02:25:24 PST 2006


On 15/02/06, Martin Pitt <martin at piware.de> wrote:
> Hi Richard!
> Richard Hughes [2006-02-15  9:26 +0000]:
> > On 14/02/06, Martin Pitt <martin at piware.de> wrote:
> > > Also, it is now reasonable to run some of the helpers with reduced
> > > privileges. E. g. the ACPI helper doesn't need root privileges since
> > > it can happily read from acpid. This even helps to prevent some race
> > > conditions between acpid and hal which apparently crash acpid in
> > > Debian in some cases.
> >
> > What if you don't have acpid installed? I know a few people (myself
> > included) who run hald without acpid, as acpi events are not being
> > used by anything else. Wouldn't dropping the privileges stop the addon
> > from reading /proc/acpi/event ?
>
> Right, it would. As I said, these are only experimental patches for
> now.
>
> It seems that there should be a check:
>
>  * If the acpid.socket exists, then the helper should drop privs and
>    use it.
>
>  * Otherwise it should open the kernel interface directly and drop
>    privs after that (and just keep the open file descriptor around).

Good for me, just making sure that we drop privs only after we open
the /proc/acpi/event file. Thanks for the quick reply.

Richard.


More information about the hal mailing list