blob: 9dab78b4fd2358e62f99b35d88e1243631e0fa38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "arg.h"
char *argv0;
static void
usage(void)
{
fprintf(stderr, "usage: %s [-r] user key-name [crypt-parameters]\n", argv0);
exit(1);
}
int
main(int argc, char *argv[])
{
int allow_replace = 0;
ARGBEGIN {
case 'r':
allow_replace = 1;
break;
default:
usage();
} ARGEND;
if (argc < 2 || argc > 3)
usage();
if (isatty(STDIN_FILENO)) {
fprintf(stderr, "%s: standard input must not be a TTY.\n", argv0);
exit(1);
}
return 0;
}
|