From 9c6c64b4fdc19c6ef6d32e1a1b466b74a2bce838 Mon Sep 17 00:00:00 2001 From: corinna Date: Sat, 27 May 2000 14:00:20 +0000 Subject: [PATCH] * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in call to CryptAcquireContext() to serve users that did not log in interactively. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_random.cc | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a446a62c80..5d8a9644ea 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +Wed May 27 15:57:00 2000 Corinna Vinschen + + * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in + call to CryptAcquireContext() to serve users that did not + log in interactively. + Wed May 26 11:16:00 2000 Corinna Vinschen * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE. diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc index 6ea72fa0dd..d8e51c6611 100644 --- a/winsup/cygwin/fhandler_random.cc +++ b/winsup/cygwin/fhandler_random.cc @@ -43,10 +43,10 @@ fhandler_dev_random::read (void *ptr, size_t len) if (!len) return 0; if (!crypt_prov - && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, - PROV_RSA_FULL, 0) - && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, - PROV_RSA_FULL, CRYPT_NEWKEYSET)) + && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL, + CRYPT_MACHINE_KEYSET) + && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL, + CRYPT_MACHINE_KEYSET | CRYPT_NEWKEYSET )) { __seterrno (); return -1; -- 2.11.0