Coverage for manila/privsep/__init__.py: 100%
3 statements
« prev ^ index » next coverage.py v7.11.0, created at 2026-02-18 22:19 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2026-02-18 22:19 +0000
1# Copyright 2021 Red Hat, Inc.
2# Licensed under the Apache License, Version 2.0 (the "License"); you may
3# not use this file except in compliance with the License. You may obtain
4# 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, WITHOUT
10# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11# License for the specific language governing permissions and limitations
12# under the License.
14"""Setup privsep decorator."""
16from oslo_privsep import capabilities
17from oslo_privsep import priv_context
19sys_admin_pctxt = priv_context.PrivContext(
20 'manila',
21 cfg_section='manila_sys_admin',
22 pypath=__name__ + '.sys_admin_pctxt',
23 capabilities=[capabilities.CAP_CHOWN,
24 capabilities.CAP_DAC_OVERRIDE,
25 capabilities.CAP_DAC_READ_SEARCH,
26 capabilities.CAP_FOWNER,
27 capabilities.CAP_NET_ADMIN,
28 capabilities.CAP_SYS_ADMIN],
29)