HomePhorge

Fix nameservice provider auto-generated IDs that may overlap.
8774699cbfffUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix nameservice provider auto-generated IDs that may overlap.

When the ID autogenerator was implemented in the nameservice provider base, it
had a small bug: it would always use the GID of the entry to find the largest
number, regardless of it looking for a GID or a UID.

This means that if you did not use the modern convention of per-user primary
groups, and your highest UID was larger than your highest primary GID, you
would happily generate overlapping IDs.

While the method itself isn't awesome, it is broadly enough used that we
shouldn't get rid of it entirely. This fixes it to correctly determine the
largest UID for UID search, and GID for GID search, with less metaprogramming.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU3c6b448ae3fa: Fix signal handling test vs Ruby 1.9 async signals.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU8774699cbfff: Fix nameservice provider auto-generated IDs that may overlap. (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM