am cb92504c: Fix logging of sepolicy pathname on policy load.
* commit 'cb92504c2b9439b2c9bb745a3727f58e8c44c224':
Fix logging of sepolicy pathname on policy load.
diff --git a/src/android.c b/src/android.c
index 578fa9e..638c0a8 100644
--- a/src/android.c
+++ b/src/android.c
@@ -847,14 +847,14 @@
}
if (fstat(fd, &sb) < 0) {
selinux_log(SELINUX_ERROR, "SELinux: Could not stat %s: %s\n",
- sepolicy_file[i], strerror(errno));
+ sepolicy_file[i-1], strerror(errno));
close(fd);
return -1;
}
map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (map == MAP_FAILED) {
selinux_log(SELINUX_ERROR, "SELinux: Could not map %s: %s\n",
- sepolicy_file[i], strerror(errno));
+ sepolicy_file[i-1], strerror(errno));
close(fd);
return -1;
}
@@ -870,7 +870,7 @@
munmap(map, sb.st_size);
close(fd);
- selinux_log(SELINUX_INFO, "SELinux: Loaded policy from %s\n", sepolicy_file[i]);
+ selinux_log(SELINUX_INFO, "SELinux: Loaded policy from %s\n", sepolicy_file[i-1]);
return 0;
}