diff options
author | Ioan-Adrian Ratiu <adrian.ratiu@ni.com> | 2016-04-01 17:31:20 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-03 15:51:08 +0100 |
commit | 28910ee2eacc15cf42b5e58bd43b3bd15c34eb97 (patch) | |
tree | 9308a92aba91acb1b30aab72108fc394eb239bc2 /scripts/lib/wic/plugins | |
parent | ca516f5907a661606c35e1ca5c2ece9fc79c77ea (diff) | |
download | openembedded-core-28910ee2eacc15cf42b5e58bd43b3bd15c34eb97.tar.gz openembedded-core-28910ee2eacc15cf42b5e58bd43b3bd15c34eb97.tar.bz2 openembedded-core-28910ee2eacc15cf42b5e58bd43b3bd15c34eb97.zip |
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@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 4 |
1 files 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 de99ad8495..bc9928314c 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) |