summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-10-11 11:26:48 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 11:32:18 +0200
commit109d6b4f673a249aea4deeb0cdb5b54a21592410 (patch)
treeec3589a50dac5be54ef6248d1e0ff3a9fd3b41b4 /app-admin/checksec
downloadmv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.gz
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.bz2
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.zip
Clear history for egencache --repo=mv --update-changelogs
Diffstat (limited to 'app-admin/checksec')
-rw-r--r--app-admin/checksec/Manifest1
-rw-r--r--app-admin/checksec/checksec-1.5.ebuild27
-rw-r--r--app-admin/checksec/files/_checksec18
-rw-r--r--app-admin/checksec/metadata.xml8
4 files changed, 54 insertions, 0 deletions
diff --git a/app-admin/checksec/Manifest b/app-admin/checksec/Manifest
new file mode 100644
index 00000000..58624369
--- /dev/null
+++ b/app-admin/checksec/Manifest
@@ -0,0 +1 @@
+DIST checksec-1.5.sh 27095 SHA256 77b8a7fd9393d10def665658a41176ee745d5c7969a4a0f43cefcc8a4cd90947 SHA512 de72caf32c9c3b53384b34b16ea86b29dad42ce7c8db5c769166dc43bcfdde91790e99f268d30151512c89550af6e7b19701d9561081cfa92bb7aeacd2306d04 WHIRLPOOL f1ec49650b4c4ce9ba835ec131b30a3ef6c5af1d3c85fc1274442d0a3310491235ce0ff479fce53e60330cbdc710b91852a1290d4e1e04c74fb410352d5f8e25
diff --git a/app-admin/checksec/checksec-1.5.ebuild b/app-admin/checksec/checksec-1.5.ebuild
new file mode 100644
index 00000000..45c465f9
--- /dev/null
+++ b/app-admin/checksec/checksec-1.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+RESTRICT="mirror"
+inherit eutils
+
+DESCRIPTION="Check for hardened protections like RELRO, NoExec, Stack protection, ASLR, PIE"
+HOMEPAGE="http://www.trapkit.de/tools/checksec.html"
+SRC_URI="http://www.trapkit.de/tools/${PN}.sh -> ${P}.sh"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_install() {
+ newbin "${DISTDIR}/${P}.sh" "${PN}"
+ insinto /usr/share/zsh/site-functions
+ doins "${FILESDIR}/_${PN}"
+}
diff --git a/app-admin/checksec/files/_checksec b/app-admin/checksec/files/_checksec
new file mode 100644
index 00000000..b30e0160
--- /dev/null
+++ b/app-admin/checksec/files/_checksec
@@ -0,0 +1,18 @@
+#compdef checksec
+_checksec_procname() {
+ compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/}ho command 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t}
+}
+_arguments : \
+'--help[print help]' \
+'--version[print version]' \
+'--file[FILE (check FILE)]:file to check:_files' \
+'--fortify-file[FILE (check FILE for fortify)]:file for fortify:_files' \
+'--fortify-proc[ID (check ID'\''s process for fortify)]:process ID for fortify: _pids' \
+'--proc[NAME (check process NAME)]:process name:_checksec_procname' \
+'--proc-all[check all procname]' \
+'--proc-libs[ID (check ID'\''s process libs)]:process ID to check: _pids' \
+'--kernel[check kernel]' \
+'--dir[DIR \[-v\] (check DIR)]:dir:_files -/'
+local stat=$?
+unset -f _checksec_procname
+return stat
diff --git a/app-admin/checksec/metadata.xml b/app-admin/checksec/metadata.xml
new file mode 100644
index 00000000..73a6d343
--- /dev/null
+++ b/app-admin/checksec/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+ </maintainer>
+</pkgmetadata>