[sudo-workers] Padding supoort for sudoOrder increment in cvtsudoers
Todd C. Miller
Todd.Miller at sudo.ws
Tue Oct 23 11:17:33 MDT 2018
The change is a little misleading as what it really does is to
multiply the start point by 10x the value of the "padding". I think
it would be more obvious to use a number of digits instead. In
other words, a padding value of "2" would mean pad with zero up to
Either way, what should happen if the number of entries is larger
than the padding value? In other words, given a start point of
1201 and a padding value of 10, what should happen when there are
more than 99 entries?
With your patch, the sequence will go from 120199 to 120200, so
there is no longer a 1201 prefix to the sudoOrder values. However,
preserving the 1201 prefix means we end up with a sudoOrder of
1201100 which would probably be a surprise. Perhaps the best
thing to do error out in this case.
What do you think?
More information about the sudo-workers