]> granicus.if.org Git - shadow/commit
Add new generic functions to find the next user or group ID available:
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 3 Feb 2008 16:53:07 +0000 (16:53 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 3 Feb 2008 16:53:07 +0000 (16:53 +0000)
commite21f90fd689ca4afec50f8bf79f26edd5b855182
tree7fae7a3cb6641d525b0f85d37a55c2238904c8a8
parentbe7c51d27abf6c1a269a3f42a96c86f7c0016dec
Add new generic functions to find the next user or group ID available:
find_new_uid() and find_new_gid(). They work the same way as the functions
with the same name of useradd or groupadd, except that they check in the
local database to make sure an ID was not reserved in an uncommitted
change (this is needed to be used in newusers), they report a status
instead of calling exit(), and they can receive a preferred ID. They
should later support system IDs. This should be a little bit slower, but
not too much (if the database is not open the checks against the local
database will exit immediately, and if it is already open, all the checks
will be done regarding the data in memory).
ChangeLog
lib/prototypes.h
libmisc/find_new_ids.c [new file with mode: 0644]