01-18-07 12:28 AM
2007-01-17, 15:07(-08), bsh:
>
> Kenny McCormack wrote:
>
> This and subsequent solutions do not address the circumstance
> of "holes" in used UIDs and GIDs, as per the OP's request.
>
> The algorithm for finding the first _available_ UID/GID is to sort
> the list (as above), and determine the number which is not one
> greater than the previous UID/GID. The first available UID/GID is
> the previous number plus one. If there is no such number,
> _then_ the first available UID/GID is the last number plus one.
[...]
I'd suggest you reread the provided solution. All do what you
say using a more or less cleaver algorithm.
--
Stéphane
[ Post a follow-up to this message ]
|