[oe-commits] [openembedded-core] 10/22: wic/isoimage-isohybrid.py: change cpio generated uid&gid to root
git at git.openembedded.org
git at git.openembedded.org
Sun Apr 3 14:54:16 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 28910ee2eacc15cf42b5e58bd43b3bd15c34eb97
Author: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
AuthorDate: Fri Apr 1 17:31:20 2016 +0300
wic/isoimage-isohybrid.py: change cpio generated uid&gid to root
By default cpio preserves the uid&guid's of the original user which
leads to host contamination and boot failures because commands like
mount from initramfs expect to be run by root and the original host
user might not even exist on the target.
Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index de99ad8..bc99283 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -174,8 +174,8 @@ class IsoImagePlugin(SourcePlugin):
else:
msger.error("Couldn't find or build initrd, exiting.\n")
- exec_cmd("find %s | cpio -o -H newc >%s/initrd.cpio " \
- % (initrd_dir, cr_workdir), as_shell=True)
+ exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \
+ % initrd_dir, as_shell=True)
exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
% (cr_workdir, initrd), as_shell=True)
shutil.rmtree(initrd_dir)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list