????AppArmor

????????????о?OJ??oline judge??????????????????????????о?Linux???????????????????Apparmor??????????????

????AppArmor(Application Armor)??Linux????????????飬AppArmor???????????????????????????????????????????????????????????????AppArmor????SELinux??????????????????????????????????????????д????????Щ???????????????????????????Unix????????????????????AppArmor?????????????????????????????2.6?汾??Linux????С?

??????Ubuntu???????Apparmor?? ??????????л?????????????????????????????????????????????????в????????????λ?????

?????????????????????

????Apparmor?????????????????????

????AppArmor's unique security model is to bind access control attributes to programs rather than to users.

???????????????????????·???/home/lei/demoexe????????Apparmor??????з??????????????????????????????????????д????????????????????home.lei.demoexe???????????????????Apparmor??????????????????£?/etc/apparmor.d??????????????????????????????????????????????????demoexe??????????????????????Ч??

?????????????????

????Apparmor?????????????enforcement??complain/learning

????Enforcement – ?????????£???????????г???????????????????У????????Υ????Щ?????????????????????????

????Complain – ?????????£???????????????????????????У?Apparmor??????????????м??????????????д?????????????????????????????Apparmor??????????????????????????м????

????????complain???????????????????????????????——????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????

?????????????????????????

????Apparmor??????????ж?????????????????????????????

??????1???????????????

????Apparmor?????????????????????????μ???????з?????????????????????????

 

r

Read mode

w

Write mode (mutually exclusive toa)

a

Append mode (mutually exclusive tow)

k

File locking mode

l

Link mode

linkfile->target

Link pair rule (cannot be combined with other access modes)

???????????д????????????????????п????x?????????г???……

??????????????е?д????

?????? /tmp r?? (??????/tmp???μ???????ж??)

???????????????????????г?????????????????????????е??????????