当前位置: 首页 > news >正文

AppArmor零知识学习十二、源码构建(9)

本文内容参考:

AppArmor / apparmor · GitLab

接前一篇文章:AppArmor零知识学习十一、源码构建(8)

在前一篇文章中完成了apparmor源码构建的第六步——Apache mod_apparmor的构建和安装,本文继续往下进行。 

四、源码构建

 7. PAM AppArmor构建

(1)进入changehat/pam_apparmor目录

通过cd命令进入apparmor源码根目录下changehat目录下的mod_apparmor目录。实际命令及结果如下: 

penghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor$ cd changehat/
penghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor/changehat$ ls
mod_apparmor  pam_apparmor  tomcat_apparmorpenghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor/changehat$ cd pam_apparmor/
penghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor/changehat/pam_apparmor$ ls
COPYING  get_options.c  get_options.o  Makefile  pam_apparmor.c  pam_apparmor.changes  pam_apparmor.h  pam_apparmor.o  pam_apparmor.so  README

(2)编译

运行make命令进行编译。实际命令及结果如下所示:

$ make
cc   -fPIC -shared -Wall -Wall -Wsign-compare -Wmissing-field-initializers -Wformat -Wformat-security -Wunused-parameter -Wimplicit-fallthrough -I../../libraries/libapparmor//include -c -o pam_apparmor.o pam_apparmor.c
cc   -fPIC -shared -Wall -Wall -Wsign-compare -Wmissing-field-initializers -Wformat -Wformat-security -Wunused-parameter -Wimplicit-fallthrough -I../../libraries/libapparmor//include -c -o get_options.o get_options.c
cc   -fPIC -shared -Wall -Wall -Wsign-compare -Wmissing-field-initializers -Wformat -Wformat-security -Wunused-parameter -Wimplicit-fallthrough -I../../libraries/libapparmor//include -Xlinker -x -L../../libraries/libapparmor//src/.libs/  -o pam_apparmor.so pam_apparmor.o get_options.o -lpam -lapparmor

(3)安装 

运行make install命令进行安装。实际命令及结果如下所示:

$ sudo make install
[sudo] penghao 的密码:install -m 755 -d //lib/security
install -m 755 pam_apparmor.so //lib/security/

至此,PAM AppArmor就构建并安装完成了。

8. Profiles构建

(1)进入profiles目录

通过cd命令进入apparmor源码根目录下的profiles目录。实际命令及结果如下:

penghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor$ cd profiles/
penghao@Ding-Perlis-MP260S48:~/AppArmor/apparmor/profiles$ ls
apparmor  apparmor.d  Makefile

(2)编译

运行make命令进行编译。实际命令及结果如下所示:

$ make
for profile in ./apparmor.d/bin.ping ./apparmor.d/lsb_release ./apparmor.d/nvidia_modprobe ./apparmor.d/php-fpm ./apparmor.d/samba-bgqd ./apparmor.d/samba-dcerpcd ./apparmor.d/samba-rpcd ./apparmor.d/samba-rpcd-classic ./apparmor.d/samba-rpcd-spoolss ./apparmor.d/sbin.klogd ./apparmor.d/sbin.syslogd ./apparmor.d/sbin.syslog-ng ./apparmor.d/usr.lib.apache2.mpm-prefork.apache2 ./apparmor.d/usr.lib.dovecot.anvil ./apparmor.d/usr.lib.dovecot.auth ./apparmor.d/usr.lib.dovecot.config ./apparmor.d/usr.lib.dovecot.deliver ./apparmor.d/usr.lib.dovecot.dict ./apparmor.d/usr.lib.dovecot.director ./apparmor.d/usr.lib.dovecot.doveadm-server ./apparmor.d/usr.lib.dovecot.dovecot-auth ./apparmor.d/usr.lib.dovecot.dovecot-lda ./apparmor.d/usr.lib.dovecot.imap ./apparmor.d/usr.lib.dovecot.imap-login ./apparmor.d/usr.lib.dovecot.lmtp ./apparmor.d/usr.lib.dovecot.log ./apparmor.d/usr.lib.dovecot.managesieve ./apparmor.d/usr.lib.dovecot.managesieve-login ./apparmor.d/usr.lib.dovecot.pop3 ./apparmor.d/usr.lib.dovecot.pop3-login ./apparmor.d/usr.lib.dovecot.replicator ./apparmor.d/usr.lib.dovecot.script-login ./apparmor.d/usr.lib.dovecot.ssl-params ./apparmor.d/usr.lib.dovecot.stats ./apparmor.d/usr.sbin.apache2 ./apparmor.d/usr.sbin.avahi-daemon ./apparmor.d/usr.sbin.dnsmasq ./apparmor.d/usr.sbin.dovecot ./apparmor.d/usr.sbin.identd ./apparmor.d/usr.sbin.mdnsd ./apparmor.d/usr.sbin.nmbd ./apparmor.d/usr.sbin.nscd ./apparmor.d/usr.sbin.ntpd ./apparmor.d/usr.sbin.smbd ./apparmor.d/usr.sbin.smbldap-useradd ./apparmor.d/usr.sbin.traceroute ./apparmor.d/usr.sbin.winbindd ./apparmor.d/zgrep; do \fn=$(basename $profile); \echo "# Site-specific additions and overrides for '$fn'" > ./apparmor.d/local/$fn; \grep "include[[:space:]]\\+if[[:space:]]\\+exists[[:space:]]\\+<local/$fn>" "$profile" >/dev/null || { echo "$profile doesn't contain include if exists <local/$fn>" ; exit 1; } ; \
done

