Initial commit
This commit is contained in:
parent
c785944bae
commit
f3b692ea5b
34 changed files with 1449 additions and 0 deletions
19
contrib/etc/generate_container_user
Normal file
19
contrib/etc/generate_container_user
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Set current user in nss_wrapper
|
||||
USER_ID=$(id -u)
|
||||
GROUP_ID=$(id -g)
|
||||
|
||||
if [ x"$USER_ID" != x"0" -a x"$USER_ID" != x"1001" ]; then
|
||||
|
||||
NSS_WRAPPER_PASSWD=/opt/app-root/etc/passwd
|
||||
NSS_WRAPPER_GROUP=/etc/group
|
||||
|
||||
cat /etc/passwd | sed -e 's/^default:/builder:/' > $NSS_WRAPPER_PASSWD
|
||||
|
||||
echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/sbin/nologin" >> $NSS_WRAPPER_PASSWD
|
||||
|
||||
export NSS_WRAPPER_PASSWD
|
||||
export NSS_WRAPPER_GROUP
|
||||
|
||||
LD_PRELOAD=libnss_wrapper.so
|
||||
export LD_PRELOAD
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue