am 44c116d5: am 682a27cb: Merge "Fix root inode security labeling issue."
# By Robert Craig
# Via Android Git Automerger (1) and others
* commit '44c116d55f59b6b4839747620e0c6cd299f8e9f8':
Fix root inode security labeling issue.
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index 5c1003d..f62fee9 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -568,8 +568,10 @@
if (selabel_lookup(sehnd, &secontext, mountpoint, S_IFDIR) < 0) {
error("cannot lookup security context for %s", mountpoint);
}
- if (secontext && verbose) {
- printf("Labeling %s as %s\n", mountpoint, secontext);
+ if (secontext) {
+ if (verbose) {
+ printf("Labeling %s as %s\n", mountpoint, secontext);
+ }
inode_set_selinux(root_inode_num, secontext);
}
freecon(secontext);