diff options
author | Anders Nordby <anders@FreeBSD.org> | 2002-11-27 04:11:23 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2002-11-27 04:11:23 +0000 |
commit | e88031e534ac4555d567405bd7914485882be6d1 (patch) | |
tree | 059490bae4fc06be5dc31572d95a099e402f9280 /mail/imap-uw/files/patch-ai | |
parent | Unbreak: set USE_OPENSSL properly. (diff) |
Unbreak building of bundled tools.
Install the newly bundled tools: mailutil, dmail and tmail.
Tidy.
Add WITH_SSL_AND_PLAINTEXT knob, if you want to use plaintext
passwords.
Pointy hat to: dougb
Notes
Notes:
svn path=/head/; revision=71139
Diffstat (limited to 'mail/imap-uw/files/patch-ai')
-rw-r--r-- | mail/imap-uw/files/patch-ai | 103 |
1 files changed, 59 insertions, 44 deletions
diff --git a/mail/imap-uw/files/patch-ai b/mail/imap-uw/files/patch-ai index a7b1e5a952e1..3202669b225b 100644 --- a/mail/imap-uw/files/patch-ai +++ b/mail/imap-uw/files/patch-ai @@ -1,5 +1,5 @@ ---- src/imapd/imapd.c.orig Mon Nov 18 14:29:04 2002 -+++ src/imapd/imapd.c Tue Nov 26 02:19:34 2002 +--- src/imapd/imapd.c.orig Mon Nov 18 23:29:04 2002 ++++ src/imapd/imapd.c Wed Nov 27 05:10:42 2002 @@ -29,6 +29,11 @@ #include "c-client.h" #include <sys/stat.h> @@ -12,63 +12,78 @@ #define CRLF PSOUT ("\015\012") /* primary output terpri */ -@@ -176,6 +181,13 @@ - void mm_list_work (char *what,int delimiter,char *name,long attributes); - char *lasterror (void); +@@ -178,6 +183,12 @@ -+ + /* Global storage */ + +#ifdef DRAC_AUTH -+#define DRACTIMEOUT 10*60 /* check every 10 minutes */ -+time_t lastdrac = 0; /* time of last drac check */ ++#define DRACTIMEOUT 10*60 /* check every 10 minutes */ ++time_t lastdrac = 0; /* time of last drac check */ +extern char *getenv (); +#endif /* DRAC_AUTH */ + - /* Global storage */ - char *version = "2002.332"; /* version number of this server */ -@@ -1184,6 +1196,45 @@ - lasterror ()); - return; - } + time_t alerttime = 0; /* time of last alert */ + time_t sysalerttime = 0; /* time of last system alert */ +@@ -238,7 +249,50 @@ + msg_string_next, /* get next byte in string structure */ + msg_string_setpos /* set position in string structure */ + }; +- + +#ifdef DRAC_AUTH -+ if (time (0) > lastdrac + DRACTIMEOUT) -+ { -+ FILE *dracconf; -+ char host[100]; -+ char *drachost; -+ char *err; -+ char *p; ++/* DRAC Authorization ++ */ ++void drac_auth () ++{ ++ if (time (0) > lastdrac + DRACTIMEOUT) ++ { ++ FILE *dracconf; ++ char host[100]; ++ char *drachost; ++ char *err; ++ char *p; + -+ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) -+ { -+ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); -+ exit(1); -+ } ++ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) ++ { ++ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); ++ exit(1); ++ } + -+ fgets(host, 100, dracconf); -+ p = strchr(host, '\n'); -+ if(p != NULL) -+ *p = '\0'; -+ fclose(dracconf); ++ fgets(host, 100, dracconf); ++ p = strchr(host, '\n'); ++ if(p != NULL) ++ *p = '\0'; ++ fclose(dracconf); + -+ if( drachost = (host) ) -+ { -+ struct sockaddr_in sin; -+ int sinlen = sizeof (struct sockaddr_in); -+ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? -+ "UNKNOWN" : inet_ntoa (sin.sin_addr); ++ if( drachost = (host) ) ++ { ++ struct sockaddr_in sin; ++ int sinlen = sizeof (struct sockaddr_in); ++ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? ++ "UNKNOWN" : inet_ntoa (sin.sin_addr); + -+ lastdrac = time(0); ++ lastdrac = time(0); + -+ if (dracauth(drachost, inet_addr(client), &err) != 0) -+ syslog (LOG_INFO, err); -+ else -+ syslog (LOG_INFO, "dracd: authorized ip %s", client); -+ } -+ } ++ if (dracauth(drachost, inet_addr(client), &err) != 0) ++ syslog (LOG_INFO, err); ++ else ++ syslog (LOG_INFO, "dracd: authorized ip %s", client); ++ } ++ } ++} +#endif /* DRAC_AUTH */ + + /* Main program */ + + int main (int argc,char *argv[]) +@@ -1184,6 +1238,9 @@ + lasterror ()); + return; + } ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ /* change in number of messages? */ if (existsquelled || (nmsgs != stream->nmsgs)) { PSOUT ("* "); |