]>
Commit | Line | Data |
---|---|---|
989a2c2c | 1 | /* |
2 | * $Source$ | |
3 | * $Author$ | |
4 | * $Locker$ | |
5 | * $Header$ | |
6 | */ | |
7 | ||
8 | #include <stdio.h> | |
9 | #include <ctype.h> | |
10 | #include "files.h" | |
11 | ||
48a6cc01 | 12 | /* |
13 | * This is a kludge for compatibility with the old Athenareg stuff | |
14 | */ | |
15 | ||
16 | struct user { | |
17 | char u_first[100]; | |
18 | char u_mid_init[100]; | |
19 | char u_last[100]; | |
20 | char u_login[100]; | |
21 | char u_password[100]; | |
22 | char u_mit_id[100]; | |
23 | char u_home_dir[100]; | |
24 | int u_status; | |
25 | }; | |
26 | ||
27 | struct alias { | |
28 | int foo; | |
29 | }; | |
30 | ||
31 | #define SUCCESS 0 | |
32 | #define FAILURE 1 | |
33 | #define NOT_FOUND 2 | |
d21fc900 | 34 | #define FIRST_NAME_SIZE 17 |
35 | #define LAST_NAME_SIZE 17 | |
36 | #define MID_INIT_SIZE 17 | |
48a6cc01 | 37 | #define LOGIN_SIZE 9 |
30993175 | 38 | #define PASSWORD_SIZE 64 |
989a2c2c | 39 | |
40 | /* Input timeouts. The most important timeouts are those for the username | |
41 | and the new password which should not be any longer than necessary. The | |
42 | firstname timeout causes userreg to restart itself periodically since | |
43 | userreg is waiting for a firstname when it is not being used. All the | |
44 | other timeouts are just there so that userreg will not stay in a half-used | |
45 | state -- possibly confusing an unwary registree. | |
46 | */ | |
445b483b | 47 | #define FIRSTNAME_TIMEOUT 180 /* 3 minutes */ |
8041f8ea | 48 | #define MI_TIMEOUT 90 /* 1.5 minutes */ |
49 | #define LASTNAME_TIMEOUT 90 /* 1.5 minutes */ | |
50 | #define MITID_TIMEOUT 90 /* 1.5 minutes */ | |
56c57bc8 | 51 | #define USERNAME_TIMEOUT 180 /* This should not be too long */ |
8041f8ea | 52 | #define OLD_PASSWORD_TIMEOUT 90 /* 1.5 minutes */ |
56c57bc8 | 53 | #define NEW_PASSWORD_TIMEOUT 180 /* Neither should this */ |
8041f8ea | 54 | #define REENTER_PASSWORD_TIMEOUT 90 /* 1.5 minutes */ |
55 | #define YN_TIMEOUT 90 /* 1.5 minutes */ | |
989a2c2c | 56 | #define TIMER_TIMEOUT 90 /* default timeout for timer_on() */ |
57 | ||
58 | #define NO 0 | |
59 | #define YES 1 | |
60 | ||
61 | /* Externs from display.c */ | |
62 | extern setup_display (); | |
63 | extern reset_display (); | |
64 | extern restore_display (); | |
65 | extern redisp (); | |
66 | extern input (); | |
67 | extern input_no_echo (); | |
68 | extern display_text_line (); | |
69 | extern display_text (); | |
70 | ||
71 | /* Global variables */ | |
72 | extern struct user user, | |
73 | db_user; | |
74 | char typed_mit_id[100]; |