summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-01-31 01:55:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-01-31 01:55:51 +0000
commit682a27cbce4935a6598c42a248855eb5878c1115 (patch)
treed65a96b0b7ac76da1e8102250dd686379ba6692a
parentf52abf4ca2ce307e7d4056e02c9e22075ab65459 (diff)
parent2929313c66014bce5d53cf4323a9db507ca5b139 (diff)
downloadextras-682a27cbce4935a6598c42a248855eb5878c1115.tar.gz
Merge "Fix root inode security labeling issue."
-rw-r--r--ext4_utils/make_ext4fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index 5c1003d3..f62fee9f 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -568,8 +568,10 @@ int make_ext4fs_internal(int fd, const char *_directory,
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);