am 682a27cb: Merge "Fix root inode security labeling issue."
# By Robert Craig
# Via Gerrit Code Review (1) and Robert Craig (1)
* commit '682a27cbce4935a6598c42a248855eb5878c1115':
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);