lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 3 Oct 2015 16:29:10 +0300
From:	Alexander Kapshuk <alexander.kapshuk@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	Greg KH <gregkh@...uxfoundation.org>
Subject: [PATCH 9/24] ver_linux: jfsutils.patch

Not to be critical of anyone, I believe that using 'grep' along with
'sed', and 'awk' in this kind of context as a one-off quick solution to
be run on the command line may very well be justified.
However, in a script, 'awk' or 'sed' are more than capable of doing most
of the things we may be looking to achieve by using a combination of
'grep', 'sed', and 'awk'.

The proposed implementation relies on 'sed' to perform all the text
processing required.

Tested on:
Arch Linux

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@...il.com>
---
--- linux/scripts/ver_linux.orig    2015-10-03 13:41:57.118790241 +0300
+++ linux/scripts/ver_linux    2015-10-03 13:52:43.291120818 +0300
@@ -30,8 +30,15 @@
 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 'NR==1 {print "e2fsprogs             ", $2}'

-fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
-'NR==1 {print "jfsutils              ", $3}'
+test -x "$fsckjfs" &&
+$fsckjfs -V 2>&1 |
+sed '
+    /version/!d
+    s/.*version[ \t]//
+    s/[ \t].*//
+    s/[^0-9]$//
+    s/^/jfsutils\t\t/
+'

 reiserfsck -V 2>&1 | grep ^reiserfsck | awk \
 'NR==1{print "reiserfsprogs         ", $2}'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