autofs5 duplicate entries
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuid
ldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName: auto_package...
like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName: auto_package...
gives in /var/log/messages a
Jul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry /share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one: lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/java
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entries
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuid
ldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName: auto_package...
like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName: auto_package...
gives in /var/log/messages a
Jul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry
/share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/java
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------
Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.
Ian Kent
maintainerQuoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can help.
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit?
Does the % apply to the whole entry or just the character following it?
Never the less I think it's wrong to allow multiple keys for a mount entry since the key is supposed to be unique.
Quoted 78 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited._______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Hi Ian,
since you asked for documentation on this issue, see the sourcecode of the solaris automounter here:
http://src.opensolaris.org/source/xref/pef/phase_I/usr/src/cmd/fs.d/autofs/ns_ldap.c
line 976 ++
as can be seen the % apply to the character following. JaVa would be queried for as %Ja%Va. Seems to be the solaris automounter not ldap retaining the case sensitivity.
i will try the patch u sent me shortly and report back if it helped.
*nail
Quoted 100 lines · Ian Kent
Quoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can help.
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit?
Does the % apply to the whole entry or just the character following it?Never the less I think it's wrong to allow multiple keys for a mount entry since the key is supposed to be unique.
Quoted 73 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.Quoted 4 lines
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 4 lines · Nail El-Sourani
Hi Ian,
since you asked for documentation on this issue, see the sourcecode of the solaris automounter here:
No, I won't be looking at Copyrighted source, sorry. External documentation or behavioral reports only thanks.
Quoted 8 lines
http://src.opensolaris.org/source/xref/pef/phase_I/usr/src/cmd/fs.d/autofs/ns_ldap.c
line 976 ++
as can be seen the % apply to the character following. JaVa would be queried for as %Ja%Va. Seems to be the solaris automounter not ldap retaining the case sensitivity.
Yes, I'll think about this but multiple key values is still illegal from my point of view, so we will see what further discussion brings.
Quoted 106 lines
i will try the patch u sent me shortly and report back if it helped.
*nail
Quoted 100 lines · Ian Kent
Quoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can help.
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit?
Does the % apply to the whole entry or just the character following it?Never the less I think it's wrong to allow multiple keys for a mount entry since the key is supposed to be unique.
Quoted 73 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.Quoted 4 lines
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian. Here is some information that might help. I have worked with the Sun Directory service and is running in our production environment. I am getting to know OpenLDAP and am studying the practical differences between the two these days. We are a Solaris, Linux, HP-UX shop with Solaris and Linux distributed in a networked desktop environment.
As you probably already know, there is the IETF RFC2307 that was adopted in the late 90's. A revised "RFC2307bis" was submitted in 2002. It was never formally adopted (that I could ever see and now no longer is accessible at the IETF). Sun had incorporated the additional attributes/objects interjected, namely the attributes "automountKey" and "automountInformation" used by objectclass "automount" in both the client (NSS LDAP lib) and their directory server.
The OpenLDAP server base supports RFC2307, not RFC2307bis. RedHat, though, supplies a permutation of a schema definition to support the "automount" extension of the RFC2307bis. Both Sun and OpenLDAP both include the "RFC2307" nisMap and nisObject and are defined consistently between the two. Historically for us, the "nisObject" objectclass were used in our installation for automounter support, since it provided consistency in deployment and Solaris had good support for attribute mapping. (If I remember correctly, on Linux we initially implemented autofs v3.x and attribute mapping was not supported then -- I could be wrong here). We could support a "single line entry" in an automount map without having to "duplicate entries" by supporting both sets of objectclasses.
There are differences in the way the "key attributes" are defined. To define a "nisObject", the "cn" is required. "cn" is a multi-value, case insensitive attribute (UTF-8 DirectoryString -- EQUALITY caseIgnoreMatch, SUBSTR caseIgnoreSubstringsMatch). "automountKey" is case sensitive and is a single-value attribute (IA5String -- EQUALITY caseExactIA5Match). Technically, by definition, the "cn" should lend to case sensitivity issues, though queried, will deliver a case oriented result. Sun apparently took the technically precise approach and worked around this dilemma (or some would argue they introduced it) by delimiting upper case letters with the % sign in order to read a "cn" mapped value and precisely understand its case sensitivity no matter how it is delivered.
On Solaris, only the case defined definition appears as the mount. I guess they have programmed around receiving multiple values for an attribute and adopts the one if the % sign is used in one of the values. Over RHEL3/autofs 4.1.x, there is a mount per "cn" received. One with case sensitivity, one with the delimiters included. Not elegant, but the case sensitive path is preserved between platforms for the benefit of the common applications running cross-platform. Both mounted paths are accessible as mounted.
With the above said, as a side note, the RedHat supplied schema (Fedora
7) included in their packaged OpenLDAP server uses "cn" as the key in the "automount" objectclass definition rather than the RFC2307bis "automountKey". Jeff would probably be able to interject some insight why. The mainstream version may not be, in fact, defined that way.
I hope this helps.
-----Original Message-----
From: Ian Kent [mailto:[email protected]]
Sent: Friday, July 27, 2007 10:17 AM
To: [email protected]
Cc: Wolfe, Allan; [email protected]
Subject: Re: [autofs] autofs5 duplicate entries
Quoted 5 lines · Nail El-Sourani
Hi Ian,
since you asked for documentation on this issue, see the sourcecode of
the solaris automounter here:
No, I won't be looking at Copyrighted source, sorry. External documentation or behavioral reports only thanks.
Quoted 9 lines
http://src.opensolaris.org/source/xref/pef/phase_I/usr/src/cmd/fs.d/au
tofs/ns_ldap.cline 976 ++
as can be seen the % apply to the character following. JaVa would be queried for as %Ja%Va. Seems to be the solaris automounter not ldap retaining the case sensitivity.
Yes, I'll think about this but multiple key values is still illegal from my point of view, so we will see what further discussion brings.
Quoted 16 lines
i will try the patch u sent me shortly and report back if it helped.
*nail
Quoted 10 lines · Ian Kent
Quoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can
help.
Quoted 4 lines
Quoted 4 lines
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit? Does the % apply to the whole entry or just the character following
it?
Quoted 86 lines
Quoted 86 lines
Never the less I think it's wrong to allow multiple keys for a mount
entry since the key is supposed to be unique.
Quoted 80 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java
somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Quoted 4 lines
Quoted 4 lines
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------
Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.
Hi there,
I was just wondering if there are any news on this regarding autofs5?
Thanks,
*nail
Quoted 213 lines · Allan
Ian. Here is some information that might help. I have worked with the Sun Directory service and is running in our production environment. I am getting to know OpenLDAP and am studying the practical differences between the two these days. We are a Solaris, Linux, HP-UX shop with Solaris and Linux distributed in a networked desktop environment.
As you probably already know, there is the IETF RFC2307 that was adopted in the late 90's. A revised "RFC2307bis" was submitted in 2002. It was never formally adopted (that I could ever see and now no longer is accessible at the IETF). Sun had incorporated the additional attributes/objects interjected, namely the attributes "automountKey" and "automountInformation" used by objectclass "automount" in both the client (NSS LDAP lib) and their directory server.
The OpenLDAP server base supports RFC2307, not RFC2307bis. RedHat, though, supplies a permutation of a schema definition to support the "automount" extension of the RFC2307bis. Both Sun and OpenLDAP both include the "RFC2307" nisMap and nisObject and are defined consistently between the two. Historically for us, the "nisObject" objectclass were used in our installation for automounter support, since it provided consistency in deployment and Solaris had good support for attribute mapping. (If I remember correctly, on Linux we initially implemented autofs v3.x and attribute mapping was not supported then -- I could be wrong here). We could support a "single line entry" in an automount map without having to "duplicate entries" by supporting both sets of objectclasses.
There are differences in the way the "key attributes" are defined. To define a "nisObject", the "cn" is required. "cn" is a multi-value, case insensitive attribute (UTF-8 DirectoryString -- EQUALITY caseIgnoreMatch, SUBSTR caseIgnoreSubstringsMatch). "automountKey" is case sensitive and is a single-value attribute (IA5String -- EQUALITY caseExactIA5Match). Technically, by definition, the "cn" should lend to case sensitivity issues, though queried, will deliver a case oriented result. Sun apparently took the technically precise approach and worked around this dilemma (or some would argue they introduced it) by delimiting upper case letters with the % sign in order to read a "cn" mapped value and precisely understand its case sensitivity no matter how it is delivered.
On Solaris, only the case defined definition appears as the mount. I guess they have programmed around receiving multiple values for an attribute and adopts the one if the % sign is used in one of the values. Over RHEL3/autofs 4.1.x, there is a mount per "cn" received. One with case sensitivity, one with the delimiters included. Not elegant, but the case sensitive path is preserved between platforms for the benefit of the common applications running cross-platform. Both mounted paths are accessible as mounted.
With the above said, as a side note, the RedHat supplied schema (Fedora
7) included in their packaged OpenLDAP server uses "cn" as the key in the "automount" objectclass definition rather than the RFC2307bis "automountKey". Jeff would probably be able to interject some insight why. The mainstream version may not be, in fact, defined that way.I hope this helps.
-----Original Message-----
From: Ian Kent [mailto:[email protected]]
Sent: Friday, July 27, 2007 10:17 AM
To: [email protected]
Cc: Wolfe, Allan; [email protected]
Subject: Re: [autofs] autofs5 duplicate entriesQuoted 5 lines · Nail El-Sourani
Hi Ian,
since you asked for documentation on this issue, see the sourcecode of
the solaris automounter here:
No, I won't be looking at Copyrighted source, sorry. External documentation or behavioral reports only thanks.
Quoted 8 lines
http://src.opensolaris.org/source/xref/pef/phase_I/usr/src/cmd/fs.d/au
tofs/ns_ldap.cline 976 ++
as can be seen the % apply to the character following. JaVa would be queried for as %Ja%Va. Seems to be the solaris automounter not ldap retaining the case sensitivity.
Yes, I'll think about this but multiple key values is still illegal from my point of view, so we will see what further discussion brings.
Quoted 14 lines
i will try the patch u sent me shortly and report back if it helped.
*nail
Quoted 9 lines · Ian Kent
Quoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can
help.
Quoted 3 lines
Quoted 3 lines
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit? Does the % apply to the whole entry or just the character following
it?
Quoted 80 lines
Quoted 80 lines
Never the less I think it's wrong to allow multiple keys for a mount
entry since the key is supposed to be unique.
Quoted 76 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java
somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs-----------------------------------------
Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited._______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 3 lines · Nail El-Sourani
Hi there,
I was just wondering if there are any news on this regarding autofs5?
I haven't done any work on this so far.
I'll review the posts again and give it some more thought.
Quoted 218 lines
Thanks,
*nailQuoted 213 lines · Allan
Ian. Here is some information that might help. I have worked with the Sun Directory service and is running in our production environment. I am getting to know OpenLDAP and am studying the practical differences between the two these days. We are a Solaris, Linux, HP-UX shop with Solaris and Linux distributed in a networked desktop environment.
As you probably already know, there is the IETF RFC2307 that was adopted in the late 90's. A revised "RFC2307bis" was submitted in 2002. It was never formally adopted (that I could ever see and now no longer is accessible at the IETF). Sun had incorporated the additional attributes/objects interjected, namely the attributes "automountKey" and "automountInformation" used by objectclass "automount" in both the client (NSS LDAP lib) and their directory server.
The OpenLDAP server base supports RFC2307, not RFC2307bis. RedHat, though, supplies a permutation of a schema definition to support the "automount" extension of the RFC2307bis. Both Sun and OpenLDAP both include the "RFC2307" nisMap and nisObject and are defined consistently between the two. Historically for us, the "nisObject" objectclass were used in our installation for automounter support, since it provided consistency in deployment and Solaris had good support for attribute mapping. (If I remember correctly, on Linux we initially implemented autofs v3.x and attribute mapping was not supported then -- I could be wrong here). We could support a "single line entry" in an automount map without having to "duplicate entries" by supporting both sets of objectclasses.
There are differences in the way the "key attributes" are defined. To define a "nisObject", the "cn" is required. "cn" is a multi-value, case insensitive attribute (UTF-8 DirectoryString -- EQUALITY caseIgnoreMatch, SUBSTR caseIgnoreSubstringsMatch). "automountKey" is case sensitive and is a single-value attribute (IA5String -- EQUALITY caseExactIA5Match). Technically, by definition, the "cn" should lend to case sensitivity issues, though queried, will deliver a case oriented result. Sun apparently took the technically precise approach and worked around this dilemma (or some would argue they introduced it) by delimiting upper case letters with the % sign in order to read a "cn" mapped value and precisely understand its case sensitivity no matter how it is delivered.
On Solaris, only the case defined definition appears as the mount. I guess they have programmed around receiving multiple values for an attribute and adopts the one if the % sign is used in one of the values. Over RHEL3/autofs 4.1.x, there is a mount per "cn" received. One with case sensitivity, one with the delimiters included. Not elegant, but the case sensitive path is preserved between platforms for the benefit of the common applications running cross-platform. Both mounted paths are accessible as mounted.
With the above said, as a side note, the RedHat supplied schema (Fedora
7) included in their packaged OpenLDAP server uses "cn" as the key in the "automount" objectclass definition rather than the RFC2307bis "automountKey". Jeff would probably be able to interject some insight why. The mainstream version may not be, in fact, defined that way.I hope this helps.
-----Original Message-----
From: Ian Kent [mailto:[email protected]]
Sent: Friday, July 27, 2007 10:17 AM
To: [email protected]
Cc: Wolfe, Allan; [email protected]
Subject: Re: [autofs] autofs5 duplicate entriesQuoted 5 lines · Nail El-Sourani
Hi Ian,
since you asked for documentation on this issue, see the sourcecode of
the solaris automounter here:
No, I won't be looking at Copyrighted source, sorry. External documentation or behavioral reports only thanks.
Quoted 8 lines
http://src.opensolaris.org/source/xref/pef/phase_I/usr/src/cmd/fs.d/au
tofs/ns_ldap.cline 976 ++
as can be seen the % apply to the character following. JaVa would be queried for as %Ja%Va. Seems to be the solaris automounter not ldap retaining the case sensitivity.
Yes, I'll think about this but multiple key values is still illegal from my point of view, so we will see what further discussion brings.
Quoted 14 lines
i will try the patch u sent me shortly and report back if it helped.
*nail
Quoted 9 lines · Ian Kent
Quoted 4 lines · Allan
To add a comment here. . . The extra cn is for the benefit for Solaris that requires the percent sign to qualify for the capital letter in the string. We will have to contend with the same issue as we move toward autofs version 5.
OK, since the NIS schema isn't case sensitive, right.
I know only what I need to know about LDAP and so I don't know what the % is supposed to do. Perhaps some of the LDAP folks here can
help.
Quoted 3 lines
Quoted 3 lines
Does it allow LDAP to retain the case sensitivity in a case insensitive attribute or does Solaris autofs do that bit? Does the % apply to the whole entry or just the character following
it?
Quoted 80 lines
Quoted 80 lines
Never the less I think it's wrong to allow multiple keys for a mount
entry since the key is supposed to be unique.
Quoted 76 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nail El-Sourani
Sent: Wednesday, July 25, 2007 7:54 AM
To: [email protected]
Subject: [autofs] autofs5 duplicate entrieshi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry/share/java Jul 25 14:22:45 SEMTEX automount[4872]:
lookup_one:
lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaAs I believe, there seems to be a Problem with cn:Java and cn:%Java
somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Any help would be appreciated.
*nail
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
-----------------------------------------Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs-----------------------------------------
Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited._______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerOn Fri, 2007-07-27 at 18:21 -0500, Wolfe, Allan wrote:
Back to this again.
Quoted 9 lines
On Solaris, only the case defined definition appears as the mount. I guess they have programmed around receiving multiple values for an attribute and adopts the one if the % sign is used in one of the values. Over RHEL3/autofs 4.1.x, there is a mount per "cn" received. One with case sensitivity, one with the delimiters included. Not elegant, but the case sensitive path is preserved between platforms for the benefit of the common applications running cross-platform. Both mounted paths are accessible as mounted.
So is it accurate to say that, in this case, the:
cn: Java
provides the case insensitive match for key java and:
cn: %Java
defines case sensitivity constraints for autofs to use when matching the entry?
Is it possible then to match Java and JaVa by adding an additional cn of:
cn: %Ja%Va
to the above entry?
Is it possible then, in this scenario, to have distinct LDAP entries for keys Java and JaVa?
Ian
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
Test Process:
1. Update test automount map entry in the LDAP directory for case.
2. Check for the order received using ldapsearch to insure
replication is complete. (I used Linux here since it is easier to use).
3. Reboot Solaris test client to insure fresh start of
autofs/automountd
4. List the stubs created by automounter in Solaris.
LDAP Directory Source: Sun/iPlanet/Netscape 5.2
solaris8test > uname -a
SunOS solaris8test 5.8 Generic_117350-05 sun4u sparc SUNW,Sun-Blade-1000
solaris8test > cat /etc/auto_master
/home auto_home
/test auto_test
Case 1: Have non-delimited entry first in cn list followed by variant
Linuxtest > ldapsearch -x -LLL -b nismapname=auto_test,ou=automaps,dc=example,dc=com objectclass=nisobject
dn: cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: Images
cn: %Ima%Ges
cn: %Images
solaris8test > ls /test
Images
solaris8test > ls /test/Images
[file listing]
solaris8test > ls /test/images
[file listing]
solaris8test > ls /test/ImaGes
[file listing]
solaris8test > ls /test
ImaGes Images images
Case 2: Have delimited variant entry first in cn list
Linuxtest > ldapsearch -x -LLL -b nismapname=auto_test,ou=automaps,dc=example,dc=com objectclass=nisobject
dn: cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: %Ima%Ges
cn: %Images
cn: Images
solaris8test > ls /test
Images
Case 3: Shuffle cn list with ImaGes on bottom (eliminate last read is what is used)
Linuxtest > ldapsearch -x -LLL -b nismapname=auto_test,ou=automaps,dc=example,dc=com objectclass=nisobject
dn: cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: Images
cn: %Images
cn: %Ima%Ges
solaris8test > ls /test
Images
Case 4: Create delimited with only variant.
dn: cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: Images
cn: %Ima%Ges
solaris8test > ls /test
Images
Case 5: Create dn with small case and add cn case sensitive.
dn: cn=images,nismapname=auto_test,ou=automaps,dc=example,dc=com
changetype: add
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: Images
cn: %Ima%Ges
cn: images
Received error (logically so) on re-entry:
deleting entry "cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com"
adding new entry "cn=images,nismapname=auto_test,ou=automaps,dc=example,dc=com"ldap_add: Type or value exists
ldif_record() = 20
Case 6: "Standard entry" -- no delimited cn
dn: cn=Images,nismapname=auto_test,ou=automaps,dc=example,dc=com
objectClass: top
objectClass: nisobject
nisMapEntry: $OPTN nfssrv1:/vol/vol1/Images
nisMapName: auto_test
cn: Images
solaris8test > ls /test
Images
-----Original Message-----
From: Ian Kent [mailto:[email protected]]
Sent: Tuesday, August 14, 2007 4:12 AM
To: Wolfe, Allan
Cc: [email protected]; [email protected]
Subject: Re: [autofs] autofs5 duplicate entries
On Fri, 2007-07-27 at 18:21 -0500, Wolfe, Allan wrote:
Back to this again.
Quoted 3 lines
On Solaris, only the case defined definition appears as the mount. I guess they have programmed around receiving multiple values for an attribute and adopts the one if the % sign is used in one of the
values.
Quoted 9 lines
Over RHEL3/autofs 4.1.x, there is a mount per "cn" received. One with
case sensitivity, one with the delimiters included. Not elegant, but the case sensitive path is preserved between platforms for the benefit
of the common applications running cross-platform. Both mounted paths
are accessible as mounted.
So is it accurate to say that, in this case, the:
cn: Java
provides the case insensitive match for key java and:
cn: %Java
defines case sensitivity constraints for autofs to use when matching the entry?
Is it possible then to match Java and JaVa by adding an additional cn of:
cn: %Ja%Va
to the above entry?
Is it possible then, in this scenario, to have distinct LDAP entries for keys Java and JaVa?
Ian
-----------------------------------------
Anadarko Confidentiality Notice:
This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.
Ian Kent
maintainerQuoted 7 lines · Allan
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
Quoted 8 lines
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
But you guys confirmed that the % hack is present in OpenSolaris so perhaps the patch below will provide the behavior we need.
Could someone try this patch out please.
---
modules/lookup_ldap.c +64 -34
@@ -1226,34 +1226,50 @@ static int read_one_map(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) -continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* We have a result from LDAP so this is a +* valid entry. Set the result to the LDAP +* key that isn't a wildcard and doesn't have +* any "%" hack values present. This should be +* the case insensitive match string for the +* nis schema, the default value. +*/ k_val = bvKey[i]->bv_val; - k_len =1 ; + k_len = bvKey[i]->bv_len; +break ; }if (!k_val) {error (ap->logopt,MODPREFIX -"key %.*s has duplicate entries - ignoring" , +"invalid entry %.*s - ignoring" , bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); goto next; }
@@ -1509,34 +1525,48 @@ static int lookup_one(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) -continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; - k_val = bvKey[i]->bv_val; - k_len =1 ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* The key was matched by LDAP so this is a +* valid entry. Set the result key to the +* lookup key to provide the mixed case +* matching provided by the "%" hack. +*/ + k_val = qKey; + k_len =strlen (qKey); +break ; }if (!k_val) {error (ap->logopt, -MODPREFIX "key %.*s has duplicate entries" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); +MODPREFIX "no valid key found for %.*s" , + qKey_len, qKey); ret =CHE_FAIL ; goto next; }
Hi Ian,
That hack is indeed present in OpenSolaris. I can confirm the below patch is working 100%. Will it be merged into autofs5?
Thx,
*nail
Quoted 162 lines · Ian Kent
Quoted 7 lines · Allan
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
Quoted 8 lines
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
But you guys confirmed that the % hack is present in OpenSolaris so perhaps the patch below will provide the behavior we need.
Could someone try this patch out please.
---
modules/lookup_ldap.c +64
-34@@ -1226,34 +1226,50 @@ static int read_one_map(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) -continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* We have a result from LDAP so this is a +* valid entry. Set the result to the LDAP +* key that isn't a wildcard and doesn't have +* any "%" hack values present. This should be +* the case insensitive match string for the +* nis schema, the default value. +*/ k_val = bvKey[i]->bv_val; - k_len =1 ; + k_len = bvKey[i]->bv_len; +break ; }if (!k_val) {error (ap->logopt,MODPREFIX -"key %.*s has duplicate entries - ignoring" , +"invalid entry %.*s - ignoring" , bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); goto next; }@@ -1509,34 +1525,48 @@ static int lookup_one(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) -continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; - k_val = bvKey[i]->bv_val; - k_len =1 ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* The key was matched by LDAP so this is a +* valid entry. Set the result key to the +* lookup key to provide the mixed case +* matching provided by the "%" hack. +*/ + k_val = qKey; + k_len =strlen (qKey); +break ; }if (!k_val) {error (ap->logopt, -MODPREFIX "key %.*s has duplicate entries" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); +MODPREFIX "no valid key found for %.*s" , + qKey_len, qKey); ret =CHE_FAIL ; goto next; }
Ian Kent
maintainerQuoted 4 lines · Nail El-Sourani
Hi Ian,
That hack is indeed present in OpenSolaris. I can confirm the below patch is working 100%. Will it be merged into autofs5?
Yep, just give me a while to check against other changes and think about it for a while to try to ensure that it doesn't break anything else.
Quoted 167 lines
Thx,
*nailQuoted 162 lines · Ian Kent
Quoted 7 lines · Allan
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
Quoted 8 lines
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
But you guys confirmed that the % hack is present in OpenSolaris so perhaps the patch below will provide the behavior we need.
Could someone try this patch out please.
---
modules/lookup_ldap.c +64
-34@@ -1226,34 +1226,50 @@ static int read_one_map(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) -continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* We have a result from LDAP so this is a +* valid entry. Set the result to the LDAP +* key that isn't a wildcard and doesn't have +* any "%" hack values present. This should be +* the case insensitive match string for the +* nis schema, the default value. +*/ k_val = bvKey[i]->bv_val; - k_len =1 ; + k_len = bvKey[i]->bv_len; +break ; }if (!k_val) {error (ap->logopt,MODPREFIX -"key %.*s has duplicate entries - ignoring" , +"invalid entry %.*s - ignoring" , bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); goto next; }@@ -1509,34 +1525,48 @@ static int lookup_one(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) -continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; - k_val = bvKey[i]->bv_val; - k_len =1 ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* The key was matched by LDAP so this is a +* valid entry. Set the result key to the +* lookup key to provide the mixed case +* matching provided by the "%" hack. +*/ + k_val = qKey; + k_len =strlen (qKey); +break ; }if (!k_val) {error (ap->logopt, -MODPREFIX "key %.*s has duplicate entries" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); +MODPREFIX "no valid key found for %.*s" , + qKey_len, qKey); ret =CHE_FAIL ; goto next; }
Hi Ian,
i just tried autofs 5.0.2-30 it still doesnt include this particular solaris hack/patch. Is there a specific version which does include it? If so, which one?
Thx,
*nail
Quoted 174 lines · Ian Kent
Quoted 4 lines · Nail El-Sourani
Hi Ian,
That hack is indeed present in OpenSolaris. I can confirm the below patch is working 100%. Will it be merged into autofs5?
Yep, just give me a while to check against other changes and think about it for a while to try to ensure that it doesn't break anything else.
Quoted 165 lines
Thx,
*nailQuoted 161 lines · Ian Kent
Quoted 7 lines · Allan
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
Quoted 8 lines
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
But you guys confirmed that the % hack is present in OpenSolaris so perhaps the patch below will provide the behavior we need.
Could someone try this patch out please.
---
modules/lookup_ldap.c +64
-34@@ -1226,34 +1226,50 @@ static int read_one_map(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) -continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* We have a result from LDAP so this is a +* valid entry. Set the result to the LDAP +* key that isn't a wildcard and doesn't have +* any "%" hack values present. This should be +* the case insensitive match string for the +* nis schema, the default value. +*/ k_val = bvKey[i]->bv_val; - k_len =1 ; + k_len = bvKey[i]->bv_len; +break ; }if (!k_val) {error (ap->logopt,MODPREFIX -"key %.*s has duplicate entries - ignoring" , +"invalid entry %.*s - ignoring" , bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); goto next; }@@ -1509,34 +1525,48 @@ static int lookup_one(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) -continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; - k_val = bvKey[i]->bv_val; - k_len =1 ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* The key was matched by LDAP so this is a +* valid entry. Set the result key to the +* lookup key to provide the mixed case +* matching provided by the "%" hack. +*/ + k_val = qKey; + k_len =strlen (qKey); +break ; }if (!k_val) {error (ap->logopt, -MODPREFIX "key %.*s has duplicate entries" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); +MODPREFIX "no valid key found for %.*s" , + qKey_len, qKey); ret =CHE_FAIL ; goto next; }
Ian Kent
maintainerQuoted 5 lines · Nail El-Sourani
Hi Ian,
i just tried autofs 5.0.2-30 it still doesnt include this particular solaris hack/patch. Is there a specific version which does include it? If so, which one?
What are you talking about?
What distribution?
Quoted 179 lines
Thx,
*nailQuoted 174 lines · Ian Kent
Quoted 4 lines · Nail El-Sourani
Hi Ian,
That hack is indeed present in OpenSolaris. I can confirm the below patch is working 100%. Will it be merged into autofs5?
Yep, just give me a while to check against other changes and think about it for a while to try to ensure that it doesn't break anything else.
Quoted 165 lines
Thx,
*nailQuoted 161 lines · Ian Kent
Quoted 7 lines · Allan
Good question.
I spent some time testing today. They only test box I could quickly test on was a Solaris 8 with patch 108993-36 applied that affects autofs, NSS, PAM, ldapclient and associated user utilities (this patch is quite old --> current is 108993-67).
Quoted 8 lines
The results were quite surprising as I distinctly remember having to insert those delimited cn entries for the benefit of Solaris back 3 years ago when we integrated LDAP into our enterprise. Bottom line, I see that a delimited entry is seemingly no longer needed. No matter what the test case that was run, the cn as described in the dn prevailed by default to appear as the stub. Oddly, when accessing a mount directly pathed as an alternate cn, it would mount and appear in that form. Here are notes from my testing below:
But you guys confirmed that the % hack is present in OpenSolaris so perhaps the patch below will provide the behavior we need.
Could someone try this patch out please.
---
modules/lookup_ldap.c +64
-34@@ -1226,34 +1226,50 @@ static int read_one_map(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) -continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* We have a result from LDAP so this is a +* valid entry. Set the result to the LDAP +* key that isn't a wildcard and doesn't have +* any "%" hack values present. This should be +* the case insensitive match string for the +* nis schema, the default value. +*/ k_val = bvKey[i]->bv_val; - k_len =1 ; + k_len = bvKey[i]->bv_len; +break ; }if (!k_val) {error (ap->logopt,MODPREFIX -"key %.*s has duplicate entries - ignoring" , +"invalid entry %.*s - ignoring" , bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); goto next; }@@ -1509,34 +1525,48 @@ static int lookup_one(struct autofs_point *ap,* value. */ count =ldap_count_values_len (bvKey); -if (count >2 ) { -error (ap->logopt, -MODPREFIX -"key %.*s has duplicate entries - ignoring" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); - goto next; - }else if (count ==2 ) { +if (count >1 ) {unsigned int i;/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) { -/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) + bvKey[i]->bv_val[bvKey[i]->bv_len] ='\0' ; + +/* +* If multiple entries are present they could +* be the result of people using the "%" hack so +* ignore them. +*/ +if (strchr (bvKey[i]->bv_val,'%' ))continue ; -if (*bvKey[i]->bv_val !='/' && - *bvKey[i]->bv_val !='*' ) -continue ; -/* always use '/' internally */ - *bvKey[i]->bv_val ='/' ; - k_val = bvKey[i]->bv_val; - k_len =1 ; + +/* check for wildcard */ +if (bvKey[i]->bv_len ==1 && + (*bvKey[i]->bv_val =='/' || + *bvKey[i]->bv_val =='*' )) { +/* always use '/' internally */ + *bvKey[i]->bv_val ='/' ; + k_val = bvKey[i]->bv_val; + k_len =1 ; +break ; + } + +/* +* The key was matched by LDAP so this is a +* valid entry. Set the result key to the +* lookup key to provide the mixed case +* matching provided by the "%" hack. +*/ + k_val = qKey; + k_len =strlen (qKey); +break ; }if (!k_val) {error (ap->logopt, -MODPREFIX "key %.*s has duplicate entries" , - bvKey[0 ]->bv_len, bvKey[0 ]->bv_val); +MODPREFIX "no valid key found for %.*s" , + qKey_len, qKey); ret =CHE_FAIL ; goto next; }
Ian Kent
maintainerQuoted 40 lines · Nail El-Sourani
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry /share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one: lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/java
Quoted 5 lines
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
I have no idea what the % symbol is for.
You may have been able to get away with this in version 4 but it's not valid to have multiple keys for a mount entry.
Ian
Quoted 47 lines · Nail El-Sourani
Quoted 40 lines
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry /share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one: lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaQuoted 5 lines
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Quoted 7 lines
I have no idea what the % symbol is for.
You may have been able to get away with this in version 4 but it's not valid to have multiple keys for a mount entry.Ian
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am seriously in need of some kind of workaround. is there any possibility?
thx a lot.
*nail
Ian Kent
maintainerQuoted 55 lines · On Thu, 2007-07-26 at 13:02 +0200, [email protected] wrote:
Quoted 47 lines · Nail El-Sourani
Quoted 40 lines
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and in general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry /share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one: lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaQuoted 5 lines
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this didnt seem to be a problem.
Quoted 7 lines
I have no idea what the % symbol is for.
You may have been able to get away with this in version 4 but it's not valid to have multiple keys for a mount entry.Ian
Quoted 5 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am seriously in need of some kind of workaround. is there any possibility?
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.
I wasn't aware of the Solaris % function.
I'll check when I get some time.
I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Ian
Quoted 69 lines · On Thu, 2007-07-26 at 13:02 +0200, [email protected] wrote:
Quoted 57 lines
Quoted 5 lines · Nail El-Sourani
Quoted 4 lines
hi everyone,
i seem to have a problem with autofs+ldap on duplicate entries. i migrated from autofs4 settings over to autofs5 quite successfully and
in
Quoted 36 lines
Quoted 36 lines
general everything seems to work fine. ill give u a working and nonworking example.
auto.master contains:
/share ldap:nisMapName=auto_packages,ou=ivv5,dc=de -nosuidldap queries on the path to automount give me:
ldapsearch -x -LLL cn=java
working:
objectClass: nisObject
objectClass: top
cn: Java
nisMapEntry: ...
nisMapName:auto_package...like the above, the autofs5 mounts with no problem.
but this one, not working:
objectClass: nisObject
objectClass: top
cn: Java
cn: %Java
nisMapEntry: ...
nisMapName:auto_package...gives in
/var/log/messagesaJul 25 14:22:45 SEMTEX automount[4872]: attempting to mount entry /share/java Jul 25 14:22:45 SEMTEX automount[4872]: lookup_one: lookup(ldap): key Java has duplicate entries Jul 25 14:22:45 SEMTEX automount[4872]: failed to mount /share/javaQuoted 4 lines
Quoted 4 lines
As I believe, there seems to be a Problem with cn:Java and cn:%Java somehow. As I understand the % seems to be there to enable both upper-and lowercase typing (java, Java) when entering the Path on the commandline (cd /share/Java, /share/java). Anyhow. in autofs4 this
didnt
Quoted 9 lines
Quoted 1 line
seem to be a problem.
I have no idea what the % symbol is for.
You may have been able to get away with this in version 4 but it's not valid to have multiple keys for a mount entry.Ian
Quoted 6 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.
Quoted 9 lines
I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Ian
hi ian,
this would be perfect and greatly appreciated :-) feel free to contact me as soon as there's any news on this issue.
*nail
Ian Kent
maintainerQuoted 7 lines · On Thu, 2007-07-26 at 15:56 +0200, [email protected] wrote:
Quoted 7 lines
Quoted 7 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?
Can you point me to any official documentation that describes exactly how this % hack is supposed to work?
Quoted 10 lines
Quoted 10 lines
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Could you try this patch for the work around please. Ian
---
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.ignore-duplicates +18 -2
@@ -1238,7 +1238,15 @@ static int read_one_map(struct autofs_po/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )
@@ -1521,7 +1529,15 @@ static int lookup_one(struct autofs_poin/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )
Hi Ian,
tried to get your patch working. Using CentOS5 which comes with autofs5.0.1-0.rc2-43... i needed to upgrade to 5.0.2. though. did this from http://www.kernel.org/pub/linux/daemons/autofs/v5/, patching all patches for 5.0.2 as described in patch order, then applied the patch u sent me....
AND
it works!
thx a lot. Do you think this patch or something similar will make it into mainline?
*nail
Quoted 62 lines · Ian Kent
Quoted 6 lines · On Thu, 2007-07-26 at 15:56 +0200, [email protected] wrote:
Quoted 6 lines
Quoted 6 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?Can you point me to any official documentation that describes exactly how this % hack is supposed to work?
Quoted 9 lines
Quoted 9 lines
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Could you try this patch for the work around please. Ian
---
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.ignore-duplicates +18
-2@@ -1238,7 +1238,15 @@ static int read_one_map(struct autofs_po/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )@@ -1521,7 +1529,15 @@ static int lookup_one(struct autofs_poin/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )
Ian Kent
maintainerQuoted 7 lines · Nail El-Sourani
Hi Ian,
tried to get your patch working. Using CentOS5 which comes with autofs5.0.1-0.rc2-43... i needed to upgrade to 5.0.2. though. did this from http://www.kernel.org/pub/linux/daemons/autofs/v5/, patching all patches for 5.0.2 as described in patch order, then applied the patch u sent me....
Yes, thought you might encounter that problem, as there was a change to deal with wildcard map entry inconsistency in later versions.
Quoted 73 lines
AND
it works!
thx a lot. Do you think this patch or something similar will make it into mainline?
*nail
Quoted 62 lines · Ian Kent
Quoted 6 lines · On Thu, 2007-07-26 at 15:56 +0200, [email protected] wrote:
Quoted 6 lines
Quoted 6 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?Can you point me to any official documentation that describes exactly how this % hack is supposed to work?
Quoted 9 lines
Quoted 9 lines
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Could you try this patch for the work around please. Ian
---
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.ignore-duplicates +18
-2@@ -1238,7 +1238,15 @@ static int read_one_map(struct autofs_po/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )@@ -1521,7 +1529,15 @@ static int lookup_one(struct autofs_poin/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )
Oh! Seems i was too fast with my positiv answer. Your patch checks for % only at first position. so when cn: gives something like
cn:ja%Va
it will still give duplicate entry error. what needs to be modified in your patch to take first entry when any other one "contains" the %.
love,
*nail
Quoted 62 lines · Ian Kent
Quoted 6 lines · On Thu, 2007-07-26 at 15:56 +0200, [email protected] wrote:
Quoted 6 lines
Quoted 6 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?Can you point me to any official documentation that describes exactly how this % hack is supposed to work?
Quoted 9 lines
Quoted 9 lines
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Could you try this patch for the work around please. Ian
---
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.ignore-duplicates +18
-2@@ -1238,7 +1238,15 @@ static int read_one_map(struct autofs_po/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )@@ -1521,7 +1529,15 @@ static int lookup_one(struct autofs_poin/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )
Ian Kent
maintainerQuoted 7 lines · Nail El-Sourani
Oh! Seems i was too fast with my positiv answer. Your patch checks for % only at first position. so when cn: gives something like
cn:ja%Va
it will still give duplicate entry error. what needs to be modified in your patch to take first entry when any other one "contains" the %.
I'll sort that out, but a real fix will have to wait for further discussion about how this should be handled.
Quoted 67 lines
love,
*nailQuoted 62 lines · Ian Kent
Quoted 6 lines · On Thu, 2007-07-26 at 15:56 +0200, [email protected] wrote:
Quoted 6 lines
Quoted 6 lines
Actually this is an LDAP mixed environment with solaris and linux. The Solaris Automounter will look for %Java by default to ignore case-sensitivity. Is there an option on autofs5 to take the first entry for a key in case there are duplicate entries? if so, how is it done? i am
seriously in need of some kind of workaround. is there any possibility?Can you point me to any official documentation that describes exactly how this % hack is supposed to work?
Quoted 9 lines
Quoted 9 lines
There isn't .
This would conflict with the work that was done to reduce the number of queries to LDAP servers.I wasn't aware of the Solaris % function.
I'll check when I get some time.I could try and make a one-off patch to just use the first entry as a work around for you till we work out what to do about the % thingy.
Could you try this patch for the work around please. Ian
---
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.ignore-duplicates +18
-2@@ -1238,7 +1238,15 @@ static int read_one_map(struct autofs_po/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )@@ -1521,7 +1529,15 @@ static int lookup_one(struct autofs_poin/* Check for the "/" and "*" and use as "/" if found */ for (i =0 ; i < count; i++) {/* check for wildcard */ -if (bvKey[i]->bv_len !=1 ) +if (bvKey[i]->bv_len >1 ) { +/* Sun % hack workaround */ +if (*bvKey[i]->bv_val =='%' ) { + k_val = bvKey[0 ]->bv_val; + k_len = bvKey[0 ]->bv_len; +break ; + } +continue ; + }else if (bvKey[i]->bv_len !=1 )continue ;if (*bvKey[i]->bv_val !='/' && *bvKey[i]->bv_val !='*' )