Allow space between Defaults@ and hostname list#1509
Conversation
b2943c0 to
a5f2dfb
Compare
|
Note: commit 516334e is debatable; ogsudo doesn't allow line continuations at all in host/user/...-specific defaults (it would be interesting to look at how their parser solves the conundrum). We used to not allow it only in During early sudo-rs development I've often had discussions with @rnijveld where he expressed severe doubts if we could manage to parse /etc/sudoers with a relatively textbook look-ahead-1 recursive descent parser. Turns out that we still can.. more or less. (Maybe you could argue resetting the parsing position is definitely a form of backtracking; but I think it's an implementation trick only... maybe; this would be a nice topic for a bachelor's thesis in theoretical computer science) |
04a9b54 to
fea55d0
Compare
fea55d0 to
e9c2b44
Compare
|
Note: b294cba can add the strictness here that ogsudo has (but it introduces a little bit extra complexity to a delicate part). I think if we're going to go one way or the other for |
Closes #1508
Needs regression tests in sudoers/test/mod.rs to also check edge cases such as:
are accepted(edit ogsudo rejects these too) and thatand
and
are rejected