Skip to content

Commit 365861e

Browse files
committed
s/LOG/ALOG/ in HAVE_SELINUX blocks
The latest push changed LOG(E|V) to ALOG(E|V) but it was not updated in HAVE_SELINUX blocks. Change-Id: I626588589dd00775ba29f2a256ac29e481598dc3 Signed-off-by: Joshua Brindle <jbrindle@tresys.com>
1 parent 13a3a87 commit 365861e

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
@@ -78,7 +78,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
7878

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

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

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

406406
#ifdef HAVE_SELINUX
407407
if (selinux_android_setfilecon(pkgpath, pkgname, s.st_uid) < 0) {
408-
LOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
408+
ALOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
409409
return -1;
410410
}
411411
#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)