Skip to contentSkip to conversation

running alfred as unprivileged user

B.A.T.M.A.N. MK 2 participants 3 messages Feb 4, 2015 – Feb 6, 2015

lore
Share & tools
lore

MK

author
#0 lore raw

Hi list!

Alfred daemon runs as user root in our current setup on the gateway.

Regarding the faulty buffer size checks and improper use of strcpy in recent history of this software this seems to be a very bad idea.

What are the requirements for the user running alfred? Which elevated privileges does alfred really need? Is it possible to drop the privileges after setting up the interface bindings?

Thanks,
Martin

#1 lore raw

Hi Martin,

Quoted 6 lines · On Wednesday 04 February 2015 21:06:33 MK wrote:

Hi list!

Alfred daemon runs as user root in our current setup on the gateway.

Regarding the faulty buffer size checks and improper use of strcpy in recent history of this software this seems to be a very bad idea.

that's a good point.

Quoted 4 lines

What are the requirements for the user running alfred? Which elevated privileges does alfred really need? Is it possible to drop the privileges after setting up the interface bindings?

What spontaneously comes to my mind would be:

* network socket to send/receive UDP packets
* unix socket to talk to clients (but that may be changed by using a different
path)
* access to debugfs to get batman information

Patches are very welcome to implement dropping privileges.

Thanks,
Simon

author
#2 lore raw

Hi Simon!

Quoted 1 line

Patches are very welcome to implement dropping privileges.

Unfortunately I'm no C programmer, but I'll keep researching this issue.

Martin