summary refs log tree commit diff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/setup.c b/setup.c
index 633a1f4..92509e3 100644
--- a/setup.c
+++ b/setup.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018, Curtis McEnroe <programble@gmail.com>
+/* Copyright (C) 2018  Causal Agent June <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -23,18 +23,18 @@
 #include <unistd.h>
 
 int main(int argc, char *argv[]) {
-    if (argc < 2) return EX_USAGE;
+    if (argc < 2) errx(EX_USAGE, "missing public id");
 
-    uint32_t key[4];
+    uint32_t id[4];
     char public[7 + 32 + 1];
     char private[8 + 32 + 1];
 
+    arc4random_buf(id, sizeof(id));
     snprintf(public, sizeof(public), "public/%s", argv[1]);
-    arc4random_buf(key, sizeof(key));
     snprintf(
         private, sizeof(private),
         "private/%08x%08x%08x%08x",
-        key[0], key[1], key[2], key[3]
+        id[0], id[1], id[2], id[3]
     );
 
     int fd = open(public, O_CREAT | O_EXCL, 0644);
@@ -44,6 +44,6 @@ int main(int argc, char *argv[]) {
     int error = symlink(public, private);
     if (error) err(EX_CANTCREAT, "%s", private);
 
-    printf("%08x%08x%08x%08x\n", key[0], key[1], key[2], key[3]);
+    printf("%08x%08x%08x%08x\n", id[0], id[1], id[2], id[3]);
     return EX_OK;
 }
8-09-27 12:39:16 -0400'>2018-09-27Add sans6x8 PSF2 fontJune McEnroe 2018-09-26Add copy paste to psfedJune McEnroe 2018-09-25Add r to psfed for invertJune McEnroe 2018-09-24Add psfed, a PSF2 font editorJune McEnroe 2018-09-21Add scheme -i to swap white and blackJune McEnroe 2018-09-21Map caps lock to escape on Linux consoleJune McEnroe 2018-09-19Fix README mandoc lintsJune McEnroe 2018-09-19Un-NOT trans.alpha values in pngoJune McEnroe 2018-09-18Refactor reads in pngo and clear palette between filesJune McEnroe 2018-09-17Add tRNS support to pngoJune McEnroe 2018-09-11Move gfx man pages to gfx/manJune McEnroe 2018-09-11Move bin man pages to bin/manJune McEnroe 2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe 2018-09-11Remove GAMES from BINSJune McEnroe 2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe 2018-09-11Add "blank" lines to man pagesJune McEnroe 2018-09-10Add mdoc syntax fileJune McEnroe 2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe 2018-09-08Put real dates on man pagesJune McEnroe 2018-09-08Replace gfx README with REAMDE.7June McEnroe 2018-09-08Link gfx man pages in ~/.localJune McEnroe