At least for the two common Unixly DSO loading methods, include the
authorRichard Levitte <levitte@openssl.org>
Thu, 15 Nov 2001 18:24:42 +0000 (18:24 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 15 Nov 2001 18:24:42 +0000 (18:24 +0000)
system error in the error text.

crypto/dso/dso_dl.c
crypto/dso/dso_dlfcn.c

index 6e93268..195717e 100644 (file)
@@ -130,7 +130,8 @@ static int dl_load(DSO *dso)
        if(ptr == NULL)
                {
                DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
-               ERR_add_error_data(3, "filename(", filename, ")");
+               ERR_add_error_data(4, "filename(", filename, "): ",
+                       strerror(errno));
                goto err;
                }
        if(!sk_push(dso->meth_data, (char *)ptr))
@@ -199,7 +200,8 @@ static void *dl_bind_var(DSO *dso, const char *symname)
        if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
                {
                DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE);
-               ERR_add_error_data(3, "symname(", symname, ")");
+               ERR_add_error_data(4, "symname(", symname, "): ",
+                       strerror(errno));
                return(NULL);
                }
        return(sym);
@@ -229,7 +231,8 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
        if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
                {
                DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE);
-               ERR_add_error_data(3, "symname(", symname, ")");
+               ERR_add_error_data(4, "symname(", symname, "): ",
+                       strerror(errno));
                return(NULL);
                }
        return((DSO_FUNC_TYPE)sym);
index 681e978..1a19164 100644 (file)
@@ -147,7 +147,7 @@ static int dlfcn_load(DSO *dso)
        if(ptr == NULL)
                {
                DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED);
-               ERR_add_error_data(3, "filename(", filename, ")");
+               ERR_add_error_data(4, "filename(", filename, "): ", dlerror());
                goto err;
                }
        if(!sk_push(dso->meth_data, (char *)ptr))
@@ -215,7 +215,7 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_SYM_FAILURE);
-               ERR_add_error_data(3, "symname(", symname, ")");
+               ERR_add_error_data(4, "symname(", symname, "): ", dlerror());
                return(NULL);
                }
        return(sym);
@@ -246,7 +246,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE);
-               ERR_add_error_data(3, "symname(", symname, ")");
+               ERR_add_error_data(4, "symname(", symname, "): ", dlerror());
                return(NULL);
                }
        return(sym);