+ /* We do a push_dir() without actually calling chdir() in order
+ * to make sure that the module's path is absolute. After this
+ * check, module_dir will be set to an absolute path. */
+ module_dir = lp_path(i);
+ strlcpy(line, curr_dir, sizeof line);
+ if (!push_dir(module_dir, 1))
+ goto chdir_failed;
+ if (strcmp(curr_dir, module_dir) != 0)
+ module_dir = strdup(curr_dir);
+ push_dir(line, 1); /* Restore curr_dir. */
+
+ if (use_chroot || (module_dirlen = strlen(module_dir)) == 1) {