=== modified file 'service_scripts/alsa/run' --- old/service_scripts/alsa/run 2022-10-12 20:57:05 +0000 +++ new/service_scripts/alsa/run 2022-06-25 13:31:03 +0000 @@ -1,4 +1,4 @@ -#!/command/execlineb -P +#!/command/execlineb fdmove -c 2 1 s6-envdir env @@ -12,7 +12,6 @@ define CONTAINER_TMPFS /run/containers/${CONTAINER_NAME}.${CONTAINER_USER} # define CONTAINER_DATA /mnt/volumes/containers/user/${CONTAINER_USER}/${CONTAINER_NAME} define -s tmpfs_dirs "home run tmp inbox run/inbox tmp/.X11-unix" - importas -D ns -s -C -u CONTAINER_MNT_DIRS CONTAINER_MNT_DIRS } getpid NS_PID @@ -25,21 +24,13 @@ } if { rm -rf ${CONTAINER_TMPFS} } -if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} ${CONTAINER_TMPFS}/mnt/${CONTAINER_MNT_DIRS} } +if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chmod 1770 ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chown root:${CONTAINER_USER} ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { mount -a --fstab data/fstab } -# Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below -s6-envuidgid ${CONTAINER_USER} - -# Run user's setup script (optional) -if { - if -n -t { s6-test -e ${CONTAINER_USER_HOME}/container-setup } - env HOME=${CONTAINER_USER_HOME} USER=${CONTAINER_USER} - s6-applyuidgid -U - ${CONTAINER_USER_HOME}/container-setup ${CONTAINER_TMPFS} ${CONTAINER_NAME} -} +# Put UID/GID of user and their exclusive group (same group name as user name) +#s6-envuidgid -B ${CONTAINER_USER}:${CONTAINER_USER} #multisubstitute { importas -i UID UID importas -i GID GID } env @@ -51,7 +42,9 @@ if { ip addr add 127.0.0.1/8 dev lo } if { ip addr add ::1/128 dev lo } if { ip link set lo up } + # Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below +s6-envuidgid ${CONTAINER_USER} emptyenv -c ns_run data/root /mnt/ns/bin/s6-applyuidgid -U === modified file 'service_scripts/generic/run' --- old/service_scripts/generic/run 2022-10-12 20:57:05 +0000 +++ new/service_scripts/generic/run 2022-10-12 14:32:33 +0000 @@ -36,7 +36,7 @@ # Run user's setup script (optional) if { if -n -t { s6-test -e ${CONTAINER_USER_HOME}/container-setup } - env HOME=${CONTAINER_USER_HOME} USER=${CONTAINER_USER} + env HOME=${CONTAINER_USER_HOME} s6-applyuidgid -U ${CONTAINER_USER_HOME}/container-setup ${CONTAINER_TMPFS} ${CONTAINER_NAME} } === modified file 'service_scripts/xsession/run' --- old/service_scripts/xsession/run 2022-10-12 20:57:05 +0000 +++ new/service_scripts/xsession/run 2022-10-12 14:32:33 +0000 @@ -36,7 +36,7 @@ # Run user's script to populate /home /run and/or /tmp if { - env HOME=${CONTAINER_USER_HOME} USER=${CONTAINER_USER} + env HOME=${CONTAINER_USER_HOME} s6-applyuidgid -U ${CONTAINER_USER_HOME}/xsession-setup ${CONTAINER_TMPFS} ${vtN} }