Commit graph

714 commits

Author SHA1 Message Date
Alex Klyubin
d343fd582c am 3d94272a: am 1fdee11d: 1/2: Rename domain "system" to "system_server".
* commit '3d94272a754a4ea0727c1d4d880944d1d9efd3e7':
  1/2: Rename domain "system" to "system_server".
2013-09-17 09:57:21 -07:00
Alex Klyubin
3d94272a75 am 1fdee11d: 1/2: Rename domain "system" to "system_server".
* commit '1fdee11df2552e29da0c48e3432f26f7a93e3bff':
  1/2: Rename domain "system" to "system_server".
2013-09-17 08:52:24 -07:00
Alex Klyubin
1fdee11df2 1/2: Rename domain "system" to "system_server".
This is a follow-up CL to the extraction of "system_app" domain
from the "system" domain which left the "system" domain encompassing
just the system_server.

Since this change cannot be made atomically across different
repositories, it temporarily adds a typealias "server" pointing to
"system_server". Once all other repositories have been switched to
"system_server", this alias will be removed.

Change-Id: I90a6850603dcf60049963462c5572d36de62bc00
2013-09-17 08:40:12 -07:00
Stephen Smalley
003fbef739 am bbc0c39b: am a770f55b: Remove dbusd policy; dbusd is no more.
* commit 'bbc0c39ba63be2a57017b953d8a676c69d464338':
  Remove dbusd policy; dbusd is no more.
2013-09-13 16:22:45 -07:00
Stephen Smalley
bbc0c39ba6 am a770f55b: Remove dbusd policy; dbusd is no more.
* commit 'a770f55b18da45a2b40436060e64096a5a0ba883':
  Remove dbusd policy; dbusd is no more.
2013-09-13 16:20:45 -07:00
Stephen Smalley
6d26f3d97f am f8d86b82: am 1d435de6: Remove bluetoothd policy; bluetoothd is no more.
* commit 'f8d86b8228b420d3cd548f6214730546810c99f7':
  Remove bluetoothd policy; bluetoothd is no more.
2013-09-13 16:19:29 -07:00
Stephen Smalley
f8d86b8228 am 1d435de6: Remove bluetoothd policy; bluetoothd is no more.
* commit '1d435de685e0842e8d9902480db8b408f43911f6':
  Remove bluetoothd policy; bluetoothd is no more.
2013-09-13 16:17:25 -07:00
Stephen Smalley
a770f55b18 Remove dbusd policy; dbusd is no more.
Change-Id: I9652284bd34d07bd47e2e7df66fcbe5db185ab3f
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 16:16:25 -07:00
Stephen Smalley
1d435de685 Remove bluetoothd policy; bluetoothd is no more.
Change-Id: I153b0aa8a747d6c79839d06fc04b3923eacfa213
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 16:15:25 -07:00
Stephen Smalley
23a52be652 am 1b487cb6: am 8840fa7f: Split system_app from system.
* commit '1b487cb6dac66c2f334864c13f2a2dc941c1e74c':
  Split system_app from system.
2013-09-13 15:15:13 -07:00
Stephen Smalley
1b487cb6da am 8840fa7f: Split system_app from system.
* commit '8840fa7f85e60fc4abd3cedf7cbfc2cd98a4d473':
  Split system_app from system.
2013-09-13 15:12:40 -07:00
Stephen Smalley
8840fa7f85 Split system_app from system.
system_app is for apps that run in the system UID, e.g. Settings.
system is for the system_server.
Split them into separate files and note their purpose in the comment
header of each file.

Change-Id: I19369abc728ba2159fd50ae6b230828857e19f10
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 15:09:11 -07:00
Stephen Smalley
586d7624e9 am 8d72332e: am a62d5c66: Drop obsolete comments about SEAndroidManager.
* commit '8d72332e9a143dfe44d952ab17c521f1f851b173':
  Drop obsolete comments about SEAndroidManager.
