From: mike Date: Tue, 6 Mar 2001 14:23:15 +0000 (+0000) Subject: Use /dev/urandom to avoid blocking. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23bba0c324a459b9424156cfa1a572fa53536edf;p=thirdparty%2Fcups.git Use /dev/urandom to avoid blocking. Call InitCerts() after loading config file. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@1612 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES.txt b/CHANGES.txt index e40c6aef1f..5dcec7cb7b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -65,6 +65,12 @@ CHANGES IN CUPS V1.1.7 - "lpoptions -l" would resave the options... - The EPSON drivers now send the "end packet mode" command when printing to USB devices. + - The scheduler initialized certificates before loading + the cupsd.conf file. + - The scheduler used /dev/random to collect random data, + which could block if insufficient entropy information + had been collected by the kernel. Now use + /dev/urandom. CHANGES IN CUPS V1.1.6-3 diff --git a/scheduler/cert.c b/scheduler/cert.c index eca6b5163c..1fbe8502e1 100644 --- a/scheduler/cert.c +++ b/scheduler/cert.c @@ -1,5 +1,5 @@ /* - * "$Id: cert.c,v 1.6 2001/01/22 15:03:58 mike Exp $" + * "$Id: cert.c,v 1.7 2001/03/06 14:23:15 mike Exp $" * * Authentication certificate routines for the Common UNIX * Printing System (CUPS). @@ -235,7 +235,7 @@ InitCerts(void) * the current time, as available... */ - if ((fp = fopen("/dev/random", "rb")) == NULL) + if ((fp = fopen("/dev/urandom", "rb")) == NULL) { /* * Get the time in usecs and use it as the initial seed... @@ -271,5 +271,5 @@ InitCerts(void) /* - * End of "$Id: cert.c,v 1.6 2001/01/22 15:03:58 mike Exp $". + * End of "$Id: cert.c,v 1.7 2001/03/06 14:23:15 mike Exp $". */ diff --git a/scheduler/main.c b/scheduler/main.c index 04ecbb0c69..386f133b04 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -1,5 +1,5 @@ /* - * "$Id: main.c,v 1.54 2001/02/21 20:16:47 mike Exp $" + * "$Id: main.c,v 1.55 2001/03/06 14:23:15 mike Exp $" * * Scheduler main loop for the Common UNIX Printing System (CUPS). * @@ -239,8 +239,6 @@ main(int argc, /* I - Number of command-line arguments */ * Read configuration... */ - InitCerts(); - if (!ReadConfiguration()) { syslog(LOG_LPR, "Unable to read configuration file \'%s\' - exiting!", @@ -248,6 +246,8 @@ main(int argc, /* I - Number of command-line arguments */ return (1); } + InitCerts(); + LoadAllJobs(); /* @@ -720,5 +720,5 @@ usage(void) /* - * End of "$Id: main.c,v 1.54 2001/02/21 20:16:47 mike Exp $". + * End of "$Id: main.c,v 1.55 2001/03/06 14:23:15 mike Exp $". */