Fix key reloading core dumps. Change advice on keys.
authormdw <mdw>
Sun, 26 Oct 2003 11:57:46 +0000 (11:57 +0000)
committermdw <mdw>
Sun, 26 Oct 2003 11:57:46 +0000 (11:57 +0000)
manual/become.texi
src/daemon.c

index 58fbf36..76ce702 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*-texinfo-*-
 @c
-@c $Id: become.texi,v 1.5 2003/10/12 00:14:49 mdw Exp $
+@c $Id: become.texi,v 1.6 2003/10/26 11:57:46 mdw Exp $
 @c
 @c Documentation for `become'
 @c
@@ -10,6 +10,9 @@
 @c ----- Revision history ---------------------------------------------------
 @c
 @c $Log: become.texi,v $
+@c Revision 1.6  2003/10/26 11:57:46  mdw
+@c Fix key reloading core dumps.  Change advice on keys.
+@c
 @c Revision 1.5  2003/10/12 00:14:49  mdw
 @c Major overhaul.  Now uses DSA signatures rather than the bogus symmetric
 @c encrypt-and-hope thing.  Integrated with mLib and Catacomb.
@@ -1524,7 +1527,7 @@ The key file can be generated using Catacomb's @code{key} program.  The
 commands
 
 @example
-key -k /etc/become/become.key add -adsa become-dsa
+key -k /etc/become/become.key add -adsa -e"now + 1 year" become-dsa 
 key -k /etc/become/become.key extract -f -secret /etc/become/become.pubkey
 @end example
 
index fbaf26b..3d29735 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: daemon.c,v 1.14 2003/10/17 16:30:22 mdw Exp $
+ * $Id: daemon.c,v 1.15 2003/10/26 11:57:46 mdw Exp $
  *
  * Running a `become' daemon
  *
@@ -29,6 +29,9 @@
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: daemon.c,v $
+ * Revision 1.15  2003/10/26 11:57:46  mdw
+ * Fix key reloading core dumps.  Change advice on keys.
+ *
  * Revision 1.14  2003/10/17 16:30:22  mdw
  * Reload keys and config files automatically.
  *
 
 /*----- Arbitrary constants -----------------------------------------------*/
 
-/* #define daemon__awakeEvery (5 * 60) /\* Awaken this often to rescan *\/ */
 #define daemon__awakeEvery (10)                /* Awaken this often to rescan */
 
 /*----- Static variables --------------------------------------------------*/
@@ -222,10 +224,10 @@ void daemon_readKey(const char *kf)
     mp_copy(daemon__key.dp.g);
     mp_copy(daemon__key.x);
     mp_copy(daemon__key.y);
+    daemon__keyfile = kf;
   }
   key_fetchdone(kp);
   key_close(&f);
-  daemon__keyfile = kf;
 }
 
 /* --- @daemon__readConfig@ --- *