diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/content/src/com/android/commands/content/Content.java | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | cmds/input/src/com/android/commands/input/Input.java | 0 | ||||
-rw-r--r-- | cmds/installd/Android.mk | 9 | ||||
-rw-r--r-- | cmds/installd/commands.c | 17 | ||||
-rw-r--r-- | cmds/installd/tests/Android.mk | 11 | ||||
-rw-r--r-- | cmds/servicemanager/service_manager.c | 1 |
6 files changed, 13 insertions, 31 deletions
diff --git a/cmds/content/src/com/android/commands/content/Content.java b/cmds/content/src/com/android/commands/content/Content.java index 070e105..787fbdb 100644 --- a/cmds/content/src/com/android/commands/content/Content.java +++ b/cmds/content/src/com/android/commands/content/Content.java @@ -83,14 +83,14 @@ public class Content { + " Example:\n" + " # Change \"new_setting\" secure setting to \"newer_value\".\n" + " adb shell content update --uri content://settings/secure --bind" - + " value:s:newer_value --where \"name=\\'new_setting\\'\"\n" + + " value:s:newer_value --where \"name=\'new_setting\'\"\n" + "\n" + "usage: adb shell content delete --uri <URI> [--user <USER_ID>] --bind <BINDING>" + " [--bind <BINDING>...] [--where <WHERE>]\n" + " Example:\n" + " # Remove \"new_setting\" secure setting.\n" + " adb shell content delete --uri content://settings/secure " - + "--where \"name=\\'new_setting\\'\"\n" + + "--where \"name=\'new_setting\'\"\n" + "\n" + "usage: adb shell content query --uri <URI> [--user <USER_ID>]" + " [--projection <PROJECTION>] [--where <WHERE>] [--sort <SORT_ORDER>]\n" @@ -101,7 +101,7 @@ public class Content { + " # Select \"name\" and \"value\" columns from secure settings where \"name\" is " + "equal to \"new_setting\" and sort the result by name in ascending order.\n" + " adb shell content query --uri content://settings/secure --projection name:value" - + " --where \"name=\\'new_setting\\'\" --sort \"name ASC\"\n" + + " --where \"name=\'new_setting\'\" --sort \"name ASC\"\n" + "\n"; private static class Parser { diff --git a/cmds/input/src/com/android/commands/input/Input.java b/cmds/input/src/com/android/commands/input/Input.java index a21df0d..a21df0d 100755..100644 --- a/cmds/input/src/com/android/commands/input/Input.java +++ b/cmds/input/src/com/android/commands/input/Input.java diff --git a/cmds/installd/Android.mk b/cmds/installd/Android.mk index 3e722ea..1dd4ee5 100644 --- a/cmds/installd/Android.mk +++ b/cmds/installd/Android.mk @@ -29,17 +29,12 @@ LOCAL_SRC_FILES := \ $(common_src_files) LOCAL_SHARED_LIBRARIES := \ - libcutils + libcutils \ + libselinux LOCAL_STATIC_LIBRARIES := \ libdiskusage -ifeq ($(HAVE_SELINUX),true) -LOCAL_C_INCLUDES += external/libselinux/include -LOCAL_SHARED_LIBRARIES += libselinux -LOCAL_CFLAGS := -DHAVE_SELINUX -endif # HAVE_SELINUX - LOCAL_MODULE := installd LOCAL_MODULE_TAGS := optional diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 387f33d..2a54710 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -17,10 +17,7 @@ #include <linux/capability.h> #include "installd.h" #include <diskusage/dirsize.h> - -#ifdef HAVE_SELINUX #include <selinux/android.h> -#endif /* Directory records that are used in execution of commands. */ dir_rec_t android_data_dir; @@ -94,14 +91,12 @@ int install(const char *pkgname, uid_t uid, gid_t gid) return -1; } -#ifdef HAVE_SELINUX if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); unlink(pkgdir); - return -1; + return -errno; } -#endif if (chown(pkgdir, uid, gid) < 0) { ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno)); @@ -250,21 +245,19 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona) return -1; } - if (chown(pkgdir, uid, uid) < 0) { - ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno)); + if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { + ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); unlink(pkgdir); return -errno; } -#ifdef HAVE_SELINUX - if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { - ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); + if (chown(pkgdir, uid, uid) < 0) { + ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); unlink(pkgdir); return -errno; } -#endif return 0; } diff --git a/cmds/installd/tests/Android.mk b/cmds/installd/tests/Android.mk index 315acdb..c0192f4 100644 --- a/cmds/installd/tests/Android.mk +++ b/cmds/installd/tests/Android.mk @@ -18,13 +18,7 @@ static_libraries := \ libgtest_main c_includes := \ - frameworks/base/cmds/installd \ - bionic \ - bionic/libstdc++/include \ - external/gtest/include \ - external/stlport/stlport - -module_tags := eng tests + frameworks/base/cmds/installd $(foreach file,$(test_src_files), \ $(eval include $(CLEAR_VARS)) \ @@ -33,6 +27,5 @@ $(foreach file,$(test_src_files), \ $(eval LOCAL_SRC_FILES := $(file)) \ $(eval LOCAL_C_INCLUDES := $(c_includes)) \ $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ - $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ - $(eval include $(BUILD_EXECUTABLE)) \ + $(eval include $(BUILD_NATIVE_TEST)) \ ) diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c index 71e840e..c563a82 100644 --- a/cmds/servicemanager/service_manager.c +++ b/cmds/servicemanager/service_manager.c @@ -47,6 +47,7 @@ static struct { { AID_RADIO, "simphonebook" }, { AID_MEDIA, "common_time.clock" }, { AID_MEDIA, "common_time.config" }, + { AID_KEYSTORE, "android.security.keystore" }, }; void *svcmgr_handle; |