{"id":8486,"date":"2020-08-28T12:58:39","date_gmt":"2020-08-28T04:58:39","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8486"},"modified":"2020-08-28T12:58:39","modified_gmt":"2020-08-28T04:58:39","slug":"semodule","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/semodule","title":{"rendered":"semodule\u547d\u4ee4 – \u7ba1\u7406SELinux\u7b56\u7565\u6a21\u5757"},"content":{"rendered":"\n

semodule\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u7ba1\u7406SELinux\u7b56\u7565\u6a21\u5757\uff0c\u6bd4\u5982\u663e\u793a\u3001\u5b89\u88c5\u3001\u91cd\u88c5\u3001\u5347\u7ea7\u3001\u5220\u9664\u3001\u6fc0\u6d3b\u53ca\u7981\u7528\u7b56\u7565\u6a21\u5757\u3002<\/p>\n\n\n\n

semodule\u547d\u4ee4\u8fd8\u53ef\u7528\u4e8e\u5f3a\u5236\u4ece\u6a21\u5757\u5b58\u50a8\u91cd\u5efa\u7b56\u7565\u548c\/\u6216\u5f3a\u5236\u91cd\u65b0\u52a0\u8f7d\u7b56\u7565\u800c\u4e0d\u6267\u884c\u4efb\u4f55\u5176\u4ed6\u4e8b\u52a1\u3002 semodule\u547d\u4ee4\u4f5c\u7528\u4e8esemodule_package\u521b\u5efa\u7684\u6a21\u5757\u5305\u3002\u901a\u5e38\uff0c\u8fd9\u4e9b\u6587\u4ef6\u5177\u6709.pp\u540e\u7f00\uff08\u7b56\u7565\u5305\uff09\uff0c\u5c3d\u7ba1\u8fd9\u4e0d\u662f\u4ee5\u4efb\u4f55\u65b9\u5f0f\u5f3a\u5236\u6267\u884c\u7684\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>semodule [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-l<\/td>\u663e\u793a\u5b89\u88c5\u7684\u6a21\u5757<\/td><\/tr>
-R<\/td>\u91cd\u88c5\u7b56\u7565\u6a21\u5757<\/td><\/tr>
-B<\/td>\u5efa\u7acb\u548c\u91cd\u88c5\u7b56\u7565\u6a21\u5757<\/td><\/tr>
-i<\u7b56\u7565\u6a21\u5757><\/td>\u5b89\u88c5\u4e00\u4e2a\u65b0\u7684\u6a21\u5757<\/td><\/tr>
-u<\u7b56\u7565\u6a21\u5757><\/td>\u5347\u7ea7\u7b56\u7565\u6a21\u5757<\/td><\/tr>
-e<\u7b56\u7565\u6a21\u5757><\/td>\u6fc0\u6d3b\u7b56\u7565\u6a21\u5757<\/td><\/tr>
-d<\u7b56\u7565\u6a21\u5757><\/td>\u7981\u7528\u7b56\u7565\u6a21\u5757<\/td><\/tr>
-b<\u7b56\u7565\u6a21\u5757><\/td>\u5b89\u88c5\u65b0\u7684\u57fa\u7840\u6a21\u5757<\/td><\/tr>
-r<\u7b56\u7565\u6a21\u5757><\/td>\u5220\u9664\u7b56\u7565\u6a21\u5757<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u770bSELinux\u52a0\u8f7d\u7684\u7b56\u7565\u6a21\u5757\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# semodule -l<\/pre>\n\n\n\n

\u67e5\u770bapache\u7b56\u7565\u6a21\u5757\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# semodule -l|grep apache<\/pre>\n\n\n\n

\u7981\u7528zebra\u7b56\u7565\u6a21\u5757\uff1a<\/p>\n\n\n\n

[root@localhost ~]# semodule -d zebra<\/pre>\n","protected":false},"excerpt":{"rendered":"

semodule\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u7ba1\u7406SELinux\u7b56\u7565\u6a21\u5757\uff0c\u6bd4\u5982\u663e\u793a\u3001\u5b89\u88c5\u3001\u91cd\u88c5\u3001\u5347\u7ea7\u3001\u5220\u9664\u3001\u6fc0\u6d3b\u53ca\u7981\u7528\u7b56\u7565\u6a21 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8486"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8486"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8486\/revisions"}],"predecessor-version":[{"id":8506,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8486\/revisions\/8506"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}