more close-on-exec fixes, mostly using new "e" flag to fopen
[musl] / src / ldso / dynlink.c
index d0b57e8..960e089 100644 (file)
@@ -438,7 +438,7 @@ static struct dso *load_library(const char *name)
                if (fd < 0 && env_path) fd = path_open(name, env_path, buf, sizeof buf);
                if (fd < 0) {
                        if (!sys_path) {
-                               FILE *f = fopen(ETC_LDSO_PATH, "r");
+                               FILE *f = fopen(ETC_LDSO_PATH, "rbe");
                                if (f) {
                                        if (getline(&sys_path, (size_t[1]){0}, f) > 0)
                                                sys_path[strlen(sys_path)-1]=0;