3 * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology.
4 * For copying and distribution information, please see the file
8 #include <mit-copyright.h>
20 int debug = 0; /* goddamn des library breakage */
21 char string[] = "sms\0\0Athena\0\1";
22 char srvtab[] = "/etc/srvtab";
24 "\7\7\7This program MUST be run on the console, for security reasons.\n";
26 int main(int argc, char **argv)
32 if (!tty || strcmp(tty, "/dev/console"))
34 fprintf(stderr, insecure);
37 fd = open(srvtab, O_WRONLY|O_APPEND, 0);
43 if (sizeof(string) - 1 != 13)
45 fprintf(stderr, "string size bad\n");
48 des_read_password(key, "Enter SMS update password: ", 0);
49 write(fd, string, sizeof(string) - 1);
50 write(fd, key, sizeof(C_Block));
54 printf("\nKey written.\n");