summaryrefslogtreecommitdiff
path: root/mail/imap-uw/files/patch-ai
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2007-09-30 05:59:04 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2007-09-30 05:59:04 +0000
commit8d7b1f988b946fc16dc8b4aa7ebb362747b23c88 (patch)
tree822ae945c049155fb3aa591faa2d6447f528baf6 /mail/imap-uw/files/patch-ai
parent[patch] update mail/cclient to version 2006j (diff)
[patch] update mail/imap-uw to version 2006j
The c-client and imap-uw ports are still at version 2004g. The attached patch updates imap-uw to version 2006j. PR: ports/114834 Submitted by: "Pedro J. Lobo" <pjlobo@sec.upm.es> Approved by: maintainer timeout
Notes
Notes: svn path=/head/; revision=200421
Diffstat (limited to 'mail/imap-uw/files/patch-ai')
-rw-r--r--mail/imap-uw/files/patch-ai192
1 files changed, 103 insertions, 89 deletions
diff --git a/mail/imap-uw/files/patch-ai b/mail/imap-uw/files/patch-ai
index 5bbb280d4636..cc5e0a3df96f 100644
--- a/mail/imap-uw/files/patch-ai
+++ b/mail/imap-uw/files/patch-ai
@@ -1,89 +1,103 @@
---- src/imapd/imapd.c.orig Tue Jun 29 21:56:17 2004
-+++ src/imapd/imapd.c Fri Sep 3 20:59:40 2004
-@@ -29,6 +29,11 @@
- #include "c-client.h"
- #include <sys/stat.h>
-
-+#ifdef DRAC_AUTH
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <stdlib.h>
-+#endif /* DRAC_AUTH */
-
- #define CRLF PSOUT ("\015\012") /* primary output terpri */
-
-@@ -183,6 +188,12 @@
-
- /* Global storage */
-
-+#ifdef DRAC_AUTH
-+#define DRACTIMEOUT 10*60 /* check every 10 minutes */
-+time_t lastdrac = 0; /* time of last drac check */
-+extern char *getenv ();
-+#endif /* DRAC_AUTH */
-+
- char *version = "2004.357"; /* version number of this server */
- time_t alerttime = 0; /* time of last alert */
- time_t sysalerttime = 0; /* time of last system alert */
-@@ -246,7 +257,50 @@
- msg_string_next, /* get next byte in string structure */
- msg_string_setpos /* set position in string structure */
- };
--
-+
-+#ifdef DRAC_AUTH
-+/* 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);
-+ }
-+
-+ 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);
-+
-+ lastdrac = time(0);
-+
-+ 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[])
-@@ -1251,6 +1305,9 @@
- lasterror ());
- return;
- }
-+ #ifdef DRAC_AUTH
-+ drac_auth();
-+ #endif /* DRAC_AUTH */
- /* change in number of messages? */
- if (existsquelled || (nmsgs != stream->nmsgs)) {
- PSOUT ("* ");
+*** src/imapd/imapd.c.orig Wed Jul 11 22:08:16 2007
+--- src/imapd/imapd.c Mon Jul 23 17:48:56 2007
+***************
+*** 38,43 ****
+--- 38,48 ----
+ #include "newsrc.h"
+ #include <sys/stat.h>
+
++ #ifdef DRAC_AUTH
++ #include <netinet/in.h>
++ #include <arpa/inet.h>
++ #include <stdlib.h>
++ #endif /* DRAC_AUTH */
+
+ #define CRLF PSOUT ("\015\012") /* primary output terpri */
+
+***************
+*** 203,208 ****
+--- 208,219 ----
+
+ /* Global storage */
+
++ #ifdef DRAC_AUTH
++ #define DRACTIMEOUT 10*60 /* check every 10 minutes */
++ time_t lastdrac = 0; /* time of last drac check */
++ extern char *getenv ();
++ #endif /* DRAC_AUTH */
++
+ char *version = "389"; /* edit number of this server */
+ char *logout = "Logout"; /* syslogreason for logout */
+ char *goodbye = NIL; /* bye reason */
+***************
+*** 277,283 ****
+ msg_string_next, /* get next byte in string structure */
+ msg_string_setpos /* set position in string structure */
+ };
+!
+ /* Main program */
+
+ int main (int argc,char *argv[])
+--- 288,337 ----
+ msg_string_next, /* get next byte in string structure */
+ msg_string_setpos /* set position in string structure */
+ };
+!
+! #ifdef DRAC_AUTH
+! /* 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);
+! }
+!
+! 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);
+!
+! lastdrac = time(0);
+!
+! 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[])
+***************
+*** 1501,1506 ****
+--- 1555,1563 ----
+ lasterror ());
+ return;
+ }
++ #ifdef DRAC_AUTH
++ drac_auth();
++ #endif /* DRAC_AUTH */
+ /* change in number of messages? */
+ if (existsquelled || (nmsgs != stream->nmsgs)) {
+ PSOUT ("* ");