On 03/06/2010 16:41, Scott Balneaves wrote:
I just had a look to our ldap ... and it would be cool, but not the coolest ;)On Wed, Jun 02, 2010 at 11:07:37PM +0200, Nicolas Lebrun wrote:On 28/05/2010 21:17, Scott Balneaves wrote:On Wed, May 26, 2010 at 04:53:39PM -0400, Alex Brown wrote:Regarding the LDAP functionality of Sabayon (and I guess the non-LDAP functionality as well), if a user is a member of multiple groups and each group has a specific sabayonProfileName applied to it, which profile gets applied?"The first one" :) Sabayon uses the "getgrent" call to enumerate the groups, and check for membership. The first one it comes across that the user's in, that's the profile it applies. I *think* the getgrent call retrieves things in /etc/group entry order, but if you're pulling from ldap, that's sometimes undefined. I guess a good question would be: given membership in multiple groups with profiles, what SHOULD be the expected behavior? Lowest alpabetical group name? Lowest groupid?Lowest groupid sounds good ... No ?Makes sense, and fairly simple to implement. I'll look into it. Our groups ids are : teachers 10001 students 10002 but we also have domainadmins 502 domainusers 503 Would it be possible to give a lower bound to the group id ? For us, the best would be to have 10000, so we could have different profiles for teachers and students ... But I don't know which value would be cool for everyone... Perhaps a variable in a conf file ? Best regards, Nico Cheers, Scott |