mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-19 18:45:09 +03:00
pmb: chroot: set user shell explicitly
If the host environment leaks in we might set the wrong shell! Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
parent
a3de41ff59
commit
96bfb7fd33
1 changed files with 3 additions and 1 deletions
|
@ -168,7 +168,9 @@ def init(chroot: Chroot, usr_merge: UsrMerge = UsrMerge.AUTO) -> None:
|
|||
|
||||
# Building chroots: create "pmos" user, add symlinks to /home/pmos
|
||||
if not chroot.type == ChrootType.ROOTFS:
|
||||
pmb.chroot.root(["adduser", "-D", "pmos", "-u", pmb.config.chroot_uid_user], chroot)
|
||||
pmb.chroot.root(
|
||||
["adduser", "-s", "/bin/sh", "-D", "pmos", "-u", pmb.config.chroot_uid_user], chroot
|
||||
)
|
||||
|
||||
# Create the links (with subfolders if necessary)
|
||||
for target, link_name in pmb.config.chroot_home_symlinks.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue