cloudflare / cfrpki

Cloudflare's RPKI Toolbox
https://rpki.cloudflare.com
BSD 3-Clause "New" or "Revised" License
177 stars 44 forks source link

Fix octorpki -allow.root flag #122

Closed rhenium closed 1 year ago

rhenium commented 1 year ago

Commit c9544c992488 ("VULN-11642: Deny running as root by default", 2021-11-18) introduced the new flag -allow.root to the octorpki command, which should still allow it to run as root.

However, the flag has no effect because the check is performed before the command line flags are parsed. Delay the check so that it recognizes the flag correctly.

taktv6 commented 1 year ago

LGTM. Thanks for fixing!