Bugzilla – Bug 856
Add support for padding the increment value in sudoOrder
Last modified: 2018-11-16 11:14:20 MST
Created attachment 518 [details] patch to support padding As an user, i have an included file with a very long list of entries (>120). As an administrator, i want to keep a numeric index for internal management purpose in the filename, to identify it. As an administrator, i want to keep the same numeric index in sudoOrder in LDAP, to identify it in a fast way. In example, i have the following include file /etc/sudoers.d/1201_TeamA_AppplicationA I want to have a sudoOrder like # ./cvtsudoers -b ou=SUDOers,dc=my-domain,dc=com -O 1201 -I 1 -P 100 -o testfile.ldif /etc/sudoers.d/1201_TeamA_AppplicationA The expected sudoOrder are then [...] sudoOrder: 1201001 [...] sudoOrder: 1201002 [...] sudoOrder: 1201121 Ti do so, it is necessary to fill with zeroes in front of the increment number (padding). The attached patch, which include a test, implement this functionality.
Created attachment 519 [details] Reworked patch to support padding of cvtsudoers increment I've attached a reworked diff that uses the number of digits as the pad and exits with an error if the increment grows too big for the pad.
Fixed in sudo 1.8.26.