blob: dfc74616b0836c97b91d0863fc9951dd75da3bf6 [file] [log] [blame]
#!/bin/sh
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
IMAGELOADER_DIR="/var/lib/imageloader"
if [ -L "${IMAGELOADER_DIR}" -o ! -d "${IMAGELOADER_DIR}" ]; then
rm -rf "${IMAGELOADER_DIR}"
mkdir -m=0755 "${IMAGELOADER_DIR}"
chown imageloaderd:imageloaderd "${IMAGELOADER_DIR}"
fi
exec minijail0 -l -n -p -r \
-S /opt/google/imageloader/imageloader-seccomp.policy \
-t -u imageloaderd -g imageloaderd -v -- /usr/sbin/imageloader "${@}"