#638436 autofs5-ldap: Make LDAP search level for master_map configurable

#638436#5
Date:
2011-08-19 09:45:15 UTC
From:
To:
All our automount maps are under one dn: ou=automount,ou=lisa,dc=hpcv,dc=sara,dc=nl. If autofs starts it produce a lot of errors:
{{{
Aug 19 11:38:54 gb-r7n2 automount[5730]: Starting automounter version 5.0.4, master map ou=lisa,ou=automount,dc=hpcv,dc=sara,dc=nl
Aug 19 11:38:54 gb-r7n2 automount[5730]: using kernel protocol version 5.01
Aug 19 11:38:54 gb-r7n2 automount[5730]: connected to uri ldaps://cua.irc.sara.nl
Aug 19 11:38:54 gb-r7n2 automount[5730]: syntax error in map near [ * -fstype=nfs,rw,hard,intr,vers=3,noacl fs6,fs7: ]
Aug 19 11:38:54 gb-r7n2 automount[5730]: syntax error in map near [ wiltest -fstype=nfs,rw,vers=3,hard,intr,acl fs8: ]
Aug 19 11:38:54 gb-r7n2 automount[5730]: syntax error in map near [ victormk -fstype=nfs,rw,vers=3,hard,intr,acl fs8: ]A
...
}}}

The function lookup_read_maste() in modules/lookup_ldap.c use a default scope level:
 * scope = LDAP_SCOPE_SUBTREE;

if a change it to. The problems are gone:
 * scope = LDAP_SCOPE_ONE;

There is no way to adjust the LDAP scope level in the /etc/default/autofs.  Can there be an option added to adjust the SCOPE level for the master map?