]> andersk Git - moira.git/blob - reg_svr/genwords.c
rewrite FORCED_USERNAME message since if we're returning it from SWRD,
[moira.git] / reg_svr / genwords.c
1 /* $Id$
2  *
3  * Utility program to generate magic words for a given ID
4  *
5  * Copyright (C) 1998 by the Massachusetts Institute of Technology
6  * For copying and distribution information, please see the file
7  * <mit-copyright.h>.
8  *
9  */
10
11 #include <mit-copyright.h>
12 #include <moira.h>
13 #include "reg_svr.h"
14
15 #include <stdio.h>
16 #include <stdlib.h>
17
18 RCSID("$Header$");
19
20 int main(int argc, char **argv)
21 {
22   char *words[6];
23
24   if (argc != 2)
25     {
26       fprintf(stderr, "Usage: genwords id\n");
27       exit(1);
28     }
29
30   if (!read_hmac_key())
31     {
32       fprintf(stderr, "Couldn't read hmac key\n");
33       exit(1);
34     }
35
36   getwordlist(argv[1], words);
37   printf("%s %s %s %s %s %s\n", words[0], words[1], words[2],
38          words[3], words[4], words[5]);
39 }
40
41 /* used by words.c */
42 void *xmalloc(size_t size)
43 {
44   /* we won't run out of memory here */
45   return malloc(size);
46 }
This page took 0.056233 seconds and 5 git commands to generate.