Skip to content

Commit

Permalink
camera_device: remove type
Browse files Browse the repository at this point in the history
camera_device didn't really offer much in terms of control considering
that most domains that need camera_device, also need video_device and
vice versa.

Thus, drop camera_device from the policy.

Change-Id: Ib7773985ba3b93537702b113a2deb5d2f6f3c7ef
  • Loading branch information
William Roberts authored and ciwrl committed Nov 25, 2016
1 parent bcdb3b1 commit b0ed8e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sepolicy/camera.te
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ type camera_exec, exec_type, file_type;
init_daemon_domain(camera)

# Interact with other media devices
allow camera camera_device:dir search;
allow camera { video_device camera_device }:chr_file rw_file_perms;
allow camera video_device:dir search;
allow camera { gpu_device video_device }:chr_file rw_file_perms;
allow camera { surfaceflinger mediaserver }:fd use;

# Create front and back camera sockets (/data/cam_socket[01])
Expand Down
9 changes: 4 additions & 5 deletions sepolicy/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@
/dev/ttyUSB0 u:object_r:radio_device:s0

# Jpeg Engine support
/dev/gemini.* u:object_r:camera_device:s0
/dev/gemini.* u:object_r:video_device:s0
# MSM camera related
/dev/v4l-subdev.* u:object_r:camera_device:s0
/dev/video([0-9])+ u:object_r:camera_device:s0
/dev/msm_camera(/.*)? u:object_r:camera_device:s0
/dev/media([0-9])+ u:object_r:camera_device:s0
/dev/v4l-subdev.* u:object_r:video_device:s0
/dev/msm_camera(/.*)? u:object_r:video_device:s0
/dev/media([0-9])+ u:object_r:video_device:s0

# Qualcomm MSM Audio devices
/dev/msm_acdb u:object_r:audio_device:s0
Expand Down

0 comments on commit b0ed8e7

Please sign in to comment.