Updated formatting for printing the key for FSS (#4165)
authorhi117 <zacharyw09264@gmail.com>
Fri, 16 Sep 2016 14:14:55 +0000 (10:14 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 Sep 2016 14:14:55 +0000 (10:14 -0400)
The key used to be jammed next to the local file path. Based on the format string on line 1675, I determined that the order of arguments was written incorrectly, and updated the function based on that assumption.

Before:
```
Please write down the following secret verification key. It should be stored
at a safe location and should not be saved locally on disk.

        /var/log/journal/9b47c1a5b339412887a197b7654673a7/fss8f66d6-f0a998-f782d0-1fe522/18fdb8-35a4e900

The sealing key is automatically changed every 15min.
```

After:
```
Please write down the following secret verification key. It should be stored
at a safe location and should not be saved locally on disk.

        d53ed4-cc43d6-284e10-8f0324/18fdb8-35a4e900

The sealing key is automatically changed every 15min.
```

src/journal/journalctl.c

index 31074eb..4350925 100644 (file)
@@ -1684,9 +1684,9 @@ static int setup_keys(void) {
                         "at a safe location and should not be saved locally on disk.\n"
                         "\n\t%s",
                         ansi_highlight(), ansi_normal(),
+                        p,
                         ansi_highlight(), ansi_normal(),
-                        ansi_highlight_red(),
-                        p);
+                        ansi_highlight_red());
                 fflush(stderr);
         }
         for (i = 0; i < seed_size; i++) {