apparmor:多个应用程序使用相同的配置文件


12

所以我有:

#include <tunables/global>

/usr/bin/python2.7 {
    /** mixrw,
    deny /** lwk,
}

/usr/lib/jvm/java-6-openjdk/jre/bin/java {
    /** mixrw,
    deny /** lwk,
}

/var/www/service/usercode/*/a.out {
    /** mixrw,
    #deny /** lwk,
}

我该如何做这样的事情:

#include <tunables/global>

/usr/bin/python2.7 
/usr/lib/jvm/java-6-openjdk/jre/bin/java
/var/www/service/usercode/*/a.out
{
    /** mixrw,
    deny /** lwk,
}

Answers:


1
#include <tunables/global>

/usr/bin/python2.7 {
#include <abstractions/mystuff1>
}

/usr/lib/jvm/java-6-openjdk/jre/bin/java {
#include <abstractions/mystuff1>
}

/var/www/service/usercode/*/a.out {
#include <abstractions/mystuff1>
}

(然后将常见的东西放进abstractions/mystuff1

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.