[Nagios-devel] patch to clean name with ldap auth

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] patch to clean name with ldap auth

Post by Guest »

------=_Part_110499_31756637.1178890590499
Content-Type: multipart/alternative;
boundary="----=_Part_110500_17012369.1178890590499"

------=_Part_110500_17012369.1178890590499
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I use Nagios with LDAP authentification via mod_authz_ldap on RHEL3. But
with this module, the username is format like this :
CN=detrak,DC=MY,DC=ORGANISATION,DC=ORG

I have patch the find_contact function, to match this string with the
username, I have put in my contacts.cfg : detrak in this example.


Best regards,
Det.

------=_Part_110500_17012369.1178890590499
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,I use Nagios with LDAP authentification via mod_authz_ldap on RHEL3. But with this module, the username is format like this : CN=detrak,DC=MY,DC=ORGANISATION,DC=ORGI have patch the find_contact function, to match this string with the username, I have put in my
contacts.cfg : detrak in this example. Best regards,Det.

------=_Part_110500_17012369.1178890590499--

------=_Part_110499_31756637.1178890590499
Content-Type: application/octet-stream; name=patch.ldap
Content-Transfer-Encoding: base64
X-Attachment-Id: f_f1koy20r
Content-Disposition: attachment; filename="patch.ldap"

ZGlmZiAtciBuYWdpb3MtMi45L2NvbW1vbi9vYmplY3RzLmMgbmFnaW9zLTIuOS0xL2NvbW1vbi9v
YmplY3RzLmMKNDg2NmE0ODY3Cj4gCjQ4OThhNDkwMCw0OTExCj4gLyogY2xlYW4gY29udGFjdCBu
YW1lIDogIENOPWZvbyxEQz1jb21wYW55LERDPU9SRyA9PiByZXR1cm4gImZvbyIgKi8KPiBzdGF0
aWMgY2hhciogY2xlYW5fY29udGFjdG5hbWUoY29uc3QgY2hhciogbmFtZSl7Cj4gICAgIGNoYXIq
IHRtcCwgKmVuZDsKPiAgICAgaWYoKHRtcD1zdHJjaHIobmFtZSwnPScpKSE9TlVMTCl7Cj4gICAg
ICAgICB0bXAgPSBzdHJkdXAoKyt0bXApOwo+ICAgICAgICAgZW5kID0gc3RyY2hyKHRtcCwnLCcp
OyAKPiAgICAgICAgICplbmQ9J1wwJzsKPiAKPiAgICAgICAgIHJldHVybiB0bXA7Cj4gICAgIH0K
PiAgICAgcmV0dXJuIHN0cmR1cChuYW1lKTsKPiB9CjQ5MTBjNDkyMwo8IAotLS0KPiAgICAgICBu
YW1lPWNsZWFuX2NvbnRhY3RuYW1lKG5hbWUpOwo0OTEzYzQ5MjYsNDkyNwo8ICAgICAgIGlmKHRl
bXBfY29udGFjdCAmJiAoY29tcGFyZV9oYXNoZGF0YTEodGVtcF9jb250YWN0LT5uYW1lLG5hbWUp
PT0wKSkKLS0tCj4gICAgICAgaWYodGVtcF9jb250YWN0ICYmIChjb21wYXJlX2hhc2hkYXRhMSh0
ZW1wX2NvbnRhY3QtPm5hbWUsbmFtZSk9PTApKXsKPiAgICAgICAgICAgICAgIGZyZWUobmFtZSk7
CjQ5MTVjNDkyOSw0OTMwCjwgCi0tLQo+ICAgICAgIH0KPiAgICAgICBmcmVlKG5hbWUpOwoK
------=_Part_110499_31756637.1178890590499--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked