summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-21 10:51:47 -0500
committerGitHub <noreply@github.com>2021-02-21 10:51:47 -0500
commit4a6582bd86572f0336c82577a0a4f315376c7179 (patch)
tree11e2ee21ac574a7e72294d09038c3e97525fd606 /pkg
parent19e56616998de842cd4f576da6a0eca113347c7a (diff)
parent43a581904f0725082298f1d026399e1d05bbc33f (diff)
downloadpodman-4a6582bd86572f0336c82577a0a4f315376c7179.tar.gz
podman-4a6582bd86572f0336c82577a0a4f315376c7179.tar.bz2
podman-4a6582bd86572f0336c82577a0a4f315376c7179.zip
Merge pull request #9436 from jonas-schievink/patch-1
[NO TESTS NEEDED] Log working dir when chdir fails
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rootless/rootless_linux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index d588d848b..d93e4c10c 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -398,7 +398,7 @@ static void __attribute__((constructor)) init()
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
_exit (EXIT_FAILURE);
}
@@ -689,7 +689,7 @@ reexec_userns_join (int pid_to_join, char *pause_pid_file_path)
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
_exit (EXIT_FAILURE);
}
free (cwd);
@@ -893,7 +893,7 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
TEMP_FAILURE_RETRY (write (ready, "1", 1));
_exit (EXIT_FAILURE);
}