meta-selinux/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch
Mark Hatle 4fefe83c32 Refactor to conform to YP Compat requirements
Change the references to check for the distribution flag of 'selinux' being
set before taking any action within the bbappends.  This prevents the
signature from being modified.

Also remove PR changes, as they are no longer allowed.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00

38 lines
1014 B
Diff

From: Philip Tricca <flihp@twobit.us>
To: tytso@mit.edu
Cc: liezhi.yang@windriver.com
Date: Sat, 20 Feb 2016 18:58:58 +0000
Subject: [PATCH] misc/create_inode.c: Copy xattrs from root directory when populating fs.
When copying a file system using the -d option the xattrs from the root
directory need to be copied before the populate_fs recusion starts.
Signed-off-by: Philip Tricca <flihp@twobit.us>
---
misc/create_inode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/misc/create_inode.c b/misc/create_inode.c
index 0de5719..ee21186 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -890,8 +890,15 @@ errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
return retval;
}
+ retval = set_inode_xattr(fs, root, source_dir);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while setting xattrs for \"%s\""), source_dir);
+ goto out;
+ }
retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks);
+out:
free(hdlinks.hdl);
return retval;
}
--
2.1.4