(3)检查

运行make check命令进行检查。实际命令及结果如下所示:

$ make check
for profile in ./apparmor.d/bin.ping ./apparmor.d/lsb_release ./apparmor.d/nvidia_modprobe ./apparmor.d/php-fpm ./apparmor.d/samba-bgqd ./apparmor.d/samba-dcerpcd ./apparmor.d/samba-rpcd ./apparmor.d/samba-rpcd-classic ./apparmor.d/samba-rpcd-spoolss ./apparmor.d/sbin.klogd ./apparmor.d/sbin.syslogd ./apparmor.d/sbin.syslog-ng ./apparmor.d/usr.lib.apache2.mpm-prefork.apache2 ./apparmor.d/usr.lib.dovecot.anvil ./apparmor.d/usr.lib.dovecot.auth ./apparmor.d/usr.lib.dovecot.config ./apparmor.d/usr.lib.dovecot.deliver ./apparmor.d/usr.lib.dovecot.dict ./apparmor.d/usr.lib.dovecot.director ./apparmor.d/usr.lib.dovecot.doveadm-server ./apparmor.d/usr.lib.dovecot.dovecot-auth ./apparmor.d/usr.lib.dovecot.dovecot-lda ./apparmor.d/usr.lib.dovecot.imap ./apparmor.d/usr.lib.dovecot.imap-login ./apparmor.d/usr.lib.dovecot.lmtp ./apparmor.d/usr.lib.dovecot.log ./apparmor.d/usr.lib.dovecot.managesieve ./apparmor.d/usr.lib.dovecot.managesieve-login ./apparmor.d/usr.lib.dovecot.pop3 ./apparmor.d/usr.lib.dovecot.pop3-login ./apparmor.d/usr.lib.dovecot.replicator ./apparmor.d/usr.lib.dovecot.script-login ./apparmor.d/usr.lib.dovecot.ssl-params ./apparmor.d/usr.lib.dovecot.stats ./apparmor.d/usr.sbin.apache2 ./apparmor.d/usr.sbin.avahi-daemon ./apparmor.d/usr.sbin.dnsmasq ./apparmor.d/usr.sbin.dovecot ./apparmor.d/usr.sbin.identd ./apparmor.d/usr.sbin.mdnsd ./apparmor.d/usr.sbin.nmbd ./apparmor.d/usr.sbin.nscd ./apparmor.d/usr.sbin.ntpd ./apparmor.d/usr.sbin.smbd ./apparmor.d/usr.sbin.smbldap-useradd ./apparmor.d/usr.sbin.traceroute ./apparmor.d/usr.sbin.winbindd ./apparmor.d/zgrep; do \fn=$(basename $profile); \echo "# Site-specific additions and overrides for '$fn'" > ./apparmor.d/local/$fn; \grep "include[[:space:]]\\+if[[:space:]]\\+exists[[:space:]]\\+<local/$fn>" "$profile" >/dev/null || { echo "$profile doesn't contain include if exists <local/$fn>" ; exit 1; } ; \
done
*** Checking profiles from ./apparmor.d and ./apparmor/profiles/extras/ against apparmor_parser
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
*** Checking abstractions from ./apparmor.d/abstractions against apparmor_parser
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
*** Checking profiles from ./apparmor.d against logprof
正在在 /home/penghao/AppArmor/apparmor/profiles/apparmor.d 中更新 AppArmor 配置文件。从 /dev/null 读取日志条目。投诉模式更改:强制模式更改:*** Checking if all abstractions (with a few exceptions) contain include if exists <abstractions/*.d>
*** Checking if all extra profiles contain include if exists <local/*>

(4)安装 

运行make install命令进行安装。实际命令及结果如下所示:

$ sudo make install
[sudo] penghao 的密码:for profile in ./apparmor.d/bin.ping ./apparmor.d/lsb_release ./apparmor.d/nvidia_modprobe ./apparmor.d/php-fpm ./apparmor.d/samba-bgqd ./apparmor.d/samba-dcerpcd ./apparmor.d/samba-rpcd ./apparmor.d/samba-rpcd-classic ./apparmor.d/samba-rpcd-spoolss ./apparmor.d/sbin.klogd ./apparmor.d/sbin.syslogd ./apparmor.d/sbin.syslog-ng ./apparmor.d/usr.lib.apache2.mpm-prefork.apache2 ./apparmor.d/usr.lib.dovecot.anvil ./apparmor.d/usr.lib.dovecot.auth ./apparmor.d/usr.lib.dovecot.config ./apparmor.d/usr.lib.dovecot.deliver ./apparmor.d/usr.lib.dovecot.dict ./apparmor.d/usr.lib.dovecot.director ./apparmor.d/usr.lib.dovecot.doveadm-server ./apparmor.d/usr.lib.dovecot.dovecot-auth ./apparmor.d/usr.lib.dovecot.dovecot-lda ./apparmor.d/usr.lib.dovecot.imap ./apparmor.d/usr.lib.dovecot.imap-login ./apparmor.d/usr.lib.dovecot.lmtp ./apparmor.d/usr.lib.dovecot.log ./apparmor.d/usr.lib.dovecot.managesieve ./apparmor.d/usr.lib.dovecot.managesieve-login ./apparmor.d/usr.lib.dovecot.pop3 ./apparmor.d/usr.lib.dovecot.pop3-login ./apparmor.d/usr.lib.dovecot.replicator ./apparmor.d/usr.lib.dovecot.script-login ./apparmor.d/usr.lib.dovecot.ssl-params ./apparmor.d/usr.lib.dovecot.stats ./apparmor.d/usr.sbin.apache2 ./apparmor.d/usr.sbin.avahi-daemon ./apparmor.d/usr.sbin.dnsmasq ./apparmor.d/usr.sbin.dovecot ./apparmor.d/usr.sbin.identd ./apparmor.d/usr.sbin.mdnsd ./apparmor.d/usr.sbin.nmbd ./apparmor.d/usr.sbin.nscd ./apparmor.d/usr.sbin.ntpd ./apparmor.d/usr.sbin.smbd ./apparmor.d/usr.sbin.smbldap-useradd ./apparmor.d/usr.sbin.traceroute ./apparmor.d/usr.sbin.winbindd ./apparmor.d/zgrep; do \fn=$(basename $profile); \echo "# Site-specific additions and overrides for '$fn'" > ./apparmor.d/local/$fn; \grep "include[[:space:]]\\+if[[:space:]]\\+exists[[:space:]]\\+<local/$fn>" "$profile" >/dev/null || { echo "$profile doesn't contain include if exists <local/$fn>" ; exit 1; } ; \
done
install -m 755 -d //etc/apparmor.d
install -m 755 -d //etc/apparmor.d/disable
for dir in ./apparmor.d ./apparmor.d/abstractions ./apparmor.d/abstractions/ubuntu-browsers.d ./apparmor.d/abstractions/apparmor_api ./apparmor.d/local ./apparmor.d/apache2.d ./apparmor.d/tunables ./apparmor.d/tunables/home.d ./apparmor.d/tunables/xdg-user-dirs.d ./apparmor.d/tunables/multiarch.d ./apparmor.d/abi ; do \install -m 755 -d "//etc/apparmor.d/${dir#./apparmor.d}" ; \
done
for file in $(find ./apparmor.d -type f -print) ; do \install -m 644 "${file}" "//etc/apparmor.d/$(dirname ${file#./apparmor.d})" ; \
done
install -m 755 -d //usr/share/apparmor/extra-profiles/
install -m 644 ./apparmor/profiles/extras//* //usr/share/apparmor/extra-profiles/

至此,Profiles就构建并安装完成了。

http://www.lryc.cn/news/60619.html

相关文章:

  • Unity - 带耗时 begin ... end 的耗时统计的Log - TSLog
  • Python 智能项目:1~5
  • C++设计模式:面试题精选集
  • 蓝桥 卷“兔”来袭编程竞赛专场-10仿射加密 题解
  • android so库导致的闪退及tombstone分析
  • 图结构基本知识
  • Hibernate 的多种查询方式
  • FreeRTOS 任务调度及相关函数详解(一)
  • 飞桨paddlespeech语音唤醒推理C实现
  • 04-Mysql常用操作
  • TensorFlow 2 和 Keras 高级深度学习:1~5
  • UML类图
  • 【Python】【进阶篇】二十六、Python爬虫的Scrapy爬虫框架
  • PyTorch 深度学习实用指南:6~8
  • 数据湖 Hudi 核心概念
  • 爬虫请求头Content-Length的计算方法
  • Open Inventor 2023.1 Crack
  • 【华为OD机试真题】查找树中元素(查找二叉树节点)(javaC++python)100%通过率
  • 常用设计模式
  • 时序分析 49 -- 贝叶斯时序预测(一)
  • 从传统管理到智慧水务:数字化转型的挑战与机遇
  • ROS学习第十八节——launch文件(详细介绍)
  • javaweb在校大学生贷款管理系统ns08a9
  • 分布式之搜索解决方案es
  • CSDN 编程竞赛四十六期题解
  • Linux——进程
  • 计及氢能的综合能源优化调度研究(Matlab代码实现)
  • 基于Bert的知识库智能问答系统
  • libapparmor非默认目录构建和安装
  • 2023-04-14 算法面试中常见的查找表问题