public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: initramfs <initramfs@vger.kernel.org>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	linux-ima-devel@lists.sourceforge.net,
	linux-security-module <linux-security-module@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 09/11] gen_initramfs_list.sh: include xattrs
Date: Tue, 20 Jan 2015 14:12:58 -0500	[thread overview]
Message-ID: <1421781180-24425-10-git-send-email-zohar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1421781180-24425-1-git-send-email-zohar@linux.vnet.ibm.com>

Support the new gen_init_cpio option to include extended attributes.
This patch adds support for the "-x" option and passes it to
gen_init_cpio.

Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
---
 scripts/gen_initramfs_list.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 17fa901..8d10b9d 100755
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -24,6 +24,7 @@ $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
 	-g <gid>       Group ID to map to group ID 0 (root).
 		       <gid> is only meaningful if <cpio_source> is a
 		       directory.  "squash" forces all files to gid 0.
+	-x             include file extended attributes in cpio archive.
 	<cpio_source>  File list or directory for cpio archive.
 		       If <cpio_source> is a .cpio file it will be used
 		       as direct input to initramfs.
@@ -223,6 +224,7 @@ root_gid=0
 dep_list=
 cpio_file=
 cpio_list=
+cpio_opts=
 output="/dev/stdout"
 output_file=""
 is_cpio_compressed=
@@ -278,6 +280,9 @@ while [ $# -gt 0 ]; do
 			default_list="$arg"
 			${dep_list}default_initramfs
 			;;
+		"-x")	# include extended attributers
+			cpio_opts="-x"
+			;;
 		"-h")
 			usage
 			exit 0
@@ -307,7 +312,8 @@ if [ ! -z ${output_file} ]; then
 			fi
 		fi
 		cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
-		usr/gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile}
+		usr/gen_init_cpio $timestamp ${cpio_opts} ${cpio_list} \
+			> ${cpio_tfile}
 	else
 		cpio_tfile=${cpio_file}
 	fi
-- 
1.8.1.4

  parent reply	other threads:[~2015-01-20 19:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 19:12 [PATCH v1 00/11] extend initramfs archive format to support xattrs Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 01/11] initramfs: separate reading cpio method from header Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 02/11] initramfs: replace simple_strtoul() with kstrtoul() Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 03/11] initramfs: add extended attribute support Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 04/11] initramfs: change size of mtime and file length to 64 bits Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 05/11] gen_init_cpio: replace inline format string with common variable Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 06/11] gen_init_cpio: define new CPIO format to support xattrs Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 07/11] gen_init_cpio: include the file extended attributes Mimi Zohar
2015-01-20 19:12 ` [PATCH v1 08/11] gen_init_cpio: change size of mtime and file length to 64 bits Mimi Zohar
2015-01-20 19:12 ` Mimi Zohar [this message]
2015-01-20 19:12 ` [PATCH v1 10/11] evm: make rootfs a special case Mimi Zohar
2015-01-20 19:13 ` [PATCH v1 11/11] ima: include rootfs (tmpfs) in ima_appraise_tcb policy Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421781180-24425-10-git-send-email-zohar@linux.vnet.ibm.com \
    --to=zohar@linux.vnet.ibm.com \
    --cc=initramfs@vger.kernel.org \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox