aboutsummaryrefslogtreecommitdiff
path: root/pkg/rootless
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/rootless')
-rw-r--r--pkg/rootless/rootless_linux.c12
-rw-r--r--pkg/rootless/rootless_linux.go2
2 files changed, 9 insertions, 5 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index 2e1fddc48..d93e4c10c 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -196,7 +196,11 @@ can_use_shortcut ()
return false;
if (strstr (argv[0], "podman") == NULL)
- return false;
+ {
+ free (argv[0]);
+ free (argv);
+ return false;
+ }
for (argc = 0; argv[argc]; argc++)
{
@@ -394,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);
}
@@ -685,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);
@@ -889,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);
}
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index d4b1a0dfd..dda230dbc 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -16,7 +16,7 @@ import (
"sync"
"unsafe"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/containers/storage/pkg/idtools"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"