2013-09-13 13:33:21 -07:00
Stephen Smalley
8d72332e9a am a62d5c66: Drop obsolete comments about SEAndroidManager.
* commit 'a62d5c667984435fd9ba3bf1eb11d4fdaa3849c1':
  Drop obsolete comments about SEAndroidManager.
2013-09-13 13:28:58 -07:00
Stephen Smalley
a62d5c6679 Drop obsolete comments about SEAndroidManager.
Change-Id: I6b27418507ebd0113a97bea81f37e4dc1de6da14
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 13:26:14 -07:00
Stephen Smalley
48b7e97da0 am cac0b7d6: am c0845036: Remove sys_nice capability from domains.
* commit 'cac0b7d601aefa1332e819bea7b1765ba1fb1da1':
  Remove sys_nice capability from domains.
2013-09-13 13:12:03 -07:00
Stephen Smalley
cac0b7d601 am c0845036: Remove sys_nice capability from domains.
* commit 'c0845036cc8c494adf0adf24c9d93a23f59566f7':
  Remove sys_nice capability from domains.
2013-09-13 13:09:10 -07:00
Stephen Smalley
c0845036cc Remove sys_nice capability from domains.
Remove sys_nice capability from domains; this does not appear to be necessary
and should not be possible in particular for app domains.  If we encounter
specific instances where it should be granted, we can add it back on a
per-domain basis.  Allow it explicitly for the system_server.  Unconfined
domains get it via unconfined_domain() and the rules in unconfined.te.

Change-Id: I9669db80a04a90a22241b2fbc5236a28dcde8c6e
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 13:06:36 -07:00
Nick Kralevich
03566840f1 am 28029a8d: am d1f448d4: Merge changes Icd71c967,I3fd90ad9
* commit '28029a8d2e5e888cec713e9ea1eaacbf1739754b':
  Do not permit appdomain to create/write to download_file.
  Remove duplicated rules between appdomain and isolated_app.
2013-09-13 13:02:29 -07:00
Stephen Smalley
047153e35a am e9761cb8: am 29326eda: Drop domain write access to sysfs for the emulator.
* commit 'e9761cb8cbc129ec7437550af7c751704a74a44b':
  Drop domain write access to sysfs for the emulator.
2013-09-13 13:02:29 -07:00
Stephen Smalley
a557b3d6e6 am a902c0ca: am 0f7641d8: Label all files under /sys/qemu_trace with sysfs_writable.
* commit 'a902c0cad0f81810021e0eb50283cddd181f8ac2':
  Label all files under /sys/qemu_trace with sysfs_writable.
2013-09-13 13:02:29 -07:00
Nick Kralevich
28029a8d2e am d1f448d4: Merge changes Icd71c967,I3fd90ad9
* commit 'd1f448d4a53f87ae416aeb84ecf21bb703cc4c80':
  Do not permit appdomain to create/write to download_file.
  Remove duplicated rules between appdomain and isolated_app.
2013-09-13 13:01:04 -07:00
Stephen Smalley
e9761cb8cb am 29326eda: Drop domain write access to sysfs for the emulator.
* commit '29326eda65b121fe0edbbae43bc463af17aaed9b':
  Drop domain write access to sysfs for the emulator.
2013-09-13 13:01:03 -07:00
Stephen Smalley
a902c0cad0 am 0f7641d8: Label all files under /sys/qemu_trace with sysfs_writable.
* commit '0f7641d83d7044431db44d4dd2377e6f8ef93e85':
  Label all files under /sys/qemu_trace with sysfs_writable.
2013-09-13 13:01:03 -07:00
Nick Kralevich
d1f448d4a5 Merge changes Icd71c967,I3fd90ad9
* changes:
  Do not permit appdomain to create/write to download_file.
  Remove duplicated rules between appdomain and isolated_app.
2013-09-13 19:59:47 +00:00
Stephen Smalley
29326eda65 Drop domain write access to sysfs for the emulator.
3.4 goldfish kernel supports sysfs labeling so we no longer need this.

