URL files in an ldif file are not being read properly on non Unix systems. The binary option needs to be set. In addition, the code clobbers the address of the buffer just realloc'd with the address of the original buffer, which may cause memory corruption. -Steve Sonntag -Alan Clark See below: =================================================================== RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldif/fetch.c,v retrieving revision 1.8 diff -w -u -r1.8 fetch.c --- fetch.c 2000/05/13 00:38:40 1.8 +++ fetch.c 2000/06/20 17:10:51 @@ -59,7 +59,7 @@ p = ber_strdup( p ); ldap_pvt_hex_unescape( p ); - url = fopen( p, "r" ); + url = fopen( p, "rb" ); } else { return -1; @@ -79,7 +79,7 @@ fclose( url ); return -1; } - newp = p; + p = newp; SAFEMEMCPY( &p[total], buffer, bytes ); total += bytes; }
Patch applied, thanks. Kurt At 05:22 PM 6/20/00 GMT, vtag@novell.com wrote: >URL files in an ldif file are not being read properly on non Unix systems. > >The binary option needs to be set. In addition, the code clobbers >the address of the buffer just realloc'd with the address of the >original buffer, which may cause memory corruption. > >-Steve Sonntag >-Alan Clark > >See below: > >=================================================================== >RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldif/fetch.c,v >retrieving revision 1.8 >diff -w -u -r1.8 fetch.c >--- fetch.c 2000/05/13 00:38:40 1.8 >+++ fetch.c 2000/06/20 17:10:51 >@@ -59,7 +59,7 @@ > p = ber_strdup( p ); > ldap_pvt_hex_unescape( p ); > >- url = fopen( p, "r" ); >+ url = fopen( p, "rb" ); > > } else { > return -1; >@@ -79,7 +79,7 @@ > fclose( url ); > return -1; > } >- newp = p; >+ p = newp; > SAFEMEMCPY( &p[total], buffer, bytes ); > total += bytes; > } > > >
changed notes changed state Open to Closed moved from Incoming to Development
Hi, from where to get that patched ldapmodify binary ? Once, I've got ldapmodify while installing the netscape directory server (trial version V4.11) and I even used that sometimes in the past. Now, I want to use ldapmodify for loading data via LDIF that is specificly defined in URL files. Unfortunately, that bounced however with "ldap_add: Operations error". If you could send me a patched ldapmodfiy binary that would be great. Thanks for your help, Leo. ---------------------------------------------------------------------------- ----------------------------- Leopold Gann, Siemens AG, Otto-Hahn-Ring 6, 81730 Munich, Germany Email: Leopold.Gann@icn.siemens.de SiemensOfficePhone. : +49-89-636-46143 ( Wednesday and Friday ) SiemensOfficeFax: +49-89-636-45860 HomeOfficePhone: +43-7742-58115
The project only provides it wares in source form. http://www.openldap.org/software/ As far as problems using Netscape products, please contact Netscape or use support forums specific to Netscape. http://www.iplanet.com/ Kurt At 07:24 AM 1/12/01 +0000, leopold.gann@icn.siemens.de wrote: >Hi, > >from where to get that patched ldapmodify binary ? Once, I've got ldapmodify >while installing the netscape >directory server (trial version V4.11) and I even used that sometimes in the >past. Now, I want >to use ldapmodify for loading data via LDIF that is specificly defined in >URL files. Unfortunately, that >bounced however with "ldap_add: Operations error". If you could send me a >patched ldapmodfiy >binary that would be great. > >Thanks for your help, >Leo. >---------------------------------------------------------------------------- >----------------------------- >Leopold Gann, Siemens AG, Otto-Hahn-Ring 6, 81730 Munich, Germany >Email: Leopold.Gann@icn.siemens.de >SiemensOfficePhone. : +49-89-636-46143 ( Wednesday and Friday ) >SiemensOfficeFax: +49-89-636-45860 >HomeOfficePhone: +43-7742-58115
applied