X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/902cbb33a6f9b90989a635d9e7d62996367d8b15..912ebbc5f3e9f9485c476a34566c62ad11b8daa3:/progs/pixie.c diff --git a/progs/pixie.c b/progs/pixie.c index 1d2be675..3fd32081 100644 --- a/progs/pixie.c +++ b/progs/pixie.c @@ -684,13 +684,13 @@ static void pixserv_line(char *s, size_t len, void *p) if (strcmp(q, "help") == 0) { if (pixserv_write(px, "\ INFO Commands supported:\n\ -INFO HELP\n\ -INFO LIST\n\ -INFO PASS tag [expire]\n\ -INFO VERIFY tag [expire]\n\ -INFO FLUSH [tag]\n\ -INFO SET tag [expire] -- phrase\n\ -INFO QUIT\n\ +INFO flush [TAG]\n\ +INFO help\n\ +INFO list\n\ +INFO pass TAG [EXPIRE]\n\ +INFO quit\n\ +INFO set TAG [EXPIRE] -- PHRASE\n\ +INFO verify TAG [EXPIRE]\n\ OK\n\ ")) goto close; @@ -775,7 +775,7 @@ OK\n\ goto close; } else { p_flush(tag); - p_add(tag, s, t); + p_add(tag, s ? s : "", t); if (pixserv_write(px, "OK\n")) goto close; } } @@ -1244,7 +1244,7 @@ int main(int argc, char *argv[]) /* --- Set up the locked memory area --- */ l_init(&lm, 16384); - setuid(getuid()); + if (setuid(getuid())) _exit(125); /* --- Parse command line arguments --- */