Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-04-01 12:41:26 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-04-01 12:41:26 +0400
commit40afcae3565fc6dee9452bf0d7c0ae64c27208d8 (patch)
tree8827abd5d0374be7e9450c6bee533778e1958ac1 /winsup/cygwin/fhandler_random.cc
parent37f44582995d79cf2cd5167db6c40d806a00d110 (diff)
* fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
Use CryptAcquireContextW. * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define. * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to status. Drop usage of LsaNtStatusToWinError. (verify_token): Call NtQuerySecurityObject instead of GetKernelObjectSecurity. (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser fails, report the sub_status as well.
Diffstat (limited to 'winsup/cygwin/fhandler_random.cc')
-rw-r--r--winsup/cygwin/fhandler_random.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc
index e5d8a4866..587a6375d 100644
--- a/winsup/cygwin/fhandler_random.cc
+++ b/winsup/cygwin/fhandler_random.cc
@@ -1,7 +1,6 @@
/* fhandler_random.cc: code to access /dev/random and /dev/urandom
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
- Red Hat, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2011 Red Hat, Inc.
Written by Corinna Vinschen (vinschen@cygnus.com)
@@ -42,11 +41,11 @@ bool
fhandler_dev_random::crypt_gen_random (void *ptr, size_t len)
{
if (!crypt_prov
- && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)
- && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET
- | CRYPT_NEWKEYSET))
+ && !CryptAcquireContextW (&crypt_prov, NULL, MS_DEF_PROV_W, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)
+ && !CryptAcquireContextW (&crypt_prov, NULL, MS_DEF_PROV_W, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET
+ | CRYPT_NEWKEYSET))
{
debug_printf ("%E = CryptAquireContext()");
return false;