We use this tool to enter all the namespaces associated with the systemd process.
- add proper PAM session/login (shadow-utils/login)
- reimplement nsenter to avoid external call
- reimplement pgrep to avoid external call
- move everything to a single C file
- add install script
- /etc/wsl.conf
- improved /etc/profile
- [-] adopt the suckless C coding style
Other services to be started with systemd
- keyring/secretservice (gnome-keyring)
- ssh-agent (or above)
- gpg-agent (or above)
- keybase (without gui)
We use the procps
library to find the oldest systemd
process, and get its pid.
In order to enter the systemd
process namespace we need to know the following:
- pid of
systemd
process, - the path of
cwd
, - uid of the current user,
- gid of the current user,
- the path to shell.
After that, we enter the following namespaces,
- the
pid
namespace, as we need a fresh namespace for thesystemd
process to run as PID 1, and - the
mnt
namespace, as we need a fresh namespace for the/proc
filesystem that matches the newpid
namespace.
After that we need to login the user and set all the permissions correctly.
Technically, the user is already logged in, however we did not perform