chiark / gitweb /
server: Introduce privilege separation.
[tripe] / server / admin.c
index 5509de07eea4880b0dd8b1e84af150cf2fca6f50..ccd49b7373789da37750b086c9bde70e85db6150 100644 (file)
@@ -40,6 +40,7 @@ const trace_opt tr_opts[] = {
   { 'x',       T_KEYEXCH,      "key exchange" },
   { 'm',       T_KEYMGMT,      "key management" },
   { 'l',       T_CHAL,         "challenge management" },
+  { 'v',       T_PRIVSEP,      "privilege separation" },
   { 'p',       T_PACKET,       "packet contents" },
   { 'c',       T_CRYPTO,       "crypto details" },
   { 'A',       T_ALL,          "all of the above" },
@@ -265,7 +266,7 @@ void a_vformat(dstr *d, const char *fmt, va_list ap)
 
   while (fmt) {
     if (*fmt == '*') {
-      dstr_putc(d, ' ');
+      if (d->len) dstr_putc(d, ' ');
       dstr_vputf(d, fmt + 1, &ap);
     } else if (*fmt == '?') {
       if (strcmp(fmt, "?ADDR") == 0) {
@@ -521,6 +522,7 @@ void a_quit(void)
   close(sock.fd);
   unlink(sockname);
   FOREACH_PEER(p, { p_destroy(p); });
+  ps_quit();
   exit(0);
 }