[Olsr-dev] making olsrd a "Position Independent Executable" i.e. gcc -pie -fPIE

Henning Rogge (spam-protected)
Wed Oct 3 09:16:00 CEST 2012


On Wed, Oct 3, 2012 at 2:48 AM, Hans-Christoph Steiner
<(spam-protected)> wrote:
> Any hazards to -O2 in olsrd?  I see that its not there by default, yet
> is is a very common default.  Debian sets -O2 by default, for example.

I think most OLSR.org instances are OpenWRT... and they are "-Os".

But we could easily make the debian package go "-O2".

I prefer the "default compilation" to be one with debug options
enabled. If someone compiles his own Olsr, it helps to hunt for bugs.

>> Yes, unfortunately we cannot give root away after initializing... even
>> if we could hand over the rtnetlink socket to another process, OLSRd
>> needs the capability to open new sockets when an interface goes up.
>
> For something like the plugins that listen on a port, it seems
> especially hazardous to have them running as root, and I see no reason
> that txtinfo, httpinfo, jsoninfo, etc. need root privs once they've
> opened their sockets.

Olsrd has only a single thread/process, so there is nothing the
plugins can drop because the root core still need the capabilities.

We should experiment if we can keep using a RTNetlink socket if we
move the socket over to a thread which has no root-rights.

> I'll bring up sshd again since it is one process that has separate parts
> running as root and unprivileged users. It also handles changing
> interfaces, for example, if you have sshd running and turn on your wifi,
> then you can ssh to the IP of the wifi without having to reset sshd.  I
> haven't read the code so I can't point out the relevant bits but I do
> know its behaving the way that I think olsrd should.

I have been thinking about this for the new framework, the networking
code API is a bit more strict there which should make such a
separation easier. But I decided to delay the decision until I have a
running routing agent. ^^

Henning Rogge

-- 
Steven Hawkings about cosmic inflation: "An increase of billions of
billions of percent in a tiny fraction of a second. Of course, that
was before the present government."




More information about the Olsr-dev mailing list