Getting EGD socket name from environment
gnupg-devel at thewrittenword.com
gnupg-devel at thewrittenword.com
Mon Mar 5 09:20:07 CET 2001
Is it useful to get the EGD socket name from the environment and
falling back to the --with-egd-socket name when not found? The patch
below is against 1.0.4.
--
albert chin (china at thewrittenword.com)
-- snip snip
--- cipher/rndegd.c.orig Sun Mar 4 23:48:44 2001
+++ cipher/rndegd.c Sun Mar 4 23:55:04 2001
@@ -118,9 +118,16 @@
char *name;
struct sockaddr_un addr;
int addr_len;
-
#ifdef EGD_SOCKET_NAME
- bname = EGD_SOCKET_NAME;
+ char *egd_socket_env;
+ #endif
+
+ #ifdef EGD_SOCKET_NAME
+ egd_socket_env = getenv ("RANDFILE");
+ if (egd_socket_env)
+ bname = egd_socket_env;
+ else
+ bname = EGD_SOCKET_NAME;
#endif
if ( !bname || !*bname )
bname = "entropy";
More information about the Gnupg-devel
mailing list