Description of problem: In IPA we are trying to implement Magic Private Groups (MPG). With MPG when a user is created a group is created with the same name and the gidNumber the same as the uidNumber. Part of this is achieved with the Managed Entries plugin. The group is created/removed along with the user. We currently use DNA to obtain a uidNumber (and gidNumber for new posix groups). What we need for MPG is to set the gidNumber to the uidNumber when the user is created. This currently seems to happen prior to the Managed Entries plugin being executed which is a good thing, so we can use the gidNumber attribute from the user entry to populate the group entry. Version-Release number of selected component (if applicable): 389-ds-base-1.2.6-0.3.a3.fc12.x86_64
Created attachment 409993 [details] Proposed Patch This patch allows one to set multiple dnaType attributes for a single DNA range. This allows the same value to be used for each dnaType (such as ensuring the uidNumber and gidNumber are the same value from the range when ading a posixAccount). There are some differences with the way DNA works for multi-type ranges. For a value to be generated from a multi-type range, the magic value must be specified to indicate which attributes should use the newly generated value. This allows a range to be shared across different entry types (such as having a uidNumber/gidNumber range that is used or posixAccount and posixGroup entries). A multi-type range will not generate a value for missing attributes as DNA does for single-type ranges. Since a range can have multiple types, the internal ordering of config structs had to be changed to order by scope only. It was previously ordered by type and then scope, which allowed us to easily detect if we had already generated a value for a given type. This change required a number of helper functions to be added for tracking and checking which types we have already generated values for.
Pushed to master. Thanks to Rich for his review! Counting objects: 13, done. Delta compression using 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 4.96 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 0501282..a0b60b0 master -> master
DNA startup 100% (1/1) DNA run 100% (61/61) DNA cleanup 100% (1/1) Hence VERIFIED.