diff options
author | Philip Tricca <flihp@twobit.us> | 2016-02-19 01:56:36 +0000 |
---|---|---|
committer | Philip Tricca <flihp@twobit.us> | 2016-02-27 05:36:55 +0000 |
commit | 777b8eaaaeace0640e49c6413330701bc86eabdd (patch) | |
tree | 5b2491c4617360a4d976b3fdf149e1002ee9e215 | |
parent | 26c02d6c178812d2405d4f891cf4f905c1d005fa (diff) | |
download | meta-selinux-777b8eaaaeace0640e49c6413330701bc86eabdd.tar.gz |
e2fsprogs: Copy xattr for filesystem root directory.
Signed-off-by: Philip Tricca <flihp@twobit.us>
-rw-r--r-- | recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch | 37 | ||||
-rw-r--r-- | recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend | 2 |
2 files changed, 39 insertions, 0 deletions
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch b/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch new file mode 100644 index 0000000..1de0dde --- /dev/null +++ b/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From: Philip Tricca <flihp@twobit.us> | ||
2 | To: tytso@mit.edu | ||
3 | Cc: liezhi.yang@windriver.com | ||
4 | Date: Sat, 20 Feb 2016 18:58:58 +0000 | ||
5 | Subject: [PATCH] misc/create_inode.c: Copy xattrs from root directory when populating fs. | ||
6 | |||
7 | When copying a file system using the -d option the xattrs from the root | ||
8 | directory need to be copied before the populate_fs recusion starts. | ||
9 | |||
10 | Signed-off-by: Philip Tricca <flihp@twobit.us> | ||
11 | --- | ||
12 | misc/create_inode.c | 7 +++++++ | ||
13 | 1 file changed, 7 insertions(+) | ||
14 | |||
15 | diff --git a/misc/create_inode.c b/misc/create_inode.c | ||
16 | index 0de5719..ee21186 100644 | ||
17 | --- a/misc/create_inode.c | ||
18 | +++ b/misc/create_inode.c | ||
19 | @@ -890,8 +890,15 @@ errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino, | ||
20 | return retval; | ||
21 | } | ||
22 | |||
23 | + retval = set_inode_xattr(fs, root, source_dir); | ||
24 | + if (retval) { | ||
25 | + com_err(__func__, retval, | ||
26 | + _("while setting xattrs for \"%s\""), source_dir); | ||
27 | + goto out; | ||
28 | + } | ||
29 | retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks); | ||
30 | |||
31 | +out: | ||
32 | free(hdlinks.hdl); | ||
33 | return retval; | ||
34 | } | ||
35 | -- | ||
36 | 2.1.4 | ||
37 | |||
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend b/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend new file mode 100644 index 0000000..7acaf48 --- /dev/null +++ b/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | SRC_URI += "file://misc_create_inode.c-label_rootfs.patch" | ||