diff options
-rw-r--r-- | lib/rpmchroot.c | 5 | ||||
-rw-r--r-- | lib/rpmrc.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/rpmchroot.c b/lib/rpmchroot.c index 4f2ca77cd..400e285b5 100644 --- a/lib/rpmchroot.c +++ b/lib/rpmchroot.c @@ -5,6 +5,7 @@ #include <rpm/rpmstring.h> #include <rpm/rpmlog.h> #include "lib/rpmchroot.h" +#include "lib/rpmug.h" #include "debug.h" int _rpm_nouserns = 0; @@ -101,6 +102,10 @@ int rpmChrootSet(const char *rootDir) rpmlog(RPMLOG_ERR, _("Unable to open current directory: %m\n")); rc = -1; } + + /* Force preloading of dlopen()'ed libraries before chroot */ + if (rpmugInit()) + rc = -1; } return rc; diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 77a8708fb..e707ab238 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -35,7 +35,6 @@ #include "rpmio/rpmlua.h" #include "rpmio/rpmio_internal.h" /* XXX for rpmioSlurp */ #include "lib/misc.h" -#include "lib/rpmug.h" #include "debug.h" @@ -1632,10 +1631,6 @@ int rpmReadConfigFiles(const char * file, const char * target) pthread_once(&atexit_registered, register_atexit); - /* Force preloading of dlopen()'ed libraries in case we go chrooting */ - if (rpmugInit()) - goto exit; - if (rpmInitCrypto()) goto exit; |