Keep quiet about expected errors on incoming connections.
[u/mdw/catacomb] / keyutil.c
index 3f3218e..1871c1a 100644 (file)
--- a/keyutil.c
+++ b/keyutil.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: keyutil.c,v 1.14 2001/02/23 09:03:27 mdw Exp $
+ * $Id: keyutil.c,v 1.16 2003/10/15 09:31:45 mdw Exp $
  *
  * Simple key manager program
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: keyutil.c,v $
+ * Revision 1.16  2003/10/15 09:31:45  mdw
+ * Fix help message.
+ *
+ * Revision 1.15  2003/05/15 23:23:24  mdw
+ * Fix behaviour with bogus trailing attributes.
+ *
  * Revision 1.14  2001/02/23 09:03:27  mdw
  * Simplify usage message by removing nonexistant options.
  *
@@ -174,8 +180,11 @@ static void setattr(key_file *f, key *k, char *v[])
     int err;
     char *p = *v;
     size_t eq = strcspn(p, "=");
-    if (p[eq] == 0)
-      moan("invalid assignment: `%s'", p);
+    if (!p[eq]) {
+      moan("invalid assignment: `%s' (ignored)", p);
+      v++;
+      continue;
+    }
     p[eq] = 0;
     p += eq + 1;
     if ((err = key_putattr(f, k, *v, *p ? p : 0)) != 0)
@@ -1718,8 +1727,6 @@ void help(FILE *fp, char **argv)
       fputs(c->help, fp);
     }
   } else {
-    version(fp);
-    fputc('\n', fp);
     usage(fp);
     fputs("\n\
 Performs various simple key management operations.  Command line options\n\