Skip to content

Commit

Permalink
Merge pull request containers#9436 from jonas-schievink/patch-1
Browse files Browse the repository at this point in the history
[NO TESTS NEEDED] Log working dir when chdir fails
  • Loading branch information
openshift-merge-robot authored Feb 21, 2021
2 parents 19e5661 + 43a5819 commit 4a6582b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 4a6582b

Please sign in to comment.