summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nick Kralevich <nnk@google.com> 2012-07-20 10:00:45 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2012-07-20 10:00:45 -0700
commitb8acd060d409f0e81ab3510b429cb86d3f34adb8 (patch)
treec962d2494558d8805147879ef7e6d6d81eae8f00
parenta56d273438036d79e770efd0e436449534ee8b9b (diff)
parentfa6e1ea773a74aa6a996a783ff16c495ab3cc822 (diff)
am fa6e1ea7: am 2c932143: Merge "s/LOG/ALOG/ in HAVE_SELINUX blocks"
* commit 'fa6e1ea773a74aa6a996a783ff16c495ab3cc822': s/LOG/ALOG/ in HAVE_SELINUX blocks
-rw-r--r--cmds/installd/commands.c8
-rw-r--r--core/jni/android_os_SELinux.cpp16
2 files changed, 12 insertions, 12 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index f5f6f3b087f2..5878619220c0 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -79,7 +79,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(libdir, pkgname, AID_SYSTEM) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
@@ -95,7 +95,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
@@ -202,7 +202,7 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona)
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
@@ -404,7 +404,7 @@ int protect(char *pkgname, gid_t gid)
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgpath, pkgname, s.st_uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
return -1;
}
#endif
diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp
index eb99d2bbce43..40443ffa0c4f 100644
--- a/core/jni/android_os_SELinux.cpp
+++ b/core/jni/android_os_SELinux.cpp
@@ -90,14 +90,14 @@ namespace android {
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (env->ExceptionOccurred() != NULL) {
- LOGE("There was an issue with retrieving the file descriptor");
+ ALOGE("There was an issue with retrieving the file descriptor");
goto bail;
}
if (getpeercon(fd, &context) == -1)
goto bail;
- LOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
+ ALOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
securityString = env->NewStringUTF(context);
@@ -139,7 +139,7 @@ namespace android {
if ((ret = setfscreatecon(securityContext)) == -1)
goto bail;
- LOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
+ ALOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
bail:
if (constant_securityContext != NULL)
@@ -185,7 +185,7 @@ namespace android {
if ((ret = setfilecon(objectPath, newCon)) == -1)
goto bail;
- LOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
+ ALOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
bail:
env->ReleaseStringUTFChars(path, objectPath);
@@ -224,7 +224,7 @@ namespace android {
if (getfilecon(objectPath, &context) == -1)
goto bail;
- LOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
+ ALOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
securityString = env->NewStringUTF(context);
@@ -259,7 +259,7 @@ namespace android {
if (getcon(&context) == -1)
goto bail;
- LOGV("getCon: Successfully retrieved context '%s'", context);
+ ALOGV("getCon: Successfully retrieved context '%s'", context);
securityString = env->NewStringUTF(context);
@@ -295,7 +295,7 @@ namespace android {
if (getpidcon(checkPid, &context) == -1)
goto bail;
- LOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
+ ALOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
securityString = env->NewStringUTF(context);
@@ -442,7 +442,7 @@ namespace android {
accessGranted = selinux_check_access(myscon, mytcon, mytclass, myperm, NULL);
- LOGV("selinux_check_access returned %d", accessGranted);
+ ALOGV("selinux_check_access returned %d", accessGranted);
env->ReleaseStringUTFChars(scon, const_scon);
env->ReleaseStringUTFChars(tcon, const_tcon);