<div dir="ltr"><div><div><div>I believe the runcon part is no longer necessary, at least on my RHEL7 based systems mmfsd is running unconfined by default:<br><br>[root@flexscale01 ~]# ps -efZ|grep mmfsd<br>unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 18018 17709  0 aug.05 ? 00:24:53 /usr/lpp/mmfs/bin/mmfsd<br><br></div>and I've never seen any problems with that for base GPFS. <br><br></div>I suspect doing a proper selinux domain for GPFS will be quite close to unconfined, so maybe not worth the effort... <br><br><br><br></div>  -jf<br><div> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 11, 2016 at 6:47 AM, Aaron Knister <span dir="ltr"><<a href="mailto:aaron.s.knister@nasa.gov" target="_blank">aaron.s.knister@nasa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Everyone,<br>
<br>
I'm passing this along on behalf of one of our security guys. Just wondering what feedback/thoughts others have on the topic.<br>
<br>
<br>
Current IBM guidance on GPFS and SELinux indicates that the default<br>
context for services (initrc_t) is insufficient for GPFS operations.<br>
<br>
See:<br>
<a href="https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/General+Parallel+File+System+(GPFS)/page/Using+GPFS+with+SElinux" rel="noreferrer" target="_blank">https://www.ibm.com/developerw<wbr>orks/community/wikis/home?<wbr>lang=en#!/wiki/General+<wbr>Parallel+File+System+(GPFS)/<wbr>page/Using+GPFS+with+SElinux</a><br>
<br>
<br>
That part is true (by design), but IBM goes further to say use runcon<br>
out of rc.local and configure the gpfs service to not start via init.<br>
<br>
I believe these latter two (rc.local/runcon and no-init) can be<br>
addressed, relatively trivially, through the application of a small<br>
selinux policy.<br>
<br>
Ideally, I would hope for IBM to develop, test, and send out the policy,<br>
but I'm happy to offer the following suggestions. I believe "a)" could<br>
be developed in a relatively short period of time. "b)" would take more<br>
time, effort and experience.<br>
<br>
a) consider SELinux context transition.<br>
<br>
As an example, consider:<br>
<a href="https://github.com/TresysTechnology/refpolicy/tree/master/policy/modules/services" rel="noreferrer" target="_blank">https://github.com/TresysTechn<wbr>ology/refpolicy/tree/master/<wbr>policy/modules/services</a><br>
<br>
<br>
(specifically, the ssh components)<br>
<br>
On a normal centOS/RHEL system sshd has the file context of sshd_exec_t,<br>
and runs under sshd_t<br>
<br>
Referencing ssh.te, you see several references to sshd_exec_t in:<br>
domtrans_pattern<br>
init_daemon_domain<br>
daemontools_service_domain<br>
(and so on)<br>
<br>
These configurations allow init to fire sshd off, setting its runtime<br>
context to sshd_t, based on the file context of sshd_exec_t.<br>
<br>
This should be duplicable for the gpfs daemon, altho I note it seems to<br>
be fired through a layer of abstraction in mmstartup.<br>
<br>
A simple policy that allows INIT to transition GPFS to unconfined_t<br>
would go a long way towards easing integration.<br>
<br>
b) file contexts of gpfs_daemon_t and gpfs_util_t, perhaps, that when<br>
executed, would pick up a context of gpfs_t? Which then could be mapped<br>
through standard SELinux policy to allow access to configuration files<br>
(gpfs_etc_t?), block devices, etc?<br>
<br>
I admit, in b, I am speculating heavily.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Aaron Knister<br>
NASA Center for Climate Simulation (Code 606.2)<br>
Goddard Space Flight Center<br>
<a href="tel:%28301%29%20286-2776" value="+13012862776" target="_blank">(301) 286-2776</a><br>
______________________________<wbr>_________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at <a href="http://spectrumscale.org" rel="noreferrer" target="_blank">spectrumscale.org</a><br>
<a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/list<wbr>info/gpfsug-discuss</a><br>
</font></span></blockquote></div><br></div>