× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



PROC

----



P ConnPass B Export
D ConnPass PI LikeDS(DSRV_Parms)
D User 132
D Pass 132

D DSRV_PTR S *
D rtnVal S LIKE(RtnSuccess)

D Wrk_Connector DS LikeDS(DSRV_Connector)
D rtnString S 256a Inz(*BLANKS)



/Free

DSRV_PTR = ldap_init('172.26.252.225':389);
rtnVal = ldap_simple_bind_s(DSRV_PTR:User:Pass);

Wrk_Connector.ConnectPtr = DSRV_PTR;



NOTE: --> DSRV_PTR is valid

NOTE: --> rtnVal = Invalid Credentials



NOTE: -> I have tried 20 different decorations of the User

NOTE: -> I have used an LDAP Browser written in Java and the
credentials work



If rtnVal = LDAP_SUCCESS;
Wrk_Connector.Success = TRUE;
Else;
Wrk_Connector.Success = FALSE;
rtnVal = ldap_get_errno(DSRV_PTR);
rtnString = GetLastErr(rtnVal);
EndIf;

Return Wrk_Connector;

/End-Free



P ConnPass E



Calling PROC
------------



Username = 'MYDOMAIN/USER';
Password = 'xxxxxxx';


Wrk_Connector = ConnPass(Username:Password);


If Wrk_Connector.Success = 1;



rtnString = 'SUCCESS';

base = 'DC=XXXXXX,DC=EXT';
attrsOnly = 0; // names and values returned
scope = 2;

AttrVal(1) = 'CN' + x'00';
AttrPtr(1) = %addr(AttrVal(1));
AttrPtr(2) = *NULL;

p_timeval = %addr(timeoutVal);
tv_sec = 120;
tv_usec = 0;

filter = '(&(objectclass=*)(uid=dalucas))';



Wrk_DtStruct = DSRV_Search(Wrk_Connector.ConnectPtr
: base
: scope
: filter
: AttrVal
: attrsOnly
: timeoutVal
: message);



If Wrk_DtStruct.RtnLastError = 0; // SUCCESS
rtnString = %Str(message);
Else;
rtnString = GetLastErr(Wrk_DtStruct.RtnLastError);
EndIf;

EndIf;






No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.549 / Virus Database: 270.9.9/1805 - Release Date: 11/22/2008
10:34 AM


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.