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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Oct 2015 21:39:55 +0300
From:	Alexander Kapshuk <alexander.kapshuk@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	gregkh@...uxfoundation.org, jim.epost@...il.com, richard@....at,
	tytso@....edu, Alexander Kapshuk <alexander.kapshuk@...il.com>
Subject: [PATCH 15/22] ver_linux: libcpp, fix missing output

Neither 'libg++.so', nor 'libstdc++.so' were found where the current
implementation expects them to be found in the distros below.

Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1

Which results in zero ouput generated.

The proposed implementation relies on 'ldconfig' to locate the libraries
in question.  'Sed' is used to do the text processing.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@...il.com>
---
 scripts/ver_linux | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index a7d0eca..882ddb9 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -121,9 +121,18 @@ awk '/^ldd/{
 	substr($0,RSTART,RLENGTH))
 }'
 
-ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so  2>/dev/null | awk -F. \
-       '{print "Linux C++ Library      " $4"."$5"."$6}'
-
+libcpp=`ldconfig -p 2>/dev/null |
+	awk '/(libg|stdc)[+]+\.so/ {
+	print $NF
+	exit
+	}
+'`
+test -r "$libcpp" &&
+ls -l $libcpp |
+sed '
+	s!.*so\.!!
+	s!^!Linux C++ Library\t!
+'
 ps --version 2>&1 | grep version | awk \
 'NR==1{print "Procps                ", $NF}'
 
-- 
2.4.9

--
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