{"id":311644,"date":"2020-10-18T15:00:33","date_gmt":"2020-10-18T15:00:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311644"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311644","title":{"rendered":"\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b Linux"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/523872\/\">\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u0433\u0440\u0430\u043d\u0434\u0438\u043e\u0437\u043d\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0445\u0430 Linux \u041e\u0421 \u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044f\u0434\u0440\u0430, \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043b\u0443\u0436\u0431 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 <a href=\"https:\/\/makelinux.github.io\/kernel\/map\/\">\u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/a> \u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u044f\u0434\u0440\u0430 Linux, \u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0432 \u043d\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u0443\u044e. \u0413\u0434\u0435 \u0436\u0435 \u043f\u0440\u044f\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Linux \u0438 \u0438\u0437 \u0447\u0435\u0433\u043e \u043e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442?<\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f Linux Security Modules \u0438 SELinux<\/font><\/h2>\n<p>  Security Enhanced Linux \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043c\u0430\u043d\u0434\u0430\u0442\u043d\u043e\u0433\u043e \u0438 \u0440\u043e\u043b\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c Linux \u043e\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0433\u0440\u043e\u0437 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 Discretionary Access Control (DAC) \u2014 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Unix. \u041f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u0410\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0430 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0421\u0428\u0410, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u043f\u043e\u0434\u0440\u044f\u0434\u0447\u0438\u043a\u0438 Secure Computing Corporation \u0438 MITRE, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u044f\u0434 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0439.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qk\/ak\/ob\/qkakobrpzcsxf9d6vxl5cfpfs98.png\"><\/div>\n<p>  <i>Linux Security Modules<\/i><br \/>  <a name=\"habracut\"><\/a><br \/>  \u041b\u0438\u043d\u0443\u0441 \u0422\u043e\u0440\u0432\u0430\u043b\u044c\u0434\u0441 \u0432\u043d\u0435\u0441 \u0440\u044f\u0434 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043e \u043d\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u0445 \u0410\u041d\u0411, \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u044f\u0434\u0440\u0430 Linux. \u041e\u043d \u043e\u043f\u0438\u0441\u0430\u043b \u043e\u0431\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u0443, \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043d\u0435\u043a\u0438\u0445 \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0430 \u0441\u0440\u0435\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. LSM \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0432\u043e\u0448\u0435\u043b \u0432 \u044f\u0434\u0440\u043e Linux v2.6 \u0432 2003 \u0433\u043e\u0434\u0443.<\/p>\n<p>  \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a LSM \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0432 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0447\u043a\u0430\u0445 \u043a\u043e\u0434\u0430 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \/sys\/kernel\/security\/lsm \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0425\u0443\u043a\u0438 LSM \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432 CONFIG_LSM. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0445\u0443\u043a\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b include\/linux\/lsm_hooks.h.<\/p>\n<p>  \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 LSM \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e SELinux \u0442\u043e\u0439 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430 Linux v2.6. \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 SELinux \u0441\u0442\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b Linux \u0438 \u0432\u043e\u0448\u0435\u043b \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432: RedHat Enterprise Linux, Fedora, Debian, Ubuntu.<\/p>\n<h2><font color=\"#3AC1EF\">\u0413\u043b\u043e\u0441\u0441\u0430\u0440\u0438\u0439 SELinux<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li><b>\u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c<\/b> \u2014 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c SELinux \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 Unix\/Linux user id, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b \u043f\u043e \u0441\u0443\u0442\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c Linux \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0432 SELinux. \u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c SELinux \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432 \u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u0445\u043e\u0434\u0438\u0442\u044c, \u0430 \u0432 \u043a\u0430\u043a\u0438\u0435 \u2014 \u043d\u0435\u043b\u044c\u0437\u044f.<\/li>\n<li><b>\u0414\u043e\u043c\u0435\u043d\u044b<\/b> \u2014 \u0412 SELinux \u0434\u043e\u043c\u0435\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430, \u0442. \u0435. \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0414\u043e\u043c\u0435\u043d \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0414\u043e\u043c\u0435\u043d \u2014 \u044d\u0442\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438\u043b\u0438 \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043e\u043c\u0435\u043d\u043e\u0432: sysadm_t \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 user_t, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043d\u0435\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u043c\u0435\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 init \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 init_t, \u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 named \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 named_t.<\/li>\n<li><b>\u0420\u043e\u043b\u0438<\/b> \u2014 \u0422\u043e, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u043c\u0435\u043d\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 SELinux. \u0420\u043e\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u0432 \u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u044b \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u043a \u043a\u0430\u043a\u0438\u043c \u0442\u0438\u043f\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u0432 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u0433\u0440\u043e\u0437\u0443 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0430\u0442\u0430\u043a\u0443 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439. \u0420\u043e\u043b\u0438 \u0432\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Role Based Access Control (RBAC), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 SELinux.<\/li>\n<li><b>\u0422\u0438\u043f\u044b<\/b> \u2014 \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 Type Enforcement, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u0430, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u043e\u043c\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443, \u0430 \u0442\u0438\u043f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c, \u043a\u0430\u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438, \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u043a\u0435\u0442\u044b \u0438 \u0442. \u0434.<\/li>\n<li><b>\u0421\u0443\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/b> \u2014 \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0420\u0435\u0441\u0443\u0440\u0441\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b: \u0444\u0430\u0439\u043b\u044b, \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0441\u043e\u043a\u0435\u0442\u044b \u0438 \u043f\u0440., \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f, \u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u2014 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li><b>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 SELinux<\/b> \u2014 \u0414\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b SELinux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438. \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 SELinux \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u0440\u043e\u043b\u044f\u043c, \u0440\u043e\u043b\u0435\u0439 \u2014 \u043a \u0434\u043e\u043c\u0435\u043d\u0430\u043c \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u2014 \u043a \u0442\u0438\u043f\u0430\u043c. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u043e\u043b\u0438, \u0434\u0430\u043b\u0435\u0435 \u0440\u043e\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u043e\u043c\u0435\u043d\u0430\u043c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0434\u043e\u043c\u0435\u043d \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043b\u0438\u0448\u044c \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">LSM \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SELinux<\/font><\/h2>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 LSM \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 Linux. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 SELinux, \u043e\u043d \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u044f\u0434\u0440\u043e. \u041b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 LSM \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u044f\u0434\u0440\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u044f\u0434\u0440\u0430, \u0438\u043d\u0430\u0447\u0435 \u043a\u043e\u0434 LSM \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u041d\u043e \u0434\u0430\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u041e\u0421.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/q3\/tq\/go\/q3tqgopu2zv7q2hhzujyl7hfiqa.png\"><\/div>\n<p>  <i>\u0421\u0442\u0435\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a LSM<\/i><\/p>\n<p>  LSM \u043e\u0441\u043d\u0430\u0449\u0435\u043d \u0445\u0443\u043a\u0430\u043c\u0438 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 LSM \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u0441\u0442\u0435\u043a\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 LSM \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0437\u0430\u0434. \u042d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435, \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 DAC \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0442\u043a\u0430\u0437, \u0442\u043e \u0434\u0435\u043b\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043e \u0445\u0443\u043a\u043e\u0432 LSM.<\/p>\n<p>  SELinux \u043f\u0435\u0440\u0435\u043d\u044f\u043b \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Flask \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Fluke, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439. \u0421\u0443\u0442\u044c \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0432 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u043b\u0438\u0448\u044c \u0442\u0435\u0445 \u043f\u0440\u0430\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u0432 SELinux \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043c\u0435\u043d =&gt; \u0442\u0438\u043f.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 SELinux \u0438\u043c\u0435\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043d\u0435\u0436\u0435\u043b\u0438 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c DAC, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0432 \u041e\u0421 Unix\/Linux. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0442\u044c ftp \u0441\u0435\u0440\u0432\u0435\u0440, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435, \u043d\u043e \u043d\u0435 \u0438\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b SELinux \u0442\u0430\u043a\u043e\u0432\u044b:<\/p>\n<ul>\n<li><b>Policy Enforcement Server<\/b> \u2014 \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/li>\n<li><b>\u0411\u0414 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/b><\/li>\n<li><b>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0447\u0438\u043a\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 LSM.<\/b><\/li>\n<li><b>Selinuxfs<\/b> \u2014 \u041f\u0441\u0435\u0432\u0434\u043e-\u0424\u0421, \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \/proc \u0438 \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 \/sys\/fs\/selinux. \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u044f\u0434\u0440\u043e\u043c Linux \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0435 SELinux.<\/li>\n<li><b>Access Vector Cache<\/b> \u2014 \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/r7\/kk\/lu\/r7kkluzoky10tcwqv6d_q3tdwam.png\"><br \/>  <i>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b SELinux<\/i><\/p>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<ol>\n<li>\u041d\u0435\u043a\u0438\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442, \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 SELinux, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 DAC \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043a \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0447\u0438\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 LSM.<\/li>\n<li>\u041e\u0442\u0442\u0443\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c SELinux Abstraction and Hook Logic, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 LSM.<\/li>\n<li>\u0418\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0435\u0439 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Policy Enforcement Server \u0438 \u043a \u043d\u0435\u043c\u0443 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 SELinux AnHL.<\/li>\n<li>\u0414\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435, \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u0435 Policy Enforcement Server \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b Access Vector Cache (AVC).<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0432 \u043a\u044d\u0448\u0435, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0411\u0414 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u0437 \u0411\u0414 \u0438 AVC \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 Policy Enforcement Server.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u0443\u0435\u0442\u0441\u044f \u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c, \u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442\u0441\u044f.<\/li>\n<\/ol>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 SELinux<\/font><\/h2>\n<p>  SELinux \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0442\u0440\u0435\u0445 \u0440\u0435\u0436\u0438\u043c\u043e\u0432:<\/p>\n<ul>\n<li>Enforcing \u2014 \u0421\u0442\u0440\u043e\u0433\u043e\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li>Permissive \u2014 \u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u043c\u0435\u0442\u043a\u0430.<\/li>\n<li>Disabled \u2014 \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f SELinux \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ getenforce Permissive<\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0434\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 enforcing, \u0438\u043b\u0438 1. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 permissive \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u0434 0.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ setenfoce enforcing [admin@server ~]$ setenfoce 1 #\u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ cat \/etc\/selinux\/config<\/code><\/pre>\n<p>  <code># This file controls the state of SELinux on the system.<br \/>  # SELINUX= can take one of these three values:<br \/>  # enforcing - SELinux security policy is enforced.<br \/>  # permissive - SELinux prints warnings instead of enforcing.<br \/>  # disabled - No SELinux policy is loaded.<br \/>  SELINUX=enforcing<br \/>  # SELINUXTYPE= can take one of three values:<br \/>  # targeted - Targeted processes are protected,<br \/>  # minimum - Modification of targeted policy. Only selected processes are protected. <br \/>  # mls - Multi Level Security protection.<br \/>  <\/code><br \/>  SELINUXTYPE=targete<\/p>\n<p>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0441 setenfoce \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u0436\u0438\u043c SELinux \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 SELINUX \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u041f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f enforcing &lt;=&gt; disabled \u0432\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u0441\u0438\u043b\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0430\u0432\u043a\u0443 \u0444\u0430\u0439\u043b\u0430 \/etc\/selinux\/config \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442:<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ sestatus<\/code><\/pre>\n<p>  <code>SELinux status: enabled<br \/>  SELinuxfs mount: \/sys\/fs\/selinux<br \/>  SELinux root directory: \/etc\/selinux<br \/>  Loaded policy name: targeted<br \/>  Current mode: permissive<br \/>  Mode from config file: enforcing<br \/>  Policy MLS status: enabled<br \/>  Policy deny_unknown status: allowed<br \/>  Max kernel policy version: 31<\/code><br \/>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 SELinux \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0448\u0442\u0430\u0442\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -Z.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ ls -lZ \/var\/log\/httpd\/ -rw-r--r--. root root system_u:object_r:httpd_log_t:s0 access_log -rw-r--r--. root root system_u:object_r:httpd_log_t:s0 access_log-20200920 -rw-r--r--. root root system_u:object_r:httpd_log_t:s0 access_log-20200927 -rw-r--r--. root root system_u:object_r:httpd_log_t:s0 access_log-20201004 -rw-r--r--. root root system_u:object_r:httpd_log_t:s0 access_log-20201011 [admin@server ~]$ ps -u apache -Z LABEL                             PID TTY          TIME CMD system_u:system_r:httpd_t:s0     2914 ?        00:00:04 httpd system_u:system_r:httpd_t:s0     2915 ?        00:00:00 httpd system_u:system_r:httpd_t:s0     2916 ?        00:00:00 httpd system_u:system_r:httpd_t:s0     2917 ?        00:00:00 httpd ... system_u:system_r:httpd_t:s0     2918 ?        00:00:00 httpd<\/code><\/pre>\n<p>  \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c ls -l \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430:<\/p>\n<p>  <code>&lt;user&gt;:&lt;role&gt;:&lt;type&gt;:&lt;level&gt;<\/code><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u043e\u043b\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0433\u0440\u0438\u0444\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>s0 \u2014 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c, \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c lowlevel-highlevel<\/li>\n<li>c0, c1\u2026 c1023 \u2014 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u0432<\/font><\/h3>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 semodule, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 SELinux, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0445.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ semodule -l |wc -l #\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 408 [admin@server ~]$ semodule -e abrt #enable - \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c [admin@server ~]$ semodule -d accountsd #disable - \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c [admin@server ~]$ semodule -r avahi #remove - \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <b>semanage login<\/b> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f SELinux \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c -r \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 SELinux \u043d\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u041e\u0421. \u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 MLS\/MCS Range \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ semanage login -a -s user_u karol [admin@server ~]$ semanage login -l<\/code><\/pre>\n<p>  <code>Login Name SELinux User MLS\/MCS Range Service<br \/>  __default__ unconfined_u s0-s0:c0.c1023 *<br \/>  root unconfined_u s0-s0:c0.c1023 *<br \/>  system_u system_u s0-s0:c0.c1023 *<br \/>  [admin@server ~]$ semanage login -d karol<br \/>  <\/code><br \/>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <b>semanage user<\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0440\u043e\u043b\u044f\u043c\u0438 SELinux.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ semanage user -l                 Labeling   MLS\/       MLS\/                           SELinux User    Prefix     MCS Level  MCS Range             SELinux Roles guest_u         user       s0         s0                    guest_r staff_u         staff      s0         s0-s0:c0.c1023        staff_r sysadm_r ... user_u          user       s0         s0                    user_r xguest_u        user       s0         s0                    xguest_r [admin@server ~]$ semanage user -a -R 'staff_r user_r' [admin@server ~]$ semanage user -d test_u<\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>-a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0440\u043e\u043b\u0435\u0439;<\/li>\n<li>-l \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0440\u043e\u043b\u0435\u0439;<\/li>\n<li>-d \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0440\u043e\u043b\u0435\u0439;<\/li>\n<li>-R \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u0445 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e;<\/li>\n<\/ul>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u0424\u0430\u0439\u043b\u044b, \u043f\u043e\u0440\u0442\u044b \u0438 \u0431\u0443\u043b\u0435\u0432\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/font><\/h3>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c SELinux \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u0436\u0435\u043b\u0430\u0435\u043c \u0434\u0430\u0442 \u044c\u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043f\u043a\u0435 \/srv\/www.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ semanage fcontext -a -t httpd_sys_content_t &quot;\/srv\/www(\/.*)? [admin@server ~]$ restorecon -R \/srv\/www\/<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442, \u0432\u0435\u0440\u043d\u0435\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442, \u0442\u0438\u043f\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, TCP\/UDP \u043f\u043e\u0440\u0442\u044b \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u043b\u0438\u0448\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0445 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0433 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 8080, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ semanage port -m -t http_port_t -p tcp 8080<\/code><\/pre>\n<p>  \u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 SELinux \u0438\u043c\u0435\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u0443\u043b\u0435\u0432\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e getsebool -a. \u0418\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0431\u0443\u043b\u0435\u0432\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e setsebool.<\/p>\n<pre><code class=\"bash\">[admin@server ~]$ getsebool httpd_enable_cgi httpd_enable_cgi --&gt; on [admin@server ~]$ setsebool -P httpd_enable_cgi off [admin@server ~]$ getsebool httpd_enable_cgi httpd_enable_homedirs --&gt; off <\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 Pgadmin-web<\/font><\/h2>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043d\u0430 RHEL 7.6 pgadmin4-web \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0411\u0414 PostgreSQL. \u041c\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <a href=\"https:\/\/bit.ly\/2GPG2rn\">\u043a\u0432\u0435\u0441\u0442<\/a> \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 pg_hba.conf, postgresql.conf \u0438 config_local.py, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0430\u043f\u043a\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0438\u0437 pip \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 Python. \u0412\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <i>500 Internal Server error<\/i>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bb\/5j\/qc\/bb5jqcf5am20-pbydxwhxgvp2_g.png\"><\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u043c\u044b\u0445, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \/var\/log\/httpd\/error_log. \u0422\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>  <code>[timestamp] [core:notice] [pid 23689] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0<br \/>  ...<br \/>  [timestamp] [wsgi:error] [pid 23690] [Errno 13] Permission denied: '\/var\/lib\/pgadmin'<br \/>  [timestamp] [wsgi:error] [pid 23690]<br \/>  [timestamp] [wsgi:error] [pid 23690] HINT : You may need to manually set the permissions on<br \/>  [timestamp] [wsgi:error] [pid 23690] \/var\/lib\/pgadmin to allow apache to write to it.<\/code><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 Linux \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0441\u0442\u043e\u0439\u043a\u043e\u0435 \u0438\u0441\u043a\u0443\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c setencorce 0, \u0434\u0430 \u0438 \u0434\u0435\u043b\u043e \u0441 \u043a\u043e\u043d\u0446\u043e\u043c. \u041f\u0440\u0438\u0437\u043d\u0430\u0442\u044c\u0441\u044f, \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u044f \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u043b. \u042d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0442\u043e\u0436\u0435 \u0432\u044b\u0445\u043e\u0434, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439.<\/p>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 SELinux \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 setroubleshoot \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b.<\/p>\n<p>  <code>[admin@server ~]$ yum install setroubleshoot<br \/>  [admin@server ~]$ journalctl -b -0<br \/>  [admin@server ~]$ service restart auditd<\/code><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 auditd \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e systemctl, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 systemd \u0432 \u041e\u0421. \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0435 <b>\u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d<\/b> \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043a\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0438 <b>\u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u0435\u0442\u0430<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/te\/za\/7f\/teza7fjywg5rnzpv57nyl-i1pf4.png\"><\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <code>[admin@server ~]$ setsebool -P httpd_can_network_connect 1<br \/>  [admin@server ~]$ setsebool -P httpd_can_network_connect_db 1<\/code><\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0432\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 pgadmin4-web, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=Bright_Translate&amp;utm_content=sborka_nedorogoj_domashnej_nas_sistemy_na_linux#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub\/news\/read\/123?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=Bright_Translate&amp;utm_content=sborka_nedorogoj_domashnej_nas_sistemy_na_linux\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3p\/iw\/1j\/3piw1j3wd_cgmzq9sefgferaumu.png\"><\/div>\n<p><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/523872\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/523872\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/523872\/\">\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u0433\u0440\u0430\u043d\u0434\u0438\u043e\u0437\u043d\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0445\u0430 Linux \u041e\u0421 \u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044f\u0434\u0440\u0430, \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043b\u0443\u0436\u0431 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 <a href=\"https:\/\/makelinux.github.io\/kernel\/map\/\">\u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/a> \u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u044f\u0434\u0440\u0430 Linux, \u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0432 \u043d\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u0443\u044e. \u0413\u0434\u0435 \u0436\u0435 \u043f\u0440\u044f\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Linux \u0438 \u0438\u0437 \u0447\u0435\u0433\u043e \u043e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442?<\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f Linux Security Modules \u0438 SELinux<\/font><\/h2>\n<p>  Security Enhanced Linux \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043c\u0430\u043d\u0434\u0430\u0442\u043d\u043e\u0433\u043e \u0438 \u0440\u043e\u043b\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c Linux \u043e\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0433\u0440\u043e\u0437 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 Discretionary Access Control (DAC) \u2014 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Unix. \u041f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u0410\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0430 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0421\u0428\u0410, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u043f\u043e\u0434\u0440\u044f\u0434\u0447\u0438\u043a\u0438 Secure Computing Corporation \u0438 MITRE, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u044f\u0434 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0439.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qk\/ak\/ob\/qkakobrpzcsxf9d6vxl5cfpfs98.png\"><\/div>\n<p>  <i>Linux Security Modules<\/i>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311644","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311644"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311644\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}