360 Commits

Author SHA1 Message Date
Ben Gruver
5e20733107 resolved conflicts for merge of 2ab72e1f to master
Change-Id: I752332dfb1a2f15bac22d3f1a457ae1ef20cf240
2013-04-03 17:46:19 -07:00
Ben Gruver
8c3ee9d50a Merge "Initial implementation of IntentFirewall functionality" into jb-mr2-dev 2013-04-03 23:36:22 +00:00
Nick Kralevich
997af33eb1 am 26bb9c95: am 0d17aaa5: Merge "Grant optional permissions by default for system apps." into jb-mr2-dev
* commit '26bb9c955158893f946bed727124d3dbd3cfd0a7':
  Grant optional permissions by default for system apps.
2013-04-03 16:33:49 -07:00
Nick Kralevich
0d17aaa543 Merge "Grant optional permissions by default for system apps." into jb-mr2-dev 2013-04-03 23:26:28 +00:00
Nick Kralevich
60792852c8 Grant optional permissions by default for system apps.
For pre-installed system apps, automatically grant all optional
permissions.

Change-Id: I99bb320a0bbaa9873baeb63655556fe0fae6f011
2013-04-03 16:17:06 -07:00
Kenny Root
2aeb228989 am 6812059b: am d72317ab: Remove keystore entries when package removed
* commit '6812059b2d4aecb732ce3c94c58f2494ddc4ff6a':
  Remove keystore entries when package removed
2013-04-03 12:40:37 -07:00
Kenny Root
d72317abd7 Remove keystore entries when package removed
Add a hook into PackageManagerService so that when app IDs are
completely removed, we erase all entries from keystore for those UIDs
that have gone away.

(cherry picked from commit 95e3ee3971915b323e5c13dcfe3b12a4180850cd)

Bug: 3020069
Change-Id: I374258ccc103f8cb3e238f2bf0d1afda0659db94
2013-04-03 11:32:52 -07:00
Ben Gruver
4efe9403af Initial implementation of IntentFirewall functionality
This has the full filter functionality, but is currently only
able to block Activity intents. Logging intents, or blocking
service/broadcast intents is not yet implemented.

Change-Id: Ied3d8dedf982e17bcbdff3e328eeb87477954df7
2013-04-02 21:18:41 -07:00
Nick Kralevich
bad8225336 am d2cc888c: am 55cfcd75: Merge "doSignaturePermission -> grantSignaturePermission" into jb-mr2-dev
* commit 'd2cc888cb9d5dbf87146ccd8fe02ea05121c02d8':
  doSignaturePermission -> grantSignaturePermission
2013-04-02 12:51:56 -07:00
Nick Kralevich
f486361607 am c77d3b16: am f667c8d3: Merge "grantPermissionsLPw: introduce isNewPlatformPermissionForPackage" into jb-mr2-dev
* commit 'c77d3b16d7f1fe6cb3262eeabbc56fc3275a4f4f':
  grantPermissionsLPw: introduce isNewPlatformPermissionForPackage
2013-04-02 12:51:53 -07:00
Nick Kralevich
2a9abe9ef3 am 0f67b255: am 5b7d1481: Merge "grantPermissionsLPw: get rid of a level of curly braces" into jb-mr2-dev
* commit '0f67b2550c020d9d12b13018712b3165b2c47029':
  grantPermissionsLPw: get rid of a level of curly braces
2013-04-02 12:48:05 -07:00
Nick Kralevich
cfa35cbc0c am b590b80e: am bb7ba4ae: Merge "grantPermissionsLPw: introduce doSignaturePermission" into jb-mr2-dev
* commit 'b590b80e36fd8e54c4d48f0c17af8709cbcf174d':
  grantPermissionsLPw: introduce doSignaturePermission
2013-04-02 12:48:03 -07:00
Nick Kralevich
55cfcd7569 Merge "doSignaturePermission -> grantSignaturePermission" into jb-mr2-dev 2013-04-02 19:44:02 +00:00
Nick Kralevich
f667c8d327 Merge "grantPermissionsLPw: introduce isNewPlatformPermissionForPackage" into jb-mr2-dev 2013-04-02 19:43:09 +00:00
Nick Kralevich
5b7d148193 Merge "grantPermissionsLPw: get rid of a level of curly braces" into jb-mr2-dev 2013-04-02 19:41:46 +00:00
Nick Kralevich
bb7ba4ae67 Merge "grantPermissionsLPw: introduce doSignaturePermission" into jb-mr2-dev 2013-04-02 19:40:23 +00:00
Dianne Hackborn
a05a368613 am 69fe4069: am 006c6338: Merge "Fix bug in initializing preferred activities." into jb-mr2-dev
* commit '69fe40692973bf480019d71dea85d01d24eb7a68':
  Fix bug in initializing preferred activities.
