Skip to content

Commit

Permalink
[v5.1] pkg/rootless: set _CONTAINERS_USERNS_CONFIGURED
Browse files Browse the repository at this point in the history
... correctly

I tried to cherry pick 7c5c60b from @Luap99, however the
git cherry-pick wasn't having it.  I've made the changes
"by hand" to set _CONTAINERS_USERNS_CONFIGURED from init
to done in pkg/rootless/rootless_linux.c

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
  • Loading branch information
TomSweeneyRedHat committed Jun 4, 2024
1 parent 5359846 commit 4dc75c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ reexec_userns_join (int pid_to_join, char *pause_pid_file_path)
setenv ("LISTEN_FDNAMES", saved_systemd_listen_fdnames, true);
}

setenv ("_CONTAINERS_USERNS_CONFIGURED", "init", 1);
setenv ("_CONTAINERS_USERNS_CONFIGURED", "done", 1);
setenv ("_CONTAINERS_ROOTLESS_UID", uid, 1);
setenv ("_CONTAINERS_ROOTLESS_GID", gid, 1);

Expand Down Expand Up @@ -1081,7 +1081,7 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
setenv ("LISTEN_FDNAMES", saved_systemd_listen_fdnames, true);
}

setenv ("_CONTAINERS_USERNS_CONFIGURED", "init", 1);
setenv ("_CONTAINERS_USERNS_CONFIGURED", "done", 1);
setenv ("_CONTAINERS_ROOTLESS_UID", uid, 1);
setenv ("_CONTAINERS_ROOTLESS_GID", gid, 1);

Expand Down

0 comments on commit 4dc75c6

Please sign in to comment.