svn commit: trunk/uClibc: extra/Configs include libc/misc/internal etc...

psm at uclibc.org psm at uclibc.org
Wed Oct 12 19:40:43 UTC 2005


Author: psm
Date: 2005-10-12 12:40:41 -0700 (Wed, 12 Oct 2005)
New Revision: 11852

Log:
Remove /dev/erandom support, as [h]lfs does not use it in this form.

Modified:
   trunk/uClibc/extra/Configs/Config.in
   trunk/uClibc/include/ssp-internal.h
   trunk/uClibc/libc/misc/internals/__uClibc_main.c


Changeset:
Modified: trunk/uClibc/extra/Configs/Config.in
===================================================================
--- trunk/uClibc/extra/Configs/Config.in	2005-10-12 19:10:34 UTC (rev 11851)
+++ trunk/uClibc/extra/Configs/Config.in	2005-10-12 19:40:41 UTC (rev 11852)
@@ -1171,17 +1171,6 @@
 	  	attacks.
 	  Most people will answer N.
 
-config SSP_USE_ERANDOM
-	bool "Use erandom for setting guard value if /dev/urandom fails"
-	depends on UCLIBC_HAS_SSP && !SSP_QUICK_CANARY
-	default n
-	help
-	  Use /dev/erandom to define the guard if /dev/urandom fails (chroot).
-	  This requires a modified kernel.
-	  More information at:
-	  <http://frandom.sourceforge.net/>
-	  Most people will answer N.
-
 choice
 	prompt "Propolice protection blocking signal"
 	depends on UCLIBC_HAS_SSP

Modified: trunk/uClibc/include/ssp-internal.h
===================================================================
--- trunk/uClibc/include/ssp-internal.h	2005-10-12 19:10:34 UTC (rev 11851)
+++ trunk/uClibc/include/ssp-internal.h	2005-10-12 19:40:41 UTC (rev 11852)
@@ -21,17 +21,6 @@
 #include <signal.h>
 #include <linux/unistd.h>
 
-#ifdef __SSP_USE_ERANDOM__
-# include <sys/sysctl.h>
-#if 1
-# define SYSCTL __sysctl
-#else
-#define __NR__kernel_sysctl		__NR_sysctl
-static __always_inline _syscall6(int,__kernel_sysctl,int *,name,int,nlen,void *,oldval,size_t *,oldlenp,void *,newval,size_t,newlen);
-#define SYSCTL(name,nlen,oldval,oldlenp,newval,newlen) __kernel_sysctl(name,nlen,oldval,oldlenp,newval,newlen)
-#endif
-#endif
-
 #ifndef __SSP_QUICK_CANARY__
 #define __NR___kernel_open		__NR_open
 static __always_inline _syscall2(int,__kernel_open,const char *,path,int,flags);

Modified: trunk/uClibc/libc/misc/internals/__uClibc_main.c
===================================================================
--- trunk/uClibc/libc/misc/internals/__uClibc_main.c	2005-10-12 19:10:34 UTC (rev 11851)
+++ trunk/uClibc/libc/misc/internals/__uClibc_main.c	2005-10-12 19:40:41 UTC (rev 11852)
@@ -115,35 +115,10 @@
 {
 	uintptr_t ret;
 #ifndef __SSP_QUICK_CANARY__
-
-	size_t size;
-
-# ifdef __SSP_USE_ERANDOM__
 	{
-		int mib[3];
-		/* Random is another depth in Linux, hence an array of 3. */
-		mib[0] = CTL_KERN;
-		mib[1] = KERN_RANDOM;
-		mib[2] = RANDOM_ERANDOM;
-
-		if (SYSCTL(mib, 3, &ret, &size, NULL, 0) != (-1))
-			if (size == (size_t) sizeof(ret))
-				return ret;
-	}
-# endif /* ifdef __SSP_USE_ERANDOM__ */
-	{
-		int fd;
-
-# ifdef __SSP_USE_ERANDOM__
-		/* 
-		 * Attempt to open kernel pseudo random device if one exists before 
-		 * opening urandom to avoid system entropy depletion.
-		 */
-		if ((fd = OPEN("/dev/erandom", O_RDONLY)) == (-1))
-# endif
-			fd = OPEN("/dev/urandom", O_RDONLY);
+		int fd = OPEN("/dev/urandom", O_RDONLY);
 		if (fd >= 0) {
-			size = READ(fd, &ret, sizeof(ret));
+			size_t size = READ(fd, &ret, sizeof(ret));
 			CLOSE(fd);
 			if (size == (size_t) sizeof(ret))
 				return ret;




More information about the uClibc-cvs mailing list