From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-dev:master commit in: eclass/
Date: Sun, 10 Feb 2013 01:56:29 +0000 (UTC) [thread overview]
Message-ID: <1360461373.872bb4b2c4f56b12e14bb6b449a718ac31ae863f.blueness@gentoo> (raw)
commit: 872bb4b2c4f56b12e14bb6b449a718ac31ae863f
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 10 01:56:13 2013 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Feb 10 01:56:13 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=872bb4b2
eclass/pax-utils.eclass: clean up sanitize-flags()
---
eclass/pax-utils.eclass | 52 ++++++++++++++++++----------------------------
1 files changed, 20 insertions(+), 32 deletions(-)
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass
index fdc7769..74a5ec7 100644
--- a/eclass/pax-utils.eclass
+++ b/eclass/pax-utils.eclass
@@ -50,40 +50,28 @@ PAX_MARKINGS=${PAX_MARKINGS:="PT XT"}
# the bug report.
+# Only the actual pax flags and z are accepted
+#
+# 1. The leading '-' is irrelevant since it is santized out
+#
+# 2. Cc only make sense for paxctl, and even there these are
+# not needed as we progressively try:
+# paxctl -q${flags}
+# paxctl -qc${flags}
+# paxctl -qC${flags}
+# So we sanitize them out.
+#
+# 3. z is allowed for the default
+#
sanitize-flags() {
- # Only the actual pax flags and z are accepted
- #
- # 1. The leading '-' is irrelevant since it is santized out
- #
- # 2. Cc only make sense for paxctl, and even there these are
- # not needed as we progressively try:
- # paxctl -q${flags}
- # paxctl -qc${flags}
- # paxctl -qC${flags}
- # So we sanitize them out.
- #
- # 3. z is allowed for the default
- #
-
- local flags="$1"
- local clean=""
-
- [[ "${flags}" != "${flags/z/}" ]] && clean="${clean}z"
-
- [[ "${flags}" != "${flags/P/}" ]] && clean="${clean}P"
- [[ "${flags}" != "${flags/p/}" ]] && clean="${clean}p"
- [[ "${flags}" != "${flags/E/}" ]] && clean="${clean}E"
- [[ "${flags}" != "${flags/e/}" ]] && clean="${clean}e"
- [[ "${flags}" != "${flags/M/}" ]] && clean="${clean}M"
- [[ "${flags}" != "${flags/m/}" ]] && clean="${clean}m"
- [[ "${flags}" != "${flags/R/}" ]] && clean="${clean}R"
- [[ "${flags}" != "${flags/r/}" ]] && clean="${clean}r"
- [[ "${flags}" != "${flags/S/}" ]] && clean="${clean}S"
- [[ "${flags}" != "${flags/s/}" ]] && clean="${clean}s"
-
- echo "$clean"
-}
+ local flags=$1
+ local clean=""
+ for f in z P p E e M m R r S s; do
+ [[ "${flags}" != "${flags/${f}/}" ]] && clean="${clean}${f}"
+ done
+ echo "$clean"
+}
pax-mark() {
next reply other threads:[~2013-02-10 1:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 1:56 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-01 23:52 [gentoo-commits] proj/hardened-dev:master commit in: eclass/ Anthony G. Basile
2016-05-01 19:51 Anthony G. Basile
2016-05-01 19:42 Magnus Granberg
2016-04-23 18:23 Magnus Granberg
2016-04-23 18:23 Magnus Granberg
2013-04-05 2:13 Anthony G. Basile
2013-04-02 11:30 Anthony G. Basile
2013-03-28 18:04 Anthony G. Basile
2013-03-18 21:16 Anthony G. Basile
2013-03-18 3:21 Anthony G. Basile
2013-02-10 11:26 Anthony G. Basile
2013-02-10 11:21 Anthony G. Basile
2013-02-09 20:30 Anthony G. Basile
2012-12-30 1:29 Anthony G. Basile
2012-09-08 19:57 Sven Vermeulen
2012-05-15 18:11 Sven Vermeulen
2012-05-15 17:58 Sven Vermeulen
2012-05-06 14:14 Sven Vermeulen
2012-05-01 11:26 Sven Vermeulen
2012-04-22 19:35 Sven Vermeulen
2012-04-22 19:35 Sven Vermeulen
2012-04-22 18:07 Sven Vermeulen
2012-04-22 18:00 Sven Vermeulen
2011-08-07 10:47 Anthony G. Basile
2011-08-03 19:16 Sven Vermeulen
2011-08-03 19:16 Sven Vermeulen
2011-08-03 19:01 Sven Vermeulen
2011-08-03 19:01 Sven Vermeulen
2011-08-03 13:14 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 8:29 Sven Vermeulen
2011-05-15 13:33 Sven Vermeulen
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=1360461373.872bb4b2c4f56b12e14bb6b449a718ac31ae863f.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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