(check_login_delay,update_login_delay): New functions.
Showing
1 changed file
with
17 additions
and
0 deletions
... | @@ -62,14 +62,30 @@ | ... | @@ -62,14 +62,30 @@ |
62 | /* Command not permitted when TLS active. */ | 62 | /* Command not permitted when TLS active. */ |
63 | #define TLS_ACTIVE "Command not permitted when TLS active" | 63 | #define TLS_ACTIVE "Command not permitted when TLS active" |
64 | 64 | ||
65 | /* Trying to log in within the minimum login delay interval */ | ||
66 | #define LOGIN_DELAY "Attempt to log in within the minimum login delay interval" | ||
67 | |||
65 | /* APOP password file, without .db or .passwd, which are added based on file | 68 | /* APOP password file, without .db or .passwd, which are added based on file |
66 | type automatically */ | 69 | type automatically */ |
67 | #define APOP_PASSFILE_NAME "apop" | 70 | #define APOP_PASSFILE_NAME "apop" |
68 | 71 | ||
69 | #ifdef USE_DBM | 72 | #ifdef USE_DBM |
70 | # define APOP_PASSFILE SYSCONFDIR "/" APOP_PASSFILE_NAME | 73 | # define APOP_PASSFILE SYSCONFDIR "/" APOP_PASSFILE_NAME |
74 | # define ENABLE_LOGIN_DELAY | ||
71 | #else | 75 | #else |
72 | # define APOP_PASSFILE SYSCONFDIR "/" APOP_PASSFILE_NAME ".passwd" | 76 | # define APOP_PASSFILE SYSCONFDIR "/" APOP_PASSFILE_NAME ".passwd" |
77 | # undef ENABLE_LOGIN_DELAY | ||
78 | #endif | ||
79 | |||
80 | #ifdef ENABLE_LOGIN_DELAY | ||
81 | # define LOGIN_STAT_FILE "/var/run/pop3-login" | ||
82 | extern time_t login_delay; | ||
83 | extern char *login_stat_file; | ||
84 | extern int check_login_delay __P((char *username)); | ||
85 | extern void update_login_delay __P((char *username)); | ||
86 | #else | ||
87 | # define check_login_delay(u) 0 | ||
88 | # define update_login_delay(u) | ||
73 | #endif | 89 | #endif |
74 | 90 | ||
75 | /* Size of the MD5 digest for APOP */ | 91 | /* Size of the MD5 digest for APOP */ |
... | @@ -173,6 +189,7 @@ | ... | @@ -173,6 +189,7 @@ |
173 | #define ERR_MBOX_SYNC 16 | 189 | #define ERR_MBOX_SYNC 16 |
174 | #define ERR_TLS_ACTIVE 17 | 190 | #define ERR_TLS_ACTIVE 17 |
175 | #define ERR_TLS_IO 18 | 191 | #define ERR_TLS_IO 18 |
192 | #define ERR_LOGIN_DELAY 19 | ||
176 | 193 | ||
177 | extern mailbox_t mbox; | 194 | extern mailbox_t mbox; |
178 | extern int state; | 195 | extern int state; | ... | ... |
-
Please register or sign in to post a comment