summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2012-02-12 17:39:34 +0100
committerMartin Väth <martin@mvath.de>2015-10-11 10:47:19 +0200
commit860221e7437081ae678ff0ea0139f64a54c487a4 (patch)
tree8f144f19d8c8020510b183c563c71e4297bf7da0 /app-admin/checksec
parentAdd fixes for current magus live ebuild. Update checksums (diff)
downloadmv-860221e7437081ae678ff0ea0139f64a54c487a4.tar.gz
mv-860221e7437081ae678ff0ea0139f64a54c487a4.tar.bz2
mv-860221e7437081ae678ff0ea0139f64a54c487a4.zip
Add checksec
Diffstat (limited to 'app-admin/checksec')
-rw-r--r--app-admin/checksec/ChangeLog8
-rw-r--r--app-admin/checksec/Manifest1
-rw-r--r--app-admin/checksec/checksec-1.5.ebuild24
-rw-r--r--app-admin/checksec/files/_checksec18
-rw-r--r--app-admin/checksec/metadata.xml9
5 files changed, 60 insertions, 0 deletions
diff --git a/app-admin/checksec/ChangeLog b/app-admin/checksec/ChangeLog
new file mode 100644
index 00000000..268f02f8
--- /dev/null
+++ b/app-admin/checksec/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for app-admin/checksec
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header $
+
+*checksec-1.5 (12 Feb 2012)
+
+ 12 Feb 2012; Martin Väth <martin@mvath.de>
+ New ebuild from scratch.
diff --git a/app-admin/checksec/Manifest b/app-admin/checksec/Manifest
new file mode 100644
index 00000000..d93ea004
--- /dev/null
+++ b/app-admin/checksec/Manifest
@@ -0,0 +1 @@
+DIST checksec-1.5.sh 27095 RMD160 5a0097921acb2ed7e53ec2f99e82bccabfc856bd SHA1 a01fc7b9adc269dfad0f0bcefb5ade0686c13a43 SHA256 77b8a7fd9393d10def665658a41176ee745d5c7969a4a0f43cefcc8a4cd90947
diff --git a/app-admin/checksec/checksec-1.5.ebuild b/app-admin/checksec/checksec-1.5.ebuild
new file mode 100644
index 00000000..24f160a3
--- /dev/null
+++ b/app-admin/checksec/checksec-1.5.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+EAPI="4"
+RESTRICT="mirror"
+
+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="zsh-completion"
+S="${WORKDIR}"
+
+src_install() {
+ newbin "${DISTDIR}/${P}.sh" "${PN}"
+ if use zsh-completion
+ then insinto /usr/share/zsh/site-functions
+ doins "${FILESDIR}/_${PN}"
+ fi
+}
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..0c91bdcd
--- /dev/null
+++ b/app-admin/checksec/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+</maintainer>
+</pkgmetadata>