[sudo-users] [sudo-workers] Padding supoort for sudoOrder increment in cvtsudoers
daniele at retaggio.net
Tue Oct 23 16:14:05 MDT 2018
I totally agree on all the points.
I am so going to
- fix the padding based on number of digits
- thrown an error if the sudoOrder padded number is reaching the upper limit of the padding digits provided. Based on a quick view of the code, this be easily done when some output has been already written, not so easy before the output is started to be written.
Before digging, do you think there is a cleaver method to stop with error before writing some output?
Thank you very much,
Il 23 ottobre 2018 19:17:33 CEST, "Todd C. Miller" <Todd.Miller at sudo.ws> ha scritto:
>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?
> - todd
More information about the sudo-users