~ubuntu-branches/ubuntu/dapper/selinux-policy-default/dapper

« back to all changes in this revision

Viewing changes to domains/program/unused/lrrd.te

  • Committer: Bazaar Package Importer
  • Author(s): Russell Coker
  • Date: 2004-06-10 18:08:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040610180800-gagxr0cdovi7mv2i
Tags: upstream-1.12
ImportĀ upstreamĀ versionĀ 1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#DESC LRRD - network-wide load graphing
 
2
#
 
3
# Author:  Erich Schubert <erich@debian.org>
 
4
# X-Debian-Packages: lrrd-client, lrrd-server
 
5
#
 
6
 
 
7
#################################
 
8
#
 
9
# Rules for the lrrd_t domain.
 
10
#
 
11
# lrrd_exec_t is the type of the lrrd executable.
 
12
#
 
13
daemon_domain(lrrd)
 
14
 
 
15
allow lrrd_t lrrd_var_run_t:sock_file create_file_perms;
 
16
 
 
17
etcdir_domain(lrrd)
 
18
typealias lrrd_etc_t alias etc_lrrd_t;
 
19
type lrrd_var_lib_t, file_type, sysadmfile;
 
20
type lrrd_port_t, port_type;
 
21
 
 
22
log_domain(lrrd)
 
23
tmp_domain(lrrd)
 
24
 
 
25
# has cron jobs
 
26
system_crond_entry(lrrd_exec_t, lrrd_t)
 
27
allow crond_t lrrd_var_lib_t:dir search;
 
28
 
 
29
# init script
 
30
allow initrc_t lrrd_log_t:file { write append setattr ioctl };
 
31
 
 
32
# allow to drop privileges and renice
 
33
allow lrrd_t self:capability { setgid setuid };
 
34
allow lrrd_t self:process { getsched setsched };
 
35
 
 
36
allow lrrd_t urandom_device_t:chr_file { getattr read };
 
37
allow lrrd_t proc_t:file { getattr read };
 
38
allow lrrd_t usr_t:file { read ioctl };
 
39
 
 
40
can_exec(lrrd_t, bin_t)
 
41
allow lrrd_t bin_t:dir { search };
 
42
allow lrrd_t usr_t:lnk_file { read };
 
43
 
 
44
# Allow access to the lrrd databases
 
45
create_dir_file(lrrd_t, lrrd_var_lib_t)
 
46
allow lrrd_t var_lib_t:dir search;
 
47
 
 
48
# read config files
 
49
r_dir_file(initrc_t, lrrd_etc_t)
 
50
allow lrrd_t { etc_t etc_runtime_t }:{ file lnk_file } { read getattr };
 
51
# for accessing the output directory
 
52
ifdef(`apache.te', `
 
53
allow lrrd_t httpd_sys_content_t:dir { search };
 
54
')
 
55
 
 
56
allow lrrd_t etc_t:dir search;
 
57
 
 
58
can_unix_connect(sysadm_t, lrrd_t)
 
59
can_unix_connect(lrrd_t, lrrd_t)
 
60
can_unix_send(lrrd_t, lrrd_t)
 
61
can_network(lrrd_t)
 
62
 
 
63
ifdef(`logrotate.te', `
 
64
r_dir_file(logrotate_t, lrrd_etc_t)
 
65
allow logrotate_t lrrd_var_lib_t:dir search;
 
66
allow logrotate_t lrrd_var_run_t:dir search;
 
67
allow logrotate_t lrrd_var_run_t:sock_file write;
 
68
can_unix_connect(logrotate_t, lrrd_t)
 
69
')