summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2019-09-12 13:55:41 +0300
committerPanu Matilainen <pmatilai@redhat.com>2019-11-18 12:46:29 +0200
commitcb05cd58a62a33f34c965a7780f61b62122e7839 (patch)
tree5edcb6cb753a11c7549eec26716c4be96bdccafd
parente2f70fc1d26efa72009048fa1e1de5660cd2e25b (diff)
downloadrpm-cb05cd58a62a33f34c965a7780f61b62122e7839.tar.gz
Log debug messages upon entering and exiting chroot
(cherry picked from commit 858d6babd6d9af3c91a152c3abc67122f80990e6)
-rw-r--r--lib/rpmchroot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rpmchroot.c b/lib/rpmchroot.c
index 88be3c212..efaa74fd0 100644
--- a/lib/rpmchroot.c
+++ b/lib/rpmchroot.c
@@ -124,6 +124,7 @@ int rpmChrootIn(void)
if (!_rpm_nouserns && getuid())
try_become_root();
+ rpmlog(RPMLOG_DEBUG, "entering chroot %s\n", rootState.rootDir);
if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) {
rootState.chrootDone = 1;
} else {
@@ -149,6 +150,7 @@ int rpmChrootOut(void)
if (rootState.chrootDone > 1) {
rootState.chrootDone--;
} else if (rootState.chrootDone == 1) {
+ rpmlog(RPMLOG_DEBUG, "exiting chroot %s\n", rootState.rootDir);
if (chroot(".") == 0 && fchdir(rootState.cwd) == 0) {
rootState.chrootDone = 0;
} else {