type gpsd, domain;
type gpsd_exec, exec_type, vendor_file_type, file_type;

init_daemon_domain(gpsd)
net_domain(gpsd)

allow gpsd gpsd:capability { net_raw };
allow gpsd serial_device:chr_file rw_file_perms;

# The following are needed by logwrapper to get gpsd's output
# to Android's logs.
typeattribute gpsd vendor_executes_system_violators;
allow gpsd shell_exec:file { execute execute_no_trans read open getattr };
allow gpsd vendor_file:file { execute execute_no_trans read open getattr };
allow gpsd devpts:chr_file { read write open getattr };
allow gpsd gpsd_exec:file { execute execute_no_trans read open getattr };
allow gpsd vendor_shell_exec:file { execute execute_no_trans read open getattr };
