1
1
Can a sudoers #include instruction be disabled with an additional # character? Or rather just delete the leading # character?
(I wish I would understand what the sudo developers had on their mind when they created an instruction that requires a leading comment character.)
In general case the rationale may be like this: You invent an optional extension to the format. You design its directives so they are invisible (look like comments) to old/basic parsers that don't support them, but new/"enlightened" parsers benefit. Compare extended M3U or
– Kamil Maciorowski – 2019-10-13T08:56:54.970#EXTVLCOPT
. I doubt this is the case forsudoers
though, this file must be strict. Probably someone mindlessly mimicked#include
from C preprocessor, where it's OK because#
is not a comment. Insudoers
comments start with#
and#include
is bad design really.The first time I analyzed my
– Kamil Maciorowski – 2019-10-13T09:12:48.163sudoers
file I thoughtinclude
is a directive and#include
is a commented directive. The rule of least surprise violated hard. Also see this answer.