2013-04-02 12:11:54 -07:00
Nick Kralevich
94b8c93789 doSignaturePermission -> grantSignaturePermission
Change-Id: Iee3c24c8ce5ebbd0b0e8cf7b0e308f998fc6eaf9
2013-04-02 09:38:00 -07:00
Nick Kralevich
3337dbf707 grantPermissionsLPw: introduce isNewPlatformPermissionForPackage
Make grantPermissionsLPw by refactoring some code into a new
function, isNewPlatformPermissionForPackage.

No functional changes.

Change-Id: I467dacfe1fcf7e77cef4cb6df54536eeaafd9064
2013-04-02 09:38:00 -07:00
Nick Kralevich
daae541ac3 grantPermissionsLPw: get rid of a level of curly braces
We can get rid of an indention level by modifying an if/else
block slightly.

No functional changes.

Change-Id: I0404093ea9ebe7729417d825afb6e97e158ad23e
2013-04-02 09:38:00 -07:00
Nick Kralevich
35bee33d6f grantPermissionsLPw: introduce doSignaturePermission
Make grantPermissionsLPw smaller by introducing a new doSignaturePermission
function.

Just a refactoring. No functional code changes.

Change-Id: Ia967fd93e3f7cf3e48fcd13be0b04994b76d36f3
2013-04-02 09:38:00 -07:00
Dianne Hackborn
4d491a605e Fix bug in initializing preferred activities.
Now that we are smarter about the initialization, we need
to do this after all packages are scanned.

Change-Id: I598f5ef84dcc83779bbff29e4c92136c63fb32de
2013-04-01 18:10:51 -07:00
Amith Yamasani
8d01846130 am 5c98b904: am 9e8ba8f2: Merge "Improve RestrictionEntry API" into jb-mr2-dev
* commit '5c98b9046506cc69b261dd6ac2ae39b2de0afacb':
  Improve RestrictionEntry API
2013-03-29 18:52:58 -07:00
Amith Yamasani
9e8ba8f273 Merge "Improve RestrictionEntry API" into jb-mr2-dev 2013-03-30 01:47:33 +00:00
Amith Yamasani
86118baa4f Improve RestrictionEntry API
More getters and setters, better naming.
New extra defined for returning a custom intent that handles showing the
   restrictions UI.

Change-Id: I2ee0cdb4edd99e71a9004ff5e929dbe243b45557
2013-03-29 17:28:47 -07:00
Geremy Condra
3868a19759 am a54e0643: am 9d034deb: am 24948d3c: am 946a5c91: Merge "Save off the seinfo value with packages.list."
* commit 'a54e064365706d40c55c2984cca1f15a6bf3e8fb':
  Save off the seinfo value with packages.list.
2013-03-28 16:58:51 -07:00
Geremy Condra
9d034debdd am 24948d3c: am 946a5c91: Merge "Save off the seinfo value with packages.list."
* commit '24948d3ca7ff7fa70ee85e9aa7530239d7b482b2':
  Save off the seinfo value with packages.list.
2013-03-28 16:55:03 -07:00
Geremy Condra
946a5c91d9 Merge "Save off the seinfo value with packages.list." 2013-03-28 21:45:22 +00:00
Geremy Condra
565dd2c469 am 0314b976: am 5c3bd37a: am f21a34bf: am 2ff853da: Merge "Add data validation on seinfo labels."
* commit '0314b976654ac9f64f8bb60962b81feadcc13d20':
  Add data validation on seinfo labels.
2013-03-28 14:32:56 -07:00
Geremy Condra
5c3bd37ab7 am f21a34bf: am 2ff853da: Merge "Add data validation on seinfo labels."
* commit 'f21a34bf1b188cd662f6a08f5c709f4f641b1494':
  Add data validation on seinfo labels.
2013-03-28 14:29:17 -07:00
Geremy Condra
318a767e0d Merge "Remove keysets from PackageKeySetData when KeySetManager removes them." 2013-03-28 20:15:53 +00:00
Maggie Benthall
c78453f12b am b3c060a1: am c92342bb: Merge "Add user restrictions for bluetooth, sideloading, usb file transfer" into jb-mr2-dev
* commit 'b3c060a166e9d5a141a6500e4c443a20d4e002b6':
  Add user restrictions for bluetooth, sideloading, usb file transfer
2013-03-28 12:20:05 -07:00
Maggie Benthall
c92342bb01 Merge "Add user restrictions for bluetooth, sideloading, usb file transfer" into jb-mr2-dev 2013-03-28 19:15:46 +00:00
Robert Craig
d417ab0ea5 Add data validation on seinfo labels.
Ensure that policy contains a clean seinfo
string. Where clean means no whitespace characters.

Change-Id: I814411cbc8d16eaed99a1389f5487529e36e617b
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-28 12:19:27 -04:00
Dianne Hackborn
d734b4f285 am 6b8e7b35: am bf20aa76: Merge "Keep track of who has disabled applications." into jb-mr2-dev
* commit '6b8e7b35ef763d29a30c87a5a95ef941d39a8ee9':
  Keep track of who has disabled applications.
