type cnss_diag_exec, exec_type, file_type;

userdebug_or_eng(`
  type cnss_diag, domain;

  init_daemon_domain(cnss_diag)

  allow cnss_diag firmware_file:dir search;
  allow cnss_diag self:capability { setuid net_admin setgid };
  allow cnss_diag self:netlink_route_socket create_socket_perms;
  allow cnss_diag self:netlink_socket create_socket_perms;
  allow cnss_diag self:udp_socket create_socket_perms;
')