Author: robert
Date: 2008-10-14 15:11:22 -0600 (Tue, 14 Oct 2008)
New Revision: 1435
Modified:
branches/Onward/temporary_system/e2fsprogs.txt
Log:
In e2fsprogs libblkid, use safe_getenv().
Modified: branches/Onward/temporary_system/e2fsprogs.txt
===================================================================
--- branches/Onward/temporary_system/e2fsprogs.txt 2008-10-14 20:51:46 UTC
(rev 1434)
+++ branches/Onward/temporary_system/e2fsprogs.txt 2008-10-14 21:11:22 UTC
(rev 1435)
@@ -5,6 +5,17 @@
find lib/ -name Makefile.in -exec sed -i 's/$(ALL_CFLAGS)/& -fPIC/' {} \; &&
+# At run time libblkid looks for the BLKID_DEBUG environment variable to
+# enable debbugging, with getenv(3). Some suid-root programs use libblkid,
+# such as mount(1). e2fsprogs includes a safe_getenv() function, which calls
+# __secure_getenv() from libc. __secure_getenv will restrict some environment
+# variables if the user is suid or sgid. So, this command replaces getenv()
+# with safe_getenv():
+
+cp -v lib/blkid/cache.c{,.orig} &&
+sed 's/getenv("BLKID_DEBUG")/safe_getenv("BLKID_DEBUG")/' \
+ lib/blkid/cache.c.orig > lib/blkid/cache.c &&
+
mkdir obj/ &&
cd obj/ &&
../configure --prefix=/tools \
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-book
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page