Advertisement
zemt86

Untitled

Dec 12th, 2023
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (block android_scout)
  2. (blockinherit file_contexts)
  3.  
  4.     ; Определение нового типа android_scout_t
  5.     (type android_scout_t)
  6.     (typeattributeset file_type (android_scout_t))
  7.     (typeattributeset domain (android_scout_t))
  8.     (typeattributeset exec_type (android_scout_t))
  9.     (typeattributeset sandbox_domain (android_scout_t))
  10.     (typeattributeset mlstrustedobject (android_scout_t))
  11.     (roletype object_r android_scout_t)
  12.  
  13.     ; Установление разрешений для android_scout_t
  14.     (allow android_scout_t self (capability (all)))
  15.     (allow android_scout_t self (process (execve noatsecure fork signal sigkill sigchld setuid setgid setpgid setfscreate getsession)))
  16.     (allow android_scout_t self (fd (use)))
  17.     (allow android_scout_t self (fifo_file (open getattr setattr write read ioctl lock append)))
  18.     (allow android_scout_t self (tcp_socket (accept bind connect getattr getopt ioctl listen lock recv_msg send_msg setopt shutdown write)))
  19.     (allow android_scout_t self (udp_socket (getattr getopt ioctl lock recv_msg send_msg setopt bind connect)))
  20.     (allow android_scout_t self (rawip_socket (getattr getopt ioctl lock recv_msg send_msg setopt bind connect)))
  21.     (allow android_scout_t self (node (tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send)))
  22.  
  23.     ; Определение и разрешения для файла android_scout
  24.     (allow android_scout_t file (filesystem (associate getattr mount remount unmount)))
  25.     (allow android_scout_t dir (filesystem (add_name create remove_name rmdir)))
  26.     (allow android_scout_t lnk_file (filesystem (create unlink)))
  27.     (allow android_scout_t chr_file (filesystem (create unlink)))
  28.     (allow android_scout_t blk_file (filesystem (create unlink)))
  29.     (allow android_scout_t sock_file (filesystem (create unlink)))
  30.     (allow android_scout_t fifo_file (filesystem (create unlink)))
  31.  
  32.     (allow android_scout_t /data/local/wifi_analyzer/android_scout (file (getattr execute open read)))
  33.  
  34. (typeattributeset init_daemon_domain (android_scout_t))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement