From 6ffbb9b04d9410a6c24f756ceb1b085b6e31b5ce Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 1 Dec 2007 19:19:20 +0000 Subject: [PATCH] Fix dirsep chars before opening file --- libraries/liblutil/fetch.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c index 104aa45179..9ddc82dd35 100644 --- a/libraries/liblutil/fetch.c +++ b/libraries/liblutil/fetch.c @@ -57,6 +57,14 @@ ldif_open_url( } p = ber_strdup( urlstr ); + + /* But we should convert to LDAP_DIRSEP before use */ + if ( LDAP_DIRSEP[0] != '/' ) { + char *s = p; + while (( s = strchr( s, '/' ))) + *s++ = LDAP_DIRSEP[0]; + } + ldap_pvt_hex_unescape( p ); url = fopen( p, "rb" ); -- 2.39.5