1*e4a36f41SAndroid Build Coastguard Worker# 2*e4a36f41SAndroid Build Coastguard Worker# Common neverallow permissions 3*e4a36f41SAndroid Build Coastguard Workerdefine(`no_w_file_perms', `{ append create link unlink relabelfrom rename setattr write }') 4*e4a36f41SAndroid Build Coastguard Workerdefine(`no_rw_file_perms', `{ no_w_file_perms open read ioctl lock watch watch_mount watch_sb watch_with_perm watch_reads }') 5*e4a36f41SAndroid Build Coastguard Workerdefine(`no_x_file_perms', `{ execute execute_no_trans }') 6*e4a36f41SAndroid Build Coastguard Workerdefine(`no_w_dir_perms', `{ add_name create link relabelfrom remove_name rename reparent rmdir setattr write }') 7*e4a36f41SAndroid Build Coastguard Worker 8*e4a36f41SAndroid Build Coastguard Worker##################################### 9*e4a36f41SAndroid Build Coastguard Worker# neverallow_establish_socket_comms(src, dst) 10*e4a36f41SAndroid Build Coastguard Worker# neverallow src domain establishing socket connections to dst domain. 11*e4a36f41SAndroid Build Coastguard Worker# 12*e4a36f41SAndroid Build Coastguard Workerdefine(`neverallow_establish_socket_comms', ` 13*e4a36f41SAndroid Build Coastguard Worker neverallow $1 $2:socket_class_set { connect sendto }; 14*e4a36f41SAndroid Build Coastguard Worker neverallow $1 $2:unix_stream_socket connectto; 15*e4a36f41SAndroid Build Coastguard Worker') 16