bus1 / dbus-broker

Linux D-Bus Message Broker
https://github.com/bus1/dbus-broker/wiki
Apache License 2.0
675 stars 78 forks source link

broker/broker: use SO_PEERCRED.pid over getppid() #224

Closed dvdhrm closed 4 years ago

dvdhrm commented 4 years ago

When querying for LSM credentials of our parent, we want the strategy forward to be using SO_PEERSEC. In the fallback-path, we use /proc on the parent pid. To reduce the differences between those paths, actually use the pid from the controller-socket over getppid(). This now reduces the differences to just where we fetch the data from.