+2010-04-05 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #11149]
+ * elf/ldconfig.c (main): Respect chroot setting when looking for
+ the aux cache.
+
2010-04-04 Ulrich Drepper <drepper@redhat.com>
[BZ #11043]
p ? (*p = '\0', cache_file) : "/");
if (canon == NULL)
- {
- error (EXIT_FAILURE, errno,
- _("Can't open cache file directory %s\n"),
- p ? cache_file : "/");
- }
+ error (EXIT_FAILURE, errno,
+ _("Can't open cache file directory %s\n"),
+ p ? cache_file : "/");
if (p)
++p;
add_system_dir (LIBDIR);
}
+ char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
+ if (opt_chroot)
+ {
+ aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
+ if (aux_cache_file == NULL)
+ error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
+ _PATH_LDCONFIG_AUX_CACHE);
+ }
+
if (! opt_ignore_aux_cache)
- load_aux_cache (_PATH_LDCONFIG_AUX_CACHE);
+ load_aux_cache (aux_cache_file);
else
init_aux_cache ();
if (opt_build_cache)
{
save_cache (cache_file);
- save_aux_cache (_PATH_LDCONFIG_AUX_CACHE);
+ save_aux_cache (aux_cache_file);
}
return 0;