Skip to contentSkip to conversation

package/bird: add a unprivileged user

PATCH New Adrien Gallouët 2 participants 5 messages Feb 5, 2019 – Jun 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/bird: add a unprivileged user

This commit add a specific unprivileged user for BIRD to avoid full root privileges while running.

---
 package/bird/bird.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/bird/bird.mk +8 -0
index da2f868070..8091644108 100644
@@ -17,4 +17,12 @@ else
 BIRD_CONF_OPTS += --disable-client
 endif
 
+define BIRD_USERS
+	bird -1 bird -1 * - - - BIRD unprivileged user
+endef
+
+define BIRD_PERMISSIONS
+	/etc/bird.conf r 600 bird bird - - - - -
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 package/bird: add a unprivileged user

Hello Adrien,

Quoted 4 lines · On Tue, 5 Feb 2019 10:56:31 +0000 Adrien Gallou?t <[email protected]> wrote:

This commit add a specific unprivileged user for BIRD to avoid full root privileges while running.

Could you give a few more details on how/where this new user gets used ? Your patch only creates it, but it doesn't tweak any init script or configuration file that would tell the daemon to be started using this unprivileged user.

Could you provide a bit more details ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/bird: add a unprivileged user

Quoted 18 lines · Thomas Petazzoni

Hello Adrien,

Quoted 4 lines · On Tue, 5 Feb 2019 10:56:31 +0000 Adrien Gallou?t <[email protected]> wrote:

This commit add a specific unprivileged user for BIRD to avoid full root privileges while running.

Could you give a few more details on how/where this new user gets used ? Your patch only creates it, but it doesn't tweak any init script or configuration file that would tell the daemon to be started using this unprivileged user.

Could you provide a bit more details ?

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Hi Thomas,

I use BIRD with s6 on production and I didn't take the time to write a correct start-stop-daemon script for it yet. In all cases, BIRD only needs root privileges at startup and he can switch to a less privileged one when started with -u USER -g GROUP.

If your prefer to wait, I'll resubmit a patch with the start-stop-daemon script later.

Best regards.

#3 lore raw

PATCH 1/1 package/bird: add a unprivileged user

Hello Adrien,

Thanks for the feedback.

On Sun, 17 Mar 2019 20:56:16 +0100

Quoted 7 lines

I use BIRD with s6 on production and I didn't take the time to write a correct start-stop-daemon script for it yet. In all cases, BIRD only needs root privileges at startup and he can switch to a less privileged one when started with -u USER -g GROUP.

If your prefer to wait, I'll resubmit a patch with the start-stop-daemon script later.

Yes, indeed, I think it makes more sense to have the new user created together with an init script that actually uses it.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/bird: add a unprivileged user

Quoted 5 lines · On Mon, 18 Mar 2019 11:05:47 +0100 Thomas Petazzoni…
Quoted 2 lines

If your prefer to wait, I'll resubmit a patch with the start-stop-daemon script later.

Yes, indeed, I think it makes more sense to have the new user created together with an init script that actually uses it.

Unless I missed it, we didn't receive a new patch that adds the init script for bird. I'm now going to mark the "package/bird: add a unprivileged user" patch as "Changes Requested" in patchwork. So if you don't resubmit a new patch, we will forget about this topic.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com