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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <124717.1244228393@turing-police.cc.vt.edu>
Date:	Fri, 05 Jun 2009 14:59:53 -0400
From:	Valdis.Kletnieks@...edu
To:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: scripts/ver_linux lossage on Fedora 11

I found a few places where ver_linux fails to DTRT on Fedora 11

1) mount version
mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//

Unfortunately, Fedora's mount command says:

% mount --version
mount from util-linux-ng 2.14.2 (with libblkid and selinux support)

2) nsf-utils

showmount --version 2>&1 | grep nfs-utils | awk \
'NR==1{print "nfs-utils             ", $NF}'

% showmount --version
showmount for 1.1.5
% rpm -q nfs-utils
nfs-utils-1.1.5-6.fc11.x86_64

3) udev

udevinfo -V 2>&1 | grep version | awk '{print "udev                  ", $3}

% udevinfo -V
the program '/bin/bash' called 'udevinfo', it should use 'udevadm info <options>', this will stop working in a future release
141
% udevadm --version
141

Patch for 2 of these attached.  The showmount one may best be fixed by getting
the --version output fixed to include 'nfs-utils' - or do people think
changing it to another egrep [0-9] is the proper approach? If so, I'll do up
an updated patch...

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>

--- linux-2.6.30-rc7-mmotm0602/scripts/ver_linux.dist	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.30-rc7-mmotm0602/scripts/ver_linux	2009-06-03 14:17:43.000000000 -0400
@@ -23,7 +23,7 @@ echo -n "util-linux             "
 fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
 
 echo -n "mount                  "
-mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
+mount --version | egrep -o '[0-9]+\.[0-9\.]+' 
 
 depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
 
@@ -87,8 +87,13 @@ oprofiled --version 2>&1 | awk \
 
 expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
 
+# older udev used this
 udevinfo -V 2>&1 | grep version | awk '{print "udev                  ", $3}'
 
+# and newer use this
+echo -n "udev                   "
+udevadm --version
+
 iwconfig --version 2>&1 | awk \
 '(NR==1 && ($3 == "version")) {print "wireless-tools        ",$4}'
 



Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