1# Copyright (c) 2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14# add sandbox appdata permissions for sharefs
15allow hap_domain sharefs:dir { watch watch_reads create_dir_perms_without_ioctl };
16allow hap_domain sharefs:file { watch watch_reads execute create_file_perms_without_ioctl };
17
18allow hap_domain sharefs_appdata_file:dir { watch watch_reads read_dir_perms_without_ioctl };
19allow hap_domain sharefs_appdata_file:file { watch watch_reads execute read_file_perms_without_ioctl };
20
21allow hap_domain sharefs_appdata_bundle_file:dir { create setattr open read getattr lock search add_name write watch watch_reads };
22allow hap_domain sharefs_appdata_bundle_file:file { watch watch_reads execute create setattr getattr open read lock map write append };
23
24allow sharefs_appdata_file sharefs:filesystem { associate };
25allow sharefs_appdata_bundle_file sharefs:filesystem { associate };
26