Gentoo Archives: gentoo-hardened

From: Justin Heesemann <jh@××××××.org>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] selinux: rsync to remote selinux protected server..
Date: Sun, 25 Mar 2007 22:02:21
Message-Id: 4606F06D.3050809@ionium.org
In Reply to: Re: [gentoo-hardened] selinux: rsync to remote selinux protected server.. by Petre Rodan
1 Petre Rodan wrote:
2 > Hi,
3 >
4 > On Sun, Mar 25, 2007 at 05:17:39PM +0100, Justin Heesemann wrote:
5 >> since the default role for root is staff_t, who's not allowed (almost)
6 >> anything..
7 >> i wonder how to manage to backup stuff to another server.
8 >
9 >
10 > you only have to make sure that no wrongdoers can execute that special rsync binary of yours or you have a serious security problem.
11
12 ok, this shouldn't be much of a problem.
13
14 thanks for the fast reply!
15
16 i've now written a small module but i have a problem installing it:
17
18 # semodule -v -i backup.pp
19 Attempting to install module 'backup.pp':
20 Ok: return value of 0.
21 Committing changes:
22 libsepol.print_missing_requirements: rsync_backup's global requirements were
23 not met: type/attribute auth
24 libsemanage.semanage_link_sandbox: Link packages failed
25 semodule: Failed!
26
27
28
29 just to make sure: this is my rsync_backup.te:
30
31 module rsync_backup 1.1;
32 require {
33 class dir { getattr read search };
34 class file { execute getattr read };
35 class lnk_file { getattr read };
36 class sock_file { getattr };
37 class fifo_file { getattr };
38 class process { noatsecure siginh rlimitinh transition };
39
40 type mnt_t;
41 type portage_fetch_tmp_t;
42 type proc_t;
43 type shadow_t;
44 type staff_t;
45 type sysfs_t;
46
47 attribute auth_chkpwd;
48 attribute auth;
49 attribute domain;
50 attribute file_type;
51 attribute privlog;
52 attribute sysadmfile;
53
54 }
55
56 type backup_t, domain, privlog, auth_chkpwd, auth;
57 type backup_exec_t, file_type, sysadmfile;
58 role staff_r types backup_t;
59
60 domain_auto_trans(staff_t, backup_exec_t, backup_t);
61
62 allow backup_t { file_type -shadow_t -portage_fetch_tmp_t -sysfs_t }:file {
63 getattr read };
64 allow backup_t { file_type }:lnk_file { getattr read };
65 allow backup_t { file_type }:fifo_file getattr;
66 allow backup_t { file_type }:sock_file getattr;
67 allow backup_t { file_type -mnt_t -proc_t -sysfs_t }:dir { getattr read
68 search };
69
70
71
72
73 --
74 Best Regards,
75 Justin
76 --
77 gentoo-hardened@g.o mailing list

Replies