1 | user full_u roles { mgr_r cashier_r }; |
1 | role cashier_r types { cashier_t cashier_register_t }; |
1 | allow mgr_r cashier_r; |
1 | allow cashier_r mgr_r; |
1 | allow mgr_r cashier_r; |
1 2 3 4 5 6 7 | echo 0 > /selinux/enforce cat > /root/addme << EOF f=open("/proc/self/attr/current", "r") print f.readlines() f.close() EOF nano /bin/register.py |
1 2 | echo 1 > /selinux/enforce logout |
1 2 | echo "full_u:cashier_r:cashier_register_t" > /proc/self/attr/exec /bin/register.py bob 25 |
1 2 | echo "full_u:mgr_r:mgr_register_t" > /proc/self/attr/exec /bin/register.py bob 25 |
1 2 | echo "full_u:mgr_r:cashier_register_t" > /proc/self/attr/exec /bin/register.py bob 25 |
1 2 3 | echo "full_u:mgr_r:cashier_register_t" > /proc/self/attr/exec echo $? 1 |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |