Commit graph

103 commits

Author SHA1 Message Date
Jeff Sharkey
6fb97cd547 Merge "Offer to cache ringtones in system DE storage." into nyc-dev 2016-02-23 20:57:46 +00:00
Jeff Sharkey
62bb52c4d4 Offer to cache ringtones in system DE storage.
Ringtones often live on shared media, which is now encrypted with CE
keys and not available until after the user is unlocked.  To improve
the user experience while locked, cache the default ringtone,
notification sound, and alarm sound in a DE storage area.

Also fix bug where wallpaper_file wasn't getting data_file_type.

Bug: 26730753
Change-Id: Ib1f08d03eb734c3dce91daab41601d3ed14f4f0d
2016-02-23 13:45:29 -07:00
Jeff Vander Stoep
8d9eb644dc ioctls: move commonly used tty ioctls to macro
Remove from unpriv_socket_ioctls but grant each user of unpriv_socket_ioctls
use of unpriv_tty_ioctls

Bug: 26990688
Change-Id: I998e09091de5a7234ad0049758d5dad0b35722f7
2016-02-22 12:31:57 -08:00
Chien-Yu Chen
bf624c14a7 mediaserver: Allow finding cameraserver
Bug: 27221797
Change-Id: Ie490eac5e7581ce21ca5377c3b46b48c647a335b
2016-02-17 11:54:55 -08:00
Chien-Yu Chen
d2b36b2f3e Merge "cameraserver: Build up least privileged policy" into nyc-dev 2016-02-11 21:56:29 +00:00
Jeff Vander Stoep
8f62670381 mediaserver remove kernel module loading perm
Bug: 27065131
Change-Id: I15c058eb46981ea3e03eccb4da132055ecae7efb
2016-02-10 15:10:50 -08:00
Jeff Vander Stoep
4541687be5 cameraserver: Build up least privileged policy
Remove all permissions not observed during testing.

Remove domain_deprecated.

Bug: 26982110
Change-Id: I33f1887c95bdf378c945319494378225b41db215
2016-02-09 18:00:59 -08:00
Marco Nelissen
c3ba2e5130 selinux rules for codec process
Bug: 22775369

Change-Id: Ic6abe3d0e18ba6f7554d027e0ec05fd19011709b
2016-02-09 14:13:13 -08:00
Daichi Hirono
4e6d20c7ba Merge "Add SELinux label for app fuse." am: e3965aa295
am: 52719ea514

* commit '52719ea514f534743052eaf0986961a1eaa39c88':
  Add SELinux label for app fuse.
2016-02-06 07:23:32 +00:00
Daichi Hirono
e178ac5a71 Add SELinux label for app fuse.
The labels for filesystem and files are assigned by vold with using
context= mount option.

Change-Id: I8a9d701a46a333093a27107fc3c52b17a2af1a94
2016-02-05 16:10:53 +09:00
Marco Nelissen
b1bf83fd79 Revert "selinux rules for codec process"
This reverts commit 2afb217b68.

Change-Id: Ie2ba8d86f9c7078f970afbb06230f9573c28e0ed
2016-01-28 13:51:28 -08:00
Jeffrey Vander Stoep
c08eeee540 Merge "mediaserver: grant perms from domain_deprecated" am: 3d8391e759
am: 15decd6955

* commit '15decd6955093683a9d78cc2983d7ea49f20bba2':
  mediaserver: grant perms from domain_deprecated
2016-01-28 15:40:30 +00:00
Jeff Vander Stoep
72e78bfcac mediaserver: grant perms from domain_deprecated
In preparation of removing permissions from domain_deprecated.

Addresses:
avc: denied { getattr } for path="/proc/self" dev="proc" ino=4026531841 scontext=u:r:mediaserver:s0 tcontext=u:object_r:proc:s0 tclass=lnk_file permissive=1
avc: denied { read } for name="mediadrm" dev="mmcblk0p24" ino=209 scontext=u:r:mediaserver:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=1
avc: denied { open } for path="/vendor/lib/mediadrm" dev="mmcblk0p24" ino=209 scontext=u:r:mediaserver:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=1

Change-Id: Ibffa0c9a31316b9a2f1912ae68a8dcd3a4e671b7
2016-01-27 19:33:42 -08:00
Chien-Yu Chen
e0378303b5 selinux: Update policies for cameraserver
Update policies for cameraserver so it has the same permissions
as mediaserver.

