Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Rootless #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ln -s /container/tool/* /sbin/

mkdir -p /container/service
mkdir -p /container/environment /container/environment/startup
chmod 700 /container/environment/ /container/environment/startup
chmod g+rwX /container/environment/ /container/environment/startup

groupadd -g 8377 docker_env

Expand Down
1 change: 0 additions & 1 deletion image/service-available/:ssl-tools/startup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh -e
log-helper level eq trace && set -x

chmod 700 "${CONTAINER_SERVICE_DIR}"/:ssl-tools/assets/tool/*
ln -sf "${CONTAINER_SERVICE_DIR}"/:ssl-tools/assets/tool/* /usr/sbin
9 changes: 0 additions & 9 deletions image/tool/run
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ def clear_run_envvars():
try:
shutil.rmtree(RUN_ENVIRONMENT_DIR)
os.makedirs(RUN_ENVIRONMENT_DIR)
os.chmod(RUN_ENVIRONMENT_DIR, 700)
except:
warning("clear_run_envvars: failed at some point...")

Expand Down Expand Up @@ -366,16 +365,8 @@ def setup_run_directories(args):
if not os.path.exists(directory):
os.makedirs(directory)

if directory == RUN_ENVIRONMENT_DIR:
os.chmod(directory, 700)

if not os.path.exists(RUN_ENVIRONMENT_FILE_EXPORT):
open(RUN_ENVIRONMENT_FILE_EXPORT, 'a').close()
os.chmod(RUN_ENVIRONMENT_FILE_EXPORT, 640)
uid = pwd.getpwnam("root").pw_uid
gid = grp.getgrnam("docker_env").gr_gid
os.chown(RUN_ENVIRONMENT_FILE_EXPORT, uid, gid)

if state_is_first_start():

if args.copy_service:
Expand Down