blob: 7c3326bc83b20293dcb615e2c2ad72932ad51d84 [file] [log] [blame]
#!/bin/bash
# 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.
# Runs mount-passthrough with minijail0 as chronos.
set -e
if [ $# -ne 6 ]; then
echo "Usage: $0 source dest fuse_umask fuse_uid fuse_gid"\
"android_app_access_type"
exit 1
fi
. /usr/share/arc/mount-passthrough-jailed-utils.sh
# Run mount-passthrough as chronos.
set -- "$@" chronos chronos
# Inherit supplementary groups.
set -- "$@" "true" # inherit_supplementary_groups
# Do not grant CAP_DAC_OVERRIDE.
set -- "$@" "false" # grant_cap_dac_override
# Do not force group access permission.
# TODO(b/123669632): Remove the argument |force_group_permission| and related
# logic once we start to run the daemon as MediaProvider UID and GID from
# mount-passthrough-jailed-play.
set -- "$@" "false" # force_group_permission
# Do not enter the concierge namespace.
set -- "$@" "false" # enter_concierge_namespace
run_mount_passthrough_with_minijail0 "$@"