Bug: 24511454
Change-Id: I1191e2ac36c00b942282f8dc3db9903551945adb
2016-01-27 11:29:11 -08:00
Marco Nelissen
2afb217b68 selinux rules for codec process
Bug: 22775369
Change-Id: I9733457b85dbaeb872b8f4aff31d0b8808fa7d44
2016-01-22 14:43:14 -08:00
Jeffrey Vander Stoep
4c26574012 Merge "camera_device: remove type and add typealias" am: c15e1036d4
am: 1ac3573614

* commit '1ac3573614354b50dabf4e09ade764c930286c2e':
  camera_device: remove type and add typealias
2016-01-15 19:41:34 +00:00
William Roberts
b7aace2db0 camera_device: remove type and add typealias
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 and add a temporary typealias.

Change-Id: I144c0bb49a9a68ab1bdf636c64abe656f3e677b4
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-01-12 13:54:34 -08:00
Dongwon Kang
e835c3f72c Allow mediaserver to access media_resource_monitor
Bug: 26175834
Change-Id: I49244f8e6165ea5a871955f07b3c4ea40cbd7c59
2016-01-12 09:30:08 -08:00
Jeff Vander Stoep
0fd910ecfd audio/mediaserver: Restrict to unprivileged socket ioctls
Neverallow access to privileged commands.

Change-Id: I443be5bbcd8cdf55e23c2c4d8fee93c4ebf30e55
2016-01-06 11:34:02 -08:00
Marco Nelissen
b03831fe58 Add rules for running audio services in audioserver
audioserver has the same rules as mediaserver so there is
no loss of rights or permissions.

media.log moves to audioserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: I0fff24c14b712bb3d498f75e8fd66c2eb795171d
2015-12-07 17:33:20 -08:00
Jeff Vander Stoep
ae72bf241d Populate autoplay_app with minimal set of permissions
Change-Id: Ia90fb531cfd99d49d179921f041dd93c7325ad50
2015-11-25 09:41:05 -08:00
Jeff Vander Stoep
d20a46ef17 Create attribute for moving perms out of domain am: d22987b4da am: e2280fbcdd
am: b476b95488

* commit 'b476b954882a48bf2c27da0227209c197dcfb666':
  Create attribute for moving perms out of domain
2015-11-04 00:07:02 +00:00
Jeff Vander Stoep
d22987b4da Create attribute for moving perms out of domain
Motivation: Domain is overly permissive. Start removing permissions
from domain and assign them to the domain_deprecated attribute.
Domain_deprecated and domain can initially be assigned to all
domains. The goal is to not assign domain_deprecated to new domains
and to start removing domain_deprecated where it is not required or
reassigning the appropriate permissions to the inheriting domain
when necessary.

Bug: 25433265
Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
2015-11-03 23:11:11 +00:00
Marco Nelissen
0f754edf7b Update selinux policies for mediaextractor process
Change-Id: If761e0370bf9731a2856d0de2c6a6af1671143bd
2015-10-27 12:58:04 -07:00
Daniel Cashman
84279f0454 am 226caf49: Merge "Remove mediaserver sysfs write permissions."
* commit '226caf49e0f913a723ec6c707f9abf5516c6f906':
  Remove mediaserver sysfs write permissions.
2015-09-29 16:39:12 +00:00
dcashman
6c451da4ec Remove mediaserver sysfs write permissions.
Mediaserver no longer appears, and maybe never did, need write
permission to sysfs files.
commit: 1de9c492d1 added auditing to
make sure this is the case, and such access has not been observed.
Remove the permissions and the associated auditallow rule to further
confine the mediaserver sandbox.

Bug: 22827371
Change-Id: I44ca1521b9791db027300aa84e54c074845aa735
2015-09-22 13:03:41 -07:00
Nick Kralevich
33f363693a am eb8b2188: Merge "document the non-ART-related reasons for execmem"
* commit 'eb8b2188e895d6dbc57c875bba87332d3dca9a03':
  document the non-ART-related reasons for execmem
2015-09-16 23:25:31 +00:00
Daniel Micay
b7c881f89a document the non-ART-related reasons for execmem
Change-Id: I455fe33345dd1ae8dc49cb7b70cbf1e7c1b3e271
2015-09-14 19:59:16 -04:00
Nick Kralevich
25e011761f am bf65c7ef: mediaserver: remove /system/bin/toolbox exec access
* commit 'bf65c7ef5f63782737ac7605009717d7e1987462':
  mediaserver: remove /system/bin/toolbox exec access
