anchor/tools/apparmor.anchor_production
Stanisław Pitucha b61edc5020 Update documentation
Split the README documentation into better section. Refresh the text,
so that it matches the current code. Ensure the sample config works
with the examples.

Closes-bug: 1437703
Change-Id: I1548892a97d82fdcd1a4fe53f24c0fcdb6e35f1f
2015-06-23 12:49:22 +10:00

63 lines
1.7 KiB
Plaintext

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#include <tunables/global>
@{ANCHOR_BASE}="/path/to/anchor"
@{ANCHOR_VENV}="@{ANCHOR_BASE}/.venv"
@{ANCHOR_CA_DIR}="@{ANCHOR_BASE}/CA"
@{ANCHOR_CERTS_DIR}="@{ANCHOR_BASE}/certs"
/path/to/anchor/bin/anchor_production {
#include <abstractions/base>
#include <abstractions/bash>
/bin/dash ix,
@{ANCHOR_BASE}/ r,
@{ANCHOR_BASE}/bin/anchor_production mixr,
@{ANCHOR_VENV}/bin/uwsgi cix,
profile /path/to/anchor/.venv/bin/uwsgi {
#include <abstractions/base>
#include <abstractions/python>
#include <abstractions/bash>
#include <abstractions/nameservice>
#include <abstractions/user-tmp>
network inet stream,
/bin/dash ix,
/bin/uname ix,
/etc/mime.types r,
/sbin/ldconfig mUxr,
@{PROC}/sys/net/core/somaxconn r,
@{ANCHOR_CA_DIR}/* r,
@{ANCHOR_CERTS_DIR}/{,*.crt} w,
@{ANCHOR_BASE}/ r,
@{ANCHOR_BASE}/anchor/**.py{,c} r,
@{ANCHOR_BASE}/anchor/{,**/} r,
@{ANCHOR_BASE}/config.py r,
@{ANCHOR_VENV}/bin/python mixr,
@{ANCHOR_VENV}/bin/uwsgi mixr,
@{ANCHOR_VENV}/bin/ r,
@{ANCHOR_VENV}/lib/python2.7/ r,
@{ANCHOR_VENV}/lib/python2.7/** r,
@{ANCHOR_VENV}/lib/python2.7/**/*.so m,
}
}