]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use /dev/urandom to avoid blocking.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 6 Mar 2001 14:23:15 +0000 (14:23 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 6 Mar 2001 14:23:15 +0000 (14:23 +0000)
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

CHANGES.txt
scheduler/cert.c
scheduler/main.c

index e40c6aef1f160664351259daab37b3870d7d2467..5dcec7cb7b6a38dbddfb65af05b80886ed0c1f77 100644 (file)
@@ -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
index eca6b5163cead0e5325f2b9ca4f2c0b015894f47..1fbe8502e15059a4a404db346a4a72b7f4e7b0ab 100644 (file)
@@ -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 $".
  */
index 04ecbb0c699b7fa68114355ba1a7826274bec945..386f133b04c81575ba512fac84a1b228baf46ff3 100644 (file)
@@ -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 $".
  */