Skip to content

Commit

Permalink
selinux: Fix man page location
Browse files Browse the repository at this point in the history
The SELinux man page was previously located in two places and the man
page that was supposed to be updated when rgw selinux changes were
proposed did not get updated properly. Fixing this by moving
selinux/ceph_selinux.8 to man/ceph_selinux.8. Also, populate EXTRA_DIST
with ceph_selinux.8.

Signed-off-by: Boris Ranto <[email protected]>
  • Loading branch information
b-ranto committed Oct 6, 2015
1 parent 378d56d commit bc48ef0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 376 deletions.
2 changes: 1 addition & 1 deletion man/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = gnu

EXTRA_DIST = conf.py
EXTRA_DIST = conf.py ceph_selinux.8

dist_man_MANS =

Expand Down
56 changes: 51 additions & 5 deletions man/ceph_selinux.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "ceph_selinux" "8" "15-06-17" "ceph" "SELinux Policy ceph"
.TH "ceph_selinux" "8" "15-08-10" "ceph" "SELinux Policy ceph"
.SH "NAME"
ceph_selinux \- Security Enhanced Linux Policy for the ceph processes
.SH "DESCRIPTION"
Expand All @@ -18,7 +18,7 @@ The ceph_t SELinux type can be entered via the \fBceph_exec_t\fP file type.

The default entrypoint paths for the ceph_t domain are the following:

/usr/bin/ceph-mon, /usr/bin/ceph-mds, /usr/bin/ceph-osd
/usr/bin/radosgw, /usr/bin/ceph-mon, /usr/bin/ceph-mds, /usr/bin/ceph-osd
.SH PROCESS TYPES
SELinux defines process types (domains) for each process running on the system
.PP
Expand Down Expand Up @@ -145,6 +145,22 @@ If you want to allow confined applications to use nscd shared memory, you must t
.EE

.SH NSSWITCH DOMAIN

.PP
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the ceph_t, you must turn on the authlogin_nsswitch_use_ldap boolean.

.EX
.B setsebool -P authlogin_nsswitch_use_ldap 1
.EE

.PP
If you want to allow confined applications to run with kerberos for the ceph_t, you must turn on the kerberos_enabled boolean.

.EX
.B setsebool -P kerberos_enabled 1
.EE

.SH "MANAGED FILES"

The SELinux process type ceph_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.
Expand Down Expand Up @@ -215,6 +231,12 @@ The SELinux process type ceph_t can manage files labeled with the following file
/var/run/cluster/rgmanager\.sk
.br

.br
.B fsadm_var_run_t

/var/run/blkid(/.*)?
.br

.br
.B root_t

Expand All @@ -223,6 +245,22 @@ The SELinux process type ceph_t can manage files labeled with the following file
/initrd
.br

.br
.B var_run_t

/run/.*
.br
/var/run/.*
.br
/run
.br
/var/run
.br
/var/run
.br
/var/spool/postfix/pid
.br

.SH FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type.
.PP
Expand All @@ -238,7 +276,7 @@ SELinux ceph policy is very flexible allowing users to setup their ceph processe
SELinux defines the file context types for the ceph, if you wanted to
store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk.

.B semanage fcontext -a -t ceph_var_run_t '/srv/myceph_content(/.*)?'
.B semanage fcontext -a -t ceph_exec_t '/srv/ceph/content(/.*)?'
.br
.B restorecon -R -v /srv/myceph_content

Expand All @@ -257,7 +295,7 @@ Note: SELinux often uses regular expressions to specify labels that match multip
.br
.TP 5
Paths:
/usr/bin/ceph-mon, /usr/bin/ceph-mds, /usr/bin/ceph-osd
/usr/bin/radosgw, /usr/bin/ceph-mon, /usr/bin/ceph-mds, /usr/bin/ceph-osd

.EX
.PP
Expand All @@ -266,6 +304,10 @@ Paths:

- Set files with the ceph_initrc_exec_t type, if you want to transition an executable to the ceph_initrc_t domain.

.br
.TP 5
Paths:
/etc/rc\.d/init\.d/ceph, /etc/rc\.d/init\.d/radosgw

.EX
.PP
Expand All @@ -274,6 +316,10 @@ Paths:

- Set files with the ceph_log_t type, if you want to treat the data as ceph log data, usually stored under the /var/log directory.

.br
.TP 5
Paths:
/var/log/ceph(/.*)?

.EX
.PP
Expand Down Expand Up @@ -321,4 +367,4 @@ This manual page was auto-generated using

.SH "SEE ALSO"
selinux(8), ceph(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
, setsebool(8)
, setsebool(8)
Loading

0 comments on commit bc48ef0

Please sign in to comment.