Linux 脚本执行:由一个补丁分析说起
事情背景 补丁链接:a4ae32c71fe9 (“exec: Always set cap_ambient in cap_bprm_set_creds”) 补丁信息中提到,该补丁是为了确保 cap_bprm_set_creds() 每次都会设置 cap_ambient 变量。另外还提到了下述内容:
… if there is a suid or sgid script with an interpreter that has neither the suid nor the sgid bits set the interpreter should be able to accept …