diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-21 00:18:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 00:18:24 -0700 |
commit | f446ccf0b050f5577328e5ba3efcdb5cafaae254 (patch) | |
tree | b096ac639c990415c5477f9a8d0f5fbed8e1d9b3 /pkg/rootless | |
parent | 39fdf91ba696b481ea64634c12a5fdbf58f2969b (diff) | |
parent | 3cf3ccbd776ab456949809b092aa06bb00234ada (diff) | |
download | podman-f446ccf0b050f5577328e5ba3efcdb5cafaae254.tar.gz podman-f446ccf0b050f5577328e5ba3efcdb5cafaae254.tar.bz2 podman-f446ccf0b050f5577328e5ba3efcdb5cafaae254.zip |
Merge pull request #3379 from openSUSE/rootless-fix
Fix format specifiers in rootless_linux.c
Diffstat (limited to 'pkg/rootless')
-rw-r--r-- | pkg/rootless/rootless_linux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 26dfc7b31..c409e3343 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -295,7 +295,7 @@ static void __attribute__((constructor)) init() uid = geteuid (); gid = getegid (); - sprintf (path, "/proc/%d/ns/user", pid); + sprintf (path, "/proc/%ld/ns/user", pid); fd = open (path, O_RDONLY); if (fd < 0 || setns (fd, 0) < 0) { @@ -305,7 +305,7 @@ static void __attribute__((constructor)) init() close (fd); /* Errors here cannot be ignored as we already joined a ns. */ - sprintf (path, "/proc/%d/ns/mnt", pid); + sprintf (path, "/proc/%ld/ns/mnt", pid); fd = open (path, O_RDONLY); if (fd < 0) { @@ -316,7 +316,7 @@ static void __attribute__((constructor)) init() r = setns (fd, 0); if (r < 0) { - fprintf (stderr, "cannot join mount namespace for %d: %s", pid, strerror (errno)); + fprintf (stderr, "cannot join mount namespace for %ld: %s", pid, strerror (errno)); exit (EXIT_FAILURE); } close (fd); |