* devices.in (dev_storage): Map /dev/random and /dev/urandom to

\Device\Null.
	* devices.cc: Regenerate.
	* fhandler.h (fhandler_dev_random::open): Drop declaration.
	(fhandler_dev_random::close): Ditto.
	(fhandler_dev_random::crypt_gen_random): Convert to static method.
	* fhandler_random.cc (fhandler_dev_random::open): Remove so that default
	fhandler_base::open is used to open \Device\Null.
	(fhandler_dev_random::close): Ditto.
	* fhandler_socket.cc (entropy_source): Delete.
	(fhandler_socket::af_local_set_secret): Remove entropy_source code and
	call fhandler_dev_random::crypt_gen_random directly instead.
This commit is contained in:
Corinna Vinschen
2013-10-25 12:21:59 +00:00
parent 8ef76ab6f9
commit 494c626414
7 changed files with 27 additions and 46 deletions

View File

@@ -1654,16 +1654,15 @@ class fhandler_dev_random: public fhandler_base
protected:
uint32_t pseudo;
bool crypt_gen_random (void *ptr, size_t len);
int pseudo_write (const void *ptr, size_t len);
int pseudo_read (void *ptr, size_t len);
public:
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len);
off_t lseek (off_t, int) { return 0; }
int close ();
static bool crypt_gen_random (void *ptr, size_t len);
fhandler_dev_random () : fhandler_base () {}
fhandler_dev_random (void *) {}