2013-03-27 16:40:49 -07:00
Maggie Benthall
a12fccf57d Add user restrictions for bluetooth, sideloading, usb file transfer
Created constants for these in UserManager and current.txt. Also created
an accessor for individual user restrictions that takes the restriction key
(removing individual methods for particular restrictions).

Change-Id: Ibb5517cbcdffadd3925f52cbe67d7d525813faa9
2013-03-27 18:14:29 -04:00
Dianne Hackborn
3fa3c28a35 Keep track of who has disabled applications.
Change-Id: I2640d3dc2200b589e2beb42a43cc93efd090f06e
2013-03-27 12:01:52 -07:00
Geremy Condra
cdb5789022 Remove keysets from PackageKeySetData when KeySetManager removes them.
This fixes a bug where the KeySets in PackageKeySetData would get
out of sync with those in KeySetManager when repeatedly installed and
uninstalled.

Change-Id: I16cfe6d11f37d908ee5635ebcb6e784cebc252c0
2013-03-26 17:52:21 -07:00
Amith Yamasani
a1535223fe am f3dc9f0a: am df5e9fe1: Merge "Device Owner, a special kind of device admin" into jb-mr2-dev
* commit 'f3dc9f0aa91d2785b715f251b144487ec1b57ecc':
  Device Owner, a special kind of device admin
2013-03-26 15:31:33 -07:00
Amith Yamasani
df5e9fe181 Merge "Device Owner, a special kind of device admin" into jb-mr2-dev 2013-03-26 22:27:13 +00:00
Amith Yamasani
71e6c697e5 Device Owner, a special kind of device admin
A Device Owner cannot be uninstalled and is available to all users. It must
be registered before the device_provisioned flag is set.

Device admins can be disabled until used, but visible to device policy
manager, so that users wont be bothered with update requests.

Opened up a few related APIs for use by a system-installed Device Owner.

Change-Id: I847b5fe68c0f724863f778a67602b5bddc79d8e5
2013-03-26 15:09:08 -07:00
Robert Craig
4a4537331b Save off the seinfo value with packages.list.
Patch adds the seinfo label per package to the file.
This is of particular interest to the run-as program
which uses the seinfo tag to correctly label the
app security context before running the shell.

Change-Id: I9d7ea47c920b1bc09a19008345ed7fd0aa426e87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-26 08:45:28 -04:00
Geremy Condra
98157242e2 am d6c1394d: am 51163e3b: Merge "Add seinfo parsing to PackageManagerService." into jb-mr2-dev
* commit 'd6c1394dd0046944e66d391ff0e099fb5ac57751':
  Add seinfo parsing to PackageManagerService.
2013-03-26 01:47:03 +00:00
Robert Craig
0f40dc923c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 17:30:08 -07:00
Nick Kralevich
56f83b277d am d7afbeb5: am f00529d9: Merge "PackageManagerService: update grantPermission / revokePermission" into jb-mr2-dev
* commit 'd7afbeb52a289b98095872489928783fa008d424':
  PackageManagerService: update grantPermission / revokePermission
2013-03-25 18:19:42 +00:00
Nick Kralevich
c498614414 PackageManagerService: update grantPermission / revokePermission
Currently, grantPermission / revokePermission only handles development
permissions. This change extends these two functions to handle normal
and dangerous permissions.

A normal / dangerous permission can modified if it is marked as
optional (android:required="false") using the "am grant" / "am revoke"
commands.

Currently, this change is a no-op. The package parser code
does not currently honor <uses-permission android:required="false"> in
the application's manifest, and assumes a permission is always required.

This change sets the ground for future optional permissions work.

Change-Id: I34f02ffd714e8a9a37b9f87df89cef915b1b6780
2013-03-25 11:01:20 -07:00
rpcraig
1e0c8e6989 Proper security labeling of multi-user data directories.
This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.

Change-Id: Iacaba6d9d18d5337e65713960d14efe32006b330
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 14:35:00 +00:00
Robert Craig
d3f8d0333c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 06:33:03 -04:00
Amith Yamasani
e32011e8c0 resolved conflicts for merge of 99755cd3 to master
Change-Id: I752c387c013c3deaad836df9b0c2294e7149a32a
2013-03-21 00:29:02 -07:00
Amith Yamasani
df2e92a535 Application restrictions API
Adds the ability for apps to export some restrictions. The restrictions
are presented in Settings based on the restriction type. The user's
selections are stored by UserManagerService and provided to the
target user's application as a list of RestrictionEntry objects which
contain the key, value(s).

Also introduce a manifest entry for system apps to request that the
app be automatically installed in all users, so that they cannot be
deselected by the owner user.

Shared account filtering for non-whitelisted apps.

Change-Id: I15b741e3c0f3448883cb364c130783f1f6ea7ce6
2013-03-20 22:29:59 -07:00