2015-08-14 16:50:04 +00:00
Nick Kralevich
bf65c7ef5f mediaserver: remove /system/bin/toolbox exec access
In Android 5.1, mediaserver couldn't execute any file on
/system. This slightly regressed due to
8a0c25efb0, which granted mediaserver
access to execute /system/bin/toolbox and /system/bin/toybox

Revoke that unneeded access and add a neverallow rule to prevent
regressions.

TODO: Remove toolbox_exec:file execute permissions from domain.te
and add it back to the specific domains that need it.

Change-Id: Ia7bc6028a9ffb723d4623d91cbe15c8c1bbb2eb9
2015-08-13 22:41:48 -07:00
Daniel Micay
4e6be01eac am 1de9c492: auditallow w_file_perms for mediaserver
* commit '1de9c492d1343f7c92b4a7d6aa8da82c97bbf7d8':
  auditallow w_file_perms for mediaserver
2015-07-30 00:15:34 +00:00
Daniel Micay
1de9c492d1 auditallow w_file_perms for mediaserver
The device-independent code only needs read access to sysfs, and this
appears to be enough for at least some devices (Nexus 5).

Bug: 22827371
Change-Id: I3b7b068e98f11f9133f0bdea8ece363e4bd89ae8
2015-07-29 21:55:57 +00:00
Ruben Brunk
e1edbe9c97 camera: Add AIDL interface for CameraServiceProxy.
- Update selinux policy for CameraServiceProxy.

Bug: 21267484
Change-Id: Ib821582794ddd1e3574b5dc6c79f7cb197b57f10
2015-05-19 17:26:31 -07:00
William Roberts
2f5a6a96bd Replace unix_socket_connect() and explicit property sets with macro
A common source of mistakes when authoring sepolicy is properly
setting up property sets. This is a 3 part step of:
1. Allowing the unix domain connection to the init/property service
2. Allowing write on the property_socket file
3. Allowing the set on class property_service

The macro unix_socket_connect() handled 1 and 2, but could be
confusing for first time policy authors. 3 had to be explicitly
added.

To correct this, we introduce a new macros:
set_prop(sourcedomain, targetprop)

This macro handles steps 1, 2 and 3.

No difference in sediff is expected.

(cherrypicked from commit 625a3526f1)

Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
Signed-off-by: William Roberts <william.c.roberts@linux.intel.com>
2015-05-07 10:32:06 -07:00
William Roberts
625a3526f1 Replace unix_socket_connect() and explicit property sets with macro
A common source of mistakes when authoring sepolicy is properly
setting up property sets. This is a 3 part step of:
1. Allowing the unix domain connection to the init/property service
2. Allowing write on the property_socket file
3. Allowing the set on class property_service

The macro unix_socket_connect() handled 1 and 2, but could be
confusing for first time policy authors. 3 had to be explicitly
added.

To correct this, we introduce a new macros:
set_prop(sourcedomain, targetprop)

This macro handles steps 1, 2 and 3.

No difference in sediff is expected.

Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
Signed-off-by: William Roberts <william.c.roberts@linux.intel.com>
2015-05-07 00:02:59 +00:00
dcashman
bd7f5803f9 Enforce more specific service access.
Move the remaining services from tmp_system_server_service to appropriate
attributes and remove tmp_system_server and associated logging:

registry
restrictions
rttmanager
scheduling_policy
search
sensorservice
serial
servicediscovery
statusbar
task
textservices
telecom_service
trust_service
uimode
updatelock
usagestats
usb
user
vibrator
voiceinteraction
wallpaper
webviewupdate
wifip2p
wifi
window

Bug: 18106000
Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
2015-04-09 09:45:54 -07:00
dcashman
03a6f64f95 Enforce more specific service access.
Move the following services from tmp_system_server_service to appropriate
attributes:

network_management
network_score
notification
package
permission
persistent
power
print
processinfo
procstats

Bug: 18106000
Change-Id: I9dfb41fa41cde72ef0059668410a2e9eb1af491c
2015-04-08 20:26:50 +00:00
dcashman
4cdea7fc40 Assign app_api_service attribute to services.
Assign the alarm, appwidget, assetatlas, audio, backup and batterystats services
the appropriate service access levels and move into enforcing.

Bug: 18106000
Change-Id: If3210bb25f3076edfdb6eec36ef6521ace1bd8d7
2015-04-06 13:20:41 -07:00
dcashman
b075338d0e Assign app_api_service attribute to services.
Move accessibility, account, appops and activity services into enforcing with
app_api_service level of access, with additional grants to mediaserver and
isolated app.

