diff options
author | Martin Väth <martin@mvath.de> | 2012-02-12 17:39:34 +0100 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2015-10-11 10:47:19 +0200 |
commit | 860221e7437081ae678ff0ea0139f64a54c487a4 (patch) | |
tree | 8f144f19d8c8020510b183c563c71e4297bf7da0 /app-admin/checksec/files/_checksec | |
parent | Add fixes for current magus live ebuild. Update checksums (diff) | |
download | mv-860221e7437081ae678ff0ea0139f64a54c487a4.tar.gz mv-860221e7437081ae678ff0ea0139f64a54c487a4.tar.bz2 mv-860221e7437081ae678ff0ea0139f64a54c487a4.zip |
Add checksec
Diffstat (limited to 'app-admin/checksec/files/_checksec')
-rw-r--r-- | app-admin/checksec/files/_checksec | 18 |
1 files changed, 18 insertions, 0 deletions
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 |