aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2021-02-19 13:57:08 +0100
committerJonas Schievink <jonasschievink@gmail.com>2021-02-19 17:04:38 +0100
commit43a581904f0725082298f1d026399e1d05bbc33f (patch)
tree97a819886b835e2f0883978793c5d049f49a00eb /pkg
parentb6db60e58f2f5abb4902c28c91e770495f3d4926 (diff)
downloadpodman-43a581904f0725082298f1d026399e1d05bbc33f.tar.gz
podman-43a581904f0725082298f1d026399e1d05bbc33f.tar.bz2
podman-43a581904f0725082298f1d026399e1d05bbc33f.zip
Log working dir when chdir fails
Signed-off-by: Jonas Schievink <jonasschievink@gmail.com>
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);
}