Bug: 18106000
Change-Id: I1d5a79b9223026415f1690e8e9325ec4c270e3dd
2015-04-03 14:29:40 -07:00
dcashman
d12993f084 Add system_api_service and app_api_service attributes.
System services differ in designed access level.  Add attributes reflecting this
distinction and label services appropriately.  Begin moving access to the newly
labeled services by removing them from tmp_system_server_service into the newly
made system_server_service attribute.  Reflect the move of system_server_service
from a type to an attribute by removing access to system_server_service where
appropriate.

Change-Id: I7fd06823328daaea6d6f96e4d6bd00332382230b
2015-04-03 11:20:00 -07:00
dcashman
8af4e9cb00 Record observed service accesses.
Get ready to switch system_server service lookups into enforcing.

Bug: 18106000
Change-Id: Iefd4b2eee6cdd680f5ab423d15cc72a2a30e27cf
2015-04-01 14:30:46 -07:00
dcashman
23f336156d Record observed system_server servicemanager service requests.
Also formally allow dumpstate access to all services and grant system_server
access to address the following non-system_server_service entries:

avc:  granted  { find } for service=drm.drmManager scontext=u:r:system_server:s0 tcontext=u:object_r:drmserver_service:s0 tclass=service_manager
avc:  granted  { find } for service=nfc scontext=u:r:system_server:s0 tcontext=u:object_r:nfc_service:s0 tclass=service_manager

Bug: 18106000
Change-Id: Iad16b36acf44bce52c4824f8b53c0e7731c25602
2015-03-03 11:38:07 -08:00
Nick Kralevich
5cf3994d8a Revert /proc/net related changes
Revert the tightening of /proc/net access. These changes
are causing a lot of denials, and I want additional time to
figure out a better solution.

Addresses the following denials (and many more):

  avc: denied { read } for comm="SyncAdapterThre" name="stats" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="facebook.katana" name="iface_stat_fmt" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="IntentService[C" name="if_inet6" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="dumpstate" name="iface_stat_all" dev="proc" ino=X scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file

This reverts commit 0f0324cc82
and commit 99940d1af5

Bug: 9496886
Bug: 19034637
Change-Id: I436a6e3638ac9ed49afbee214e752fe2b0112868
2015-02-25 13:35:17 -08:00
Nick Kralevich
99940d1af5 remove /proc/net read access from domain.te
SELinux domains wanting read access to /proc/net need to
explicitly declare it.

TODO: fixup the ListeningPortsTest cts test so that it's not
broken.

Bug: 9496886
Change-Id: Ia9f1214348ac4051542daa661d35950eb271b2e4
2015-01-14 22:18:24 +00:00
dcashman
4a89cdfa89 Make system_server_service an attribute.
Temporarily give every system_server_service its own
domain in preparation for splitting it and identifying
special services or classes of services.

Change-Id: I81ffbdbf5eea05e0146fd7fd245f01639b1ae0ef
2015-01-14 13:54:26 -08:00
dcashman
cd82557d40 Restrict service_manager find and list access.
All domains are currently granted list and find service_manager
permissions, but this is not necessary.  Pare the permissions
which did not trigger any of the auditallow reporting.

Bug: 18106000
Change-Id: Ie0ce8de2af8af2cbe4ce388a2dcf4534694c994a
2014-12-15 10:09:24 -08:00
Nick Kralevich
4d23729275 am ebfd9f87: allow oemfs:dir search
* commit 'ebfd9f87197f4a39bbc2a5e4f6c6dffc28be36d7':
  allow oemfs:dir search
2014-10-10 23:18:56 +00:00
Nick Kralevich
ebfd9f8719 allow oemfs:dir search
mediaserver and drmserver both have permission to read oemfs
related files. However, there are no search permissions on the
directory, so the files would be unreachable.

Grant search permissions on the oemfs directory, so that the files
within that directory can be read.

Bug: 17954291
Change-Id: I9e36dc7b940bd46774753c1fa07b0f47c36ff0db
2014-10-10 16:11:03 -07:00
Vineeta Srivastava
e0357cf142 resolved conflicts for merge of 0a20b57f to lmp-dev-plus-aosp
Change-Id: I6a0d56c23888535964e1559cb8ad63fedd27db47
2014-09-16 13:04:06 -07:00
Vineeta Srivastava
0a20b57f88 Added sepolicy for oem customization.
Bug: 16635599

Change-Id: I69f9089dde1fe68762a38f4d97ddee2c20aaaa9d
2014-09-16 12:11:42 -07:00