Skip to content

Commit b8acd06

Browse files
nickkralAndroid Git Automerger
authored andcommitted
am fa6e1ea: am 2c93214: Merge "s/LOG/ALOG/ in HAVE_SELINUX blocks"
* commit 'fa6e1ea773a74aa6a996a783ff16c495ab3cc822': s/LOG/ALOG/ in HAVE_SELINUX blocks
2 parents a56d273 + fa6e1ea commit b8acd06

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

cmds/installd/commands.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
7979

8080
#ifdef HAVE_SELINUX
8181
if (selinux_android_setfilecon(libdir, pkgname, AID_SYSTEM) < 0) {
82-
LOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
82+
ALOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
8383
unlink(libdir);
8484
unlink(pkgdir);
8585
return -errno;
@@ -95,7 +95,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
9595

9696
#ifdef HAVE_SELINUX
9797
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
98-
LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
98+
ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
9999
unlink(libdir);
100100
unlink(pkgdir);
101101
return -errno;
@@ -202,7 +202,7 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona)
202202

203203
#ifdef HAVE_SELINUX
204204
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
205-
LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
205+
ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
206206
unlink(pkgdir);
207207
return -errno;
208208
}
@@ -404,7 +404,7 @@ int protect(char *pkgname, gid_t gid)
404404

405405
#ifdef HAVE_SELINUX
406406
if (selinux_android_setfilecon(pkgpath, pkgname, s.st_uid) < 0) {
407-
LOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
407+
ALOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
408408
return -1;
409409
}
410410
#endif

core/jni/android_os_SELinux.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ namespace android {
9090
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
9191

9292
if (env->ExceptionOccurred() != NULL) {
93-
LOGE("There was an issue with retrieving the file descriptor");
93+
ALOGE("There was an issue with retrieving the file descriptor");
9494
goto bail;
9595
}
9696

9797
if (getpeercon(fd, &context) == -1)
9898
goto bail;
9999

100-
LOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
100+
ALOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
101101

102102
securityString = env->NewStringUTF(context);
103103

@@ -139,7 +139,7 @@ namespace android {
139139
if ((ret = setfscreatecon(securityContext)) == -1)
140140
goto bail;
141141

142-
LOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
142+
ALOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
143143

144144
bail:
145145
if (constant_securityContext != NULL)
@@ -185,7 +185,7 @@ namespace android {
185185
if ((ret = setfilecon(objectPath, newCon)) == -1)
186186
goto bail;
187187

188-
LOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
188+
ALOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
189189

190190
bail:
191191
env->ReleaseStringUTFChars(path, objectPath);
@@ -224,7 +224,7 @@ namespace android {
224224
if (getfilecon(objectPath, &context) == -1)
225225
goto bail;
226226

227-
LOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
227+
ALOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
228228

229229
securityString = env->NewStringUTF(context);
230230

@@ -259,7 +259,7 @@ namespace android {
259259
if (getcon(&context) == -1)
260260
goto bail;
261261

262-
LOGV("getCon: Successfully retrieved context '%s'", context);
262+
ALOGV("getCon: Successfully retrieved context '%s'", context);
263263

264264
securityString = env->NewStringUTF(context);
265265

@@ -295,7 +295,7 @@ namespace android {
295295
if (getpidcon(checkPid, &context) == -1)
296296
goto bail;
297297

298-
LOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
298+
ALOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
299299

300300
securityString = env->NewStringUTF(context);
301301

@@ -442,7 +442,7 @@ namespace android {
442442

443443
accessGranted = selinux_check_access(myscon, mytcon, mytclass, myperm, NULL);
444444

445-
LOGV("selinux_check_access returned %d", accessGranted);
445+
ALOGV("selinux_check_access returned %d", accessGranted);
446446

447447
env->ReleaseStringUTFChars(scon, const_scon);
448448
env->ReleaseStringUTFChars(tcon, const_tcon);

0 commit comments

Comments
 (0)