Change-Id: I77514a8f3102ac8be957c57d95e7de7d5901f69d
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 18:29:03 +00:00
Stephen Smalley
0f7641d83d Label all files under /sys/qemu_trace with sysfs_writable.
Otherwise we have different security contexts but the same DAC
permissions:
-rw-rw-rw- root     root              u:object_r:sysfs_writable:s0 process_name
-rw-rw-rw- root     root              u:object_r:sysfs:s0 state
-rw-rw-rw- root     root              u:object_r:sysfs:s0 symbol

This change fixes denials such as:
type=1400 msg=audit(1379096020.770:144): avc:  denied  { write } for  pid=85 comm="SurfaceFlinger" name="symbol" dev="sysfs" ino=47 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:sysfs:s0 tclass=file

Change-Id: I261c7751da3778ee9241ec6b5476e8d9f96ba5ed
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 14:24:24 -04:00
Stephen Smalley
17454cf805 Do not permit appdomain to create/write to download_file.
The comment says that apps can read downloaded files, but the
file_type_auto_trans() macro expands to permit create/write access.
Also we don't need a type transition when staying in the same type
as the parent directory so we only truly need allow rules here.
Hence, we remove file_type_auto_trans() altogether, and add an allow
rule for search access to the directory.  If create/write access is
truly required, then we can just change the allow rules to use
rw_dir_perms and create_file_perms.

Change-Id: Icd71c9678419442cfd8088317317efd4332f9b4a
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 16:50:04 +00:00
Stephen Smalley
5b00f22349 Remove duplicated rules between appdomain and isolated_app.
r_dir_file(appdomain, isolated_app) was in both app.te and isolated_app.te;
delete it from isolated_app.te.
binder_call(appdomain, isolated_app) is a subset of binder_call(appdomain, appdomain); delete it.

Change-Id: I3fd90ad9c8862a0e4dad957425cbfbc9fa97c63f
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-13 12:48:10 -04:00
Nick Kralevich
70cd816d5f am ce077484: am a24a991d: Allow apps to execute app_data_files
* commit 'ce077484904678fcdf97ab3fba8b48a3ace53af4':
  Allow apps to execute app_data_files
2013-09-12 12:45:53 -07:00
Nick Kralevich
ce07748490 am a24a991d: Allow apps to execute app_data_files
* commit 'a24a991dd59fe03cdc681aadcb6bbca1ffac9b7b':
  Allow apps to execute app_data_files
2013-09-12 12:43:32 -07:00
Nick Kralevich
a24a991dd5 Allow apps to execute app_data_files
Fixes the following denial:

<5>[28362.335293] type=1400 audit(1378991198.292:24): avc:  denied  { execute } for  pid=1640 comm="facebook.katana" path="/data/data/com.facebook.katana/app_libs/libfb_jpegturbo.so" dev="mmcblk0p23" ino=652556 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:app_data_file:s0 tclass=file

Change-Id: I4a515610149f06f0c49194feb6bc96e9b3080c12
2013-09-12 12:19:31 -07:00
Geremy Condra
d84e49e329 am 13a74a3a: Merge "Allow vold to start and stop processes via init" into klp-dev
* commit '13a74a3aea0387ff45f27291a9abca46952b9aa3':
  Allow vold to start and stop processes via init
2013-09-11 16:06:19 -07:00
Geremy Condra
13a74a3aea Merge "Allow vold to start and stop processes via init" into klp-dev 2013-09-11 23:03:05 +00:00
Geremy Condra
84c277e723 am 011094cc: Switch installd to use r_dir_perms for download_file dirs.
* commit '011094cc445c42774c55298cb9aceb9e5519d2ff':
  Switch installd to use r_dir_perms for download_file dirs.
2013-09-11 13:55:53 -07:00
Geremy Condra
011094cc44 Switch installd to use r_dir_perms for download_file dirs.
This fixes an issue in which installd can't open download
file dirs.

Bug: 10710450
Change-Id: I1dd08188a88428143c4bb914e872175dc3755597
2013-09-11 13:26:13 -07:00
Geremy Condra
aa51a3874d am 7eb786bc: Give vold the capability to kill.
* commit '7eb786bca26230f11472299947b815472bc1e333':
  Give vold the capability to kill.
2013-09-11 10:49:08 -07:00
Geremy Condra
7eb786bca2 Give vold the capability to kill.
Bug: 10706792
Change-Id: I85085ab7a6f0f3d12ba4d2b21b655bb64795495f
2013-09-11 10:19:10 -07:00
Ken Sumrall
4974855824 Allow vold to start and stop processes via init
This is needed for the new fuse wrapped sdcard support.

bug: 10330128

Change-Id: Ic5ebc769d376bf061d237616e56bcd562a63c6be
2013-09-10 17:06:58 -07:00
Alex Klyubin
b0dcfcec46 am bf9c6145: am a2477056: Permit writing to /dev/random and /dev/urandom.
* commit 'bf9c61458e49cc1650b1a473eeb847875f80088b':
  Permit writing to /dev/random and /dev/urandom.
2013-09-10 12:11:43 -07:00
Alex Klyubin
bf9c61458e am a2477056: Permit writing to /dev/random and /dev/urandom.
* commit 'a2477056ae6a702e7e71b671cd0c47afc1c7da8a':
  Permit writing to /dev/random and /dev/urandom.
2013-09-10 12:09:29 -07:00
Alex Klyubin
a2477056ae Permit writing to /dev/random and /dev/urandom.
Apps attempting to write to /dev/random or /dev/urandom currently
succeed, but a policy violation is logged. These two Linux RNG
devices are meant to be written to by arbitrary apps. Thus, there's
no reason to deny this capability.

Bug: 10679705

Change-Id: Ife401f1dd2182889471eef7e90fcc92e96f9c4d6
2013-09-10 12:01:15 -07:00
Alex Klyubin
9e2453bd2e am 7ca560be: am 34a8e121: Permit installd to unlink all types of data_file_type.
* commit '7ca560be77f51b2733cb212017507ff9e61695ea':
  Permit installd to unlink all types of data_file_type.
2013-09-10 12:01:14 -07:00
Alex Klyubin
7ca560be77 am 34a8e121: Permit installd to unlink all types of data_file_type.
* commit '34a8e121124c79e8daa60aebb065377280335bcc':
  Permit installd to unlink all types of data_file_type.
2013-09-10 11:59:48 -07:00
Alex Klyubin
34a8e12112 Permit installd to unlink all types of data_file_type.
This enables installd to uninstall or clear data of installed apps
whose data directory contains unusual file types, such as FIFO.

Bug: 10680357

(cherry picked from commit 839af9edb5)

Change-Id: I5715f7d6d3214896ad0456d614b052cf5fb79eef
2013-09-10 11:48:03 -07:00
Nick Kralevich
9eb98156ce am 9565c5ce: Backport part of d615ef3477 to klp-dev
* commit '9565c5cef209be6a9bc392e6a1352aaaad5bdc23':
  Backport part of d615ef3477 to klp-dev
2013-09-10 11:08:27 -07:00
Nick Kralevich
9565c5cef2 Backport part of d615ef3477 to klp-dev
Part of d615ef3477 hasn't been backported
to klp-dev yet.  Do it now.

Change-Id: Ib4f26c64d376e236fa3f76166f5d78a9f28b79a3
2013-09-09 20:51:32 -07:00
Nick Kralevich
555e5f666e resolved conflicts for merge of 839af9ed to klp-dev-plus-aosp
Change-Id: I90f812f66dd69d05d2f8875694168ba1b7bb9267
2013-09-09 20:21:19 -07:00
Nick Kralevich
839af9edb5 Allow installd to clear fifos and sockets
Bug: 10680357
Change-Id: I2a20f4aaaa53acbd53a404d369a79ae47246ad6f
2013-09-09 18:40:41 -07:00
Alex Klyubin
e42aa03d18 am b9bbfeb0: Fix bug report notification not showing up.
* commit 'b9bbfeb003042b386e4025cdb3c3ee9b9f0c4432':
  Fix bug report notification not showing up.
2013-09-09 18:02:21 -07:00