Linux????(capability)???????
???????????? ???????[ 2016/3/29 11:24:01 ] ?????????????? Linux
??????н??????
xlzh@cmos:~/code/capability$ gcc child.c -o child
xlzh@cmos:~/code/capability$ gcc father.c -o father -lcap
xlzh@cmos:~/code/capability$ sudo setcap cap_dac_override??cap_sys_time+ei child
xlzh@cmos:~/code/capability$ sudo setcap cap_dac_override??cap_sys_time+ip father
/* ??????У?child?????E(effective)I(inheritable)???????????child?????????κ??????? ???ù??(cap_bset????1)
* P'(permitted) = (P(inheritable) & F(inheritable)) | (F(permitted) & cap_bset) // P'(permitted) = (0x0 & 0x2000002) | (0x0 & ?1)??????0
* P'(effective) = F(effective) ? P'(permitted) : 0 // P'(effective) = 1 ? P'(permitted) : 0?? ????P'(permitted)????0
* P'(inheritable) = P(inheritable) // P'(inheritable) = 0
* ??н?????????
*/
xlzh@cmos:~/code/capability$ ./child
child Cap data permitted: 0x0?? effective: 0x0?? inheritable 0x0
/* ??????У?child?????E(effective)I(inheritable)???????????child??father?????E(inheritable)??P(permitted)?????? ???ù??
* P'(permitted) = (P(inheritable) & F(inheritable)) | (F(permitted) & cap_bset) // P'(permitted) = (0x2000002 & 0x2000002) | (0x2000002 & ?1)??????0
* P'(effective) = F(effective) ? P'(permitted) : 0 // P'(effective) = 1 ? P'(permitted) : 0?? ????P'(permitted)????0x2000002
* P'(inheritable) = P(inheritable) // P'(inheritable) = 0x2000002
* ??н?????????
*/
xlzh@cmos:~/code/capability$ ./father
father Cap data permitted: 0x2000002?? effective: 0x0?? inheritable: 0x2000002
child Cap data permitted: 0x2000002?? effective: 0x2000002?? inheritable 0x2000002
????????????????child????г????????????κ?????????????father?????????????child????г???????????????????????
??????????father??child?????????????cap_dac_override??cap_sys_time?????????????????????г??????????????????????λ????????????????????????ù?????м???
????4????root????????г???
????1????root????????г?????y??????????????P??I?????1
????2????root????????г?????y????E???
????/*???????child???????????I??????????child?????inheritable??0?? ??????????1*/
????xlzh@cmos:~/code/capability$ sudo ./child
????child Cap data permitted: 0xffffffff?? effective: 0xffffffff?? inheritable 0x0
????5?????????ID??仯???????????
????1??????????????Ч???ID??0?仯????0?? ??????е?E????????
????2??????????????Ч???ID???0?仯??0????????е?P?????????E????
????3???????????????????????ID????Ч???ID?????????????ID??0???????Щ??????ЩID????????0????????е??P??E???????????
????4??????????????????ID??0????0????????μ???????E???????????CAP_CHOWN?? CAP_DAC_OVERRIDE?? CAP_DAC_READ_SEARCH?? CAP_FOWNER?? CAP_FSETID?? CAP_LINUX_IMMUTABLE (since Linux 2.2.30)?? CAP_MAC_OVERRIDE?? CAP_MKNOD??????????????????ID??0????0???????P?????????????????????E?????С?
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????