View | Details | Raw Unified | Return to bug 130617
Collapse All | Expand All

(-)ports/mail/imap-uw/Makefile (-8 / +1 lines)
Lines 6-14 Link Here
6
#
6
#
7
7
8
PORTNAME=	imap
8
PORTNAME=	imap
9
PORTVERSION=	2006j
9
PORTVERSION=	2007e
10
DISTVERSIONSUFFIX=	2
11
PORTREVISION=	3
12
PORTEPOCH=	1
10
PORTEPOCH=	1
13
CATEGORIES=	mail ipv6
11
CATEGORIES=	mail ipv6
14
MASTER_SITES=	ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
12
MASTER_SITES=	ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
Lines 18-24 Link Here
18
MASTER_SITE_SUBDIR=	. old
16
MASTER_SITE_SUBDIR=	. old
19
PKGNAMESUFFIX=	-uw
17
PKGNAMESUFFIX=	-uw
20
DISTNAME=	imap-${PORTVERSION}
18
DISTNAME=	imap-${PORTVERSION}
21
EXTRACT_SUFX=	.tar.Z
22
DISTFILES=	${DISTNAME}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}
19
DISTFILES=	${DISTNAME}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}
23
20
24
MAINTAINER=	anders@FreeBSD.org
21
MAINTAINER=	anders@FreeBSD.org
Lines 42-51 Link Here
42
DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
39
DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
43
WRKSRC=		${WRKDIR}/${DISTNAME}
40
WRKSRC=		${WRKDIR}/${DISTNAME}
44
41
45
FORBIDDEN=	multiple vulnerabilities \
46
		http://www.vuxml.org/freebsd/a6713190-dfea-11dd-a765-0030843d3802.html \
47
		http://www.vuxml.org/freebsd/69a20ce4-dfee-11dd-a765-0030843d3802.html
48
49
MAN1=		dmail.1 mailutil.1 tmail.1
42
MAN1=		dmail.1 mailutil.1 tmail.1
50
MAN8=		ipopd.8 imapd.8
43
MAN8=		ipopd.8 imapd.8
51
44
(-)ports/mail/imap-uw/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (imap-2006j2.tar.Z) = d7900691c415bcc725c1bf2b15e4fb99
1
MD5 (imap-2007e.tar.gz) = 7903800dc2604000016de070e0c55840
2
SHA256 (imap-2006j2.tar.Z) = 5b2ed247fd98f81c7a2d23d0822f602d49b742c19761a9c2dad6753f5f3e806e
2
SHA256 (imap-2007e.tar.gz) = 4b1137b87249782496ec3eeacaf83bbf09312a7d2ae3aead262179041b55565f
3
SIZE (imap-2006j2.tar.Z) = 2686745
3
SIZE (imap-2007e.tar.gz) = 1991389
(-)ports/mail/imap-uw/pkg-plist (-2 / +8 lines)
Lines 36-42 Link Here
36
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2088.txt
36
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2088.txt
37
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2177.txt
37
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2177.txt
38
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2180.txt
38
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2180.txt
39
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2192.txt
40
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2193.txt
39
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2193.txt
41
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2195.txt
40
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2195.txt
42
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2221.txt
41
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2221.txt
Lines 50-56 Link Here
50
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3516.txt
49
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3516.txt
51
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3656.txt
50
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3656.txt
52
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3691.txt
51
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3691.txt
53
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4234.txt
54
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4314.txt
52
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4314.txt
55
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4315.txt
53
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4315.txt
56
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4422.txt
54
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4422.txt
Lines 65-70 Link Here
65
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4731.txt
63
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4731.txt
66
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4752.txt
64
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4752.txt
67
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4790.txt
65
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4790.txt
66
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4959.txt
67
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4978.txt
68
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5032.txt
69
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5051.txt
70
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5234.txt
71
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5092.txt
72
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5161.txt
73
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc5162.txt
68
%%PORTDOCS%%%%DOCSDIR%%/rfc/README
74
%%PORTDOCS%%%%DOCSDIR%%/rfc/README
69
%%PORTDOCS%%@dirrm %%DOCSDIR%%/draft
75
%%PORTDOCS%%@dirrm %%DOCSDIR%%/draft
70
%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
76
%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
(-)ports/mail/imap-uw/files/patch-ah (-173 / +131 lines)
Lines 1-173 Link Here
1
*** src/ipopd/ipop3d.c.orig	Tue May 22 01:23:47 2007
1
--- src/ipopd/ipop3d.c.orig	2008-06-04 20:18:34.000000000 +0200
2
--- src/ipopd/ipop3d.c	Mon Jul 23 17:46:53 2007
2
+++ src/ipopd/ipop3d.c	2009-01-16 10:19:50.000000000 +0100
3
***************
3
@@ -34,6 +34,11 @@
4
*** 36,41 ****
4
 #include <time.h>
5
--- 36,46 ----
5
 #include "c-client.h"
6
  #include <time.h>
6
 
7
  #include "c-client.h"
7
+#ifdef DRAC_AUTH
8
  
8
+#include <netinet/in.h>
9
+ #ifdef DRAC_AUTH
9
+#include <arpa/inet.h>
10
+ #include <netinet/in.h>
10
+#include <stdlib.h>
11
+ #include <arpa/inet.h>
11
+#endif /* DRAC_AUTH */
12
+ #include <stdlib.h>
12
 
13
+ #endif /* DRAC_AUTH */
13
 #define CRLF PSOUT ("\015\012")	/* primary output terpri */
14
  
14
 
15
  #define CRLF PSOUT ("\015\012")	/* primary output terpri */
15
@@ -59,6 +64,12 @@
16
  
16
 
17
***************
17
 /* Global storage */
18
*** 65,70 ****
18
 
19
--- 70,81 ----
19
+#ifdef DRAC_AUTH
20
  
20
+#define DRACTIMEOUT 10*60     /* check every 10 minutes */
21
  /* Global storage */
21
+time_t lastdrac = 0;          /* time of last drac check */
22
  
22
+extern char *getenv ();
23
+ #ifdef DRAC_AUTH
23
+#endif /* DRAC_AUTH */
24
+ #define DRACTIMEOUT 10*60     /* check every 10 minutes */
24
+
25
+ time_t lastdrac = 0;          /* time of last drac check */
25
 char *version = "104";		/* edit number of this server */
26
+ extern char *getenv ();
26
 short state = AUTHORIZATION;	/* server state */
27
+ #endif /* DRAC_AUTH */
27
 short critical = NIL;		/* non-zero if in critical code */
28
+ 
28
@@ -100,7 +111,53 @@
29
  char *version = "98";		/* edit number of this server */
29
 int mbxopen (char *mailbox);
30
  short state = AUTHORIZATION;	/* server state */
30
 long blat (char *text,long lines,unsigned long size,STRING *st);
31
  short critical = NIL;		/* non-zero if in critical code */
31
 void rset ();
32
***************
32
-
33
*** 98,104 ****
33
+#ifdef DRAC_AUTH
34
  int mbxopen (char *mailbox);
34
+void drac_auth();
35
  long blat (char *text,long lines,unsigned long size,STRING *st);
35
+#endif /* DRAC_AUTH */
36
  void rset ();
36
+
37
! 
37
+#ifdef DRAC_AUTH
38
  /* Main program */
38
+/* DRAC Authorization
39
  
39
+ */
40
  int main (int argc,char *argv[])
40
+void drac_auth ()
41
--- 109,161 ----
41
+{
42
  int mbxopen (char *mailbox);
42
+  if (time (0) > lastdrac + DRACTIMEOUT)
43
  long blat (char *text,long lines,unsigned long size,STRING *st);
43
+  {
44
  void rset ();
44
+	  FILE *dracconf;
45
! #ifdef DRAC_AUTH
45
+	  char host[100];
46
! void drac_auth();
46
+	  char *drachost;
47
! #endif /* DRAC_AUTH */
47
+	  char *err;
48
! 
48
+	  char *p;
49
! #ifdef DRAC_AUTH
49
+
50
! /* DRAC Authorization
50
+	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
51
!  */
51
+	  {
52
! void drac_auth ()
52
+		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
53
! {
53
+		exit(1);
54
!   if (time (0) > lastdrac + DRACTIMEOUT)
54
+	  }
55
!   {
55
+
56
! 	  FILE *dracconf;
56
+	  fgets(host, 100, dracconf);
57
! 	  char host[100];
57
+	  p = strchr(host, '\n');
58
! 	  char *drachost;
58
+	  if(p != NULL)
59
! 	  char *err;
59
+		*p = '\0';
60
! 	  char *p;
60
+	  fclose(dracconf);
61
! 
61
+
62
! 	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
62
+	  if( drachost = (host) )
63
! 	  {
63
+	  {
64
! 		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
64
+		  struct sockaddr_in sin;
65
! 		exit(1);
65
+		  int sinlen = sizeof (struct sockaddr_in);
66
! 	  }
66
+		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
67
! 
67
+			"UNKNOWN" : inet_ntoa (sin.sin_addr);
68
! 	  fgets(host, 100, dracconf);
68
+
69
! 	  p = strchr(host, '\n');
69
+		  lastdrac = time(0);
70
! 	  if(p != NULL)
70
+
71
! 		*p = '\0';
71
+		  if (dracauth(drachost, inet_addr(client), &err) != 0)
72
! 	  fclose(dracconf);
72
+			  syslog (LOG_INFO, err);
73
! 
73
+		  else
74
! 	  if( drachost = (host) )
74
+			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
75
! 	  {
75
+	  }
76
! 		  struct sockaddr_in sin;
76
+  }
77
! 		  int sinlen = sizeof (struct sockaddr_in);
77
+}
78
! 		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
78
+#endif /* DRAC_AUTH */
79
! 			"UNKNOWN" : inet_ntoa (sin.sin_addr);
79
+
80
! 
80
 /* Main program */
81
! 		  lastdrac = time(0);
81
 
82
! 
82
 int main (int argc,char *argv[])
83
! 		  if (dracauth(drachost, inet_addr(client), &err) != 0)
83
@@ -113,7 +170,7 @@
84
! 			  syslog (LOG_INFO, err);
84
     (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
85
! 		  else
85
      s+1 : argv[0]) : "ipop3d";
86
! 			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
86
 				/* set service name before linkage */
87
! 	  }
87
-  mail_parameters (NIL,SET_SERVICENAME,(void *) "pop");
88
!   }
88
+  mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3");
89
! }
89
 #include "linkage.c"
90
! #endif /* DRAC_AUTH */
90
 				/* initialize server */
91
! 
91
   server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint,NIL);
92
  /* Main program */
92
@@ -228,9 +285,13 @@
93
  
93
 	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
94
  int main (int argc,char *argv[])
94
 		      tcp_clienthost ());
95
***************
95
 	    }
96
*** 111,117 ****
96
-	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
97
      (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
97
+	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
98
       s+1 : argv[0]) : "ipop3d";
98
+		#ifdef DRAC_AUTH
99
  				/* set service name before linkage */
99
+		drac_auth();
100
!   mail_parameters (NIL,SET_SERVICENAME,(void *) "pop");
100
+		#endif /* DRAC_AUTH */
101
  #include "linkage.c"
101
 	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%lu/%lu",
102
  				/* initialize server */
102
 		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
103
    server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint);
103
+		}
104
--- 168,174 ----
104
 	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
105
      (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
105
 			 user,tcp_clienthost ());
106
       s+1 : argv[0]) : "ipop3d";
106
 	  }
107
  				/* set service name before linkage */
107
@@ -260,9 +321,13 @@
108
!   mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3");
108
 	      PSOUT ("-ERR Missing APOP argument\015\012");
109
  #include "linkage.c"
109
 	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
110
  				/* initialize server */
110
 	      PSOUT ("-ERR Bad APOP\015\012");
111
    server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint);
111
-	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
112
***************
112
+	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
113
*** 215,223 ****
113
+		#ifdef DRAC_AUTH
114
  	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
114
+		drac_auth();
115
  		      tcp_clienthost ());
115
+		#endif /* DRAC_AUTH */
116
  	    }
116
 	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%lu/%lu",
117
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
117
 		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
118
  	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%ld/%ld",
118
+		}
119
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
119
 	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
120
  	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
120
 			 user,tcp_clienthost ());
121
  			 user,tcp_clienthost ());
121
 	  }
122
  	  }
122
@@ -665,6 +730,9 @@
123
--- 272,284 ----
123
 				/* attempt the login */
124
  	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
124
     if (server_login (user,pass,t,argc,argv)) {
125
  		      tcp_clienthost ());
125
       int ret = mbxopen ("INBOX");
126
  	    }
126
+	#ifdef DRAC_AUTH
127
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
127
+	drac_auth();
128
! 		#ifdef DRAC_AUTH
128
+	#endif /* DRAC_AUTH */
129
! 		drac_auth();
129
       if (ret == TRANSACTION)	/* mailbox opened OK? */
130
! 		#endif /* DRAC_AUTH */
130
 	syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%lu/%lu",
131
  	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%ld/%ld",
131
 		t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs);
132
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
133
+ 		}
134
  	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
135
  			 user,tcp_clienthost ());
136
  	  }
137
***************
138
*** 247,255 ****
139
  	      PSOUT ("-ERR Missing APOP argument\015\012");
140
  	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
141
  	      PSOUT ("-ERR Bad APOP\015\012");
142
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
143
  	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%ld/%ld",
144
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
145
  	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
146
  			 user,tcp_clienthost ());
147
  	  }
148
--- 308,320 ----
149
  	      PSOUT ("-ERR Missing APOP argument\015\012");
150
  	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
151
  	      PSOUT ("-ERR Bad APOP\015\012");
152
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
153
! 		#ifdef DRAC_AUTH
154
! 		drac_auth();
155
! 		#endif /* DRAC_AUTH */
156
  	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%ld/%ld",
157
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
158
+ 		}
159
  	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
160
  			 user,tcp_clienthost ());
161
  	  }
162
***************
163
*** 609,614 ****
164
--- 674,682 ----
165
  				/* attempt the login */
166
      if (server_login (user,pass,t,argc,argv)) {
167
        int ret = mbxopen ("INBOX");
168
+ 	#ifdef DRAC_AUTH
169
+ 	drac_auth();
170
+ 	#endif /* DRAC_AUTH */
171
        if (ret == TRANSACTION)	/* mailbox opened OK? */
172
  	syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%ld/%ld",
173
  		t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs);
(-)ports/mail/imap-uw/files/patch-ai (-103 / +89 lines)
Lines 1-103 Link Here
1
*** src/imapd/imapd.c.orig	Wed Jul 11 22:08:16 2007
1
--- src/imapd/imapd.c.orig	2008-11-18 19:46:59.000000000 +0100
2
--- src/imapd/imapd.c	Mon Jul 23 17:48:56 2007
2
+++ src/imapd/imapd.c	2009-01-16 10:23:02.000000000 +0100
3
***************
3
@@ -37,6 +37,11 @@
4
*** 38,43 ****
4
 #include "newsrc.h"
5
--- 38,48 ----
5
 #include <sys/stat.h>
6
  #include "newsrc.h"
6
 
7
  #include <sys/stat.h>
7
+#ifdef DRAC_AUTH
8
  
8
+#include <netinet/in.h>
9
+ #ifdef DRAC_AUTH
9
+#include <arpa/inet.h>
10
+ #include <netinet/in.h>
10
+#include <stdlib.h>
11
+ #include <arpa/inet.h>
11
+#endif /* DRAC_AUTH */
12
+ #include <stdlib.h>
12
 
13
+ #endif /* DRAC_AUTH */
13
 #define CRLF PSOUT ("\015\012")	/* primary output terpri */
14
  
14
 
15
  #define CRLF PSOUT ("\015\012")	/* primary output terpri */
15
@@ -207,6 +212,12 @@
16
  
16
 
17
***************
17
 /* Global storage */
18
*** 203,208 ****
18
 
19
--- 208,219 ----
19
+#ifdef DRAC_AUTH
20
  
20
+#define DRACTIMEOUT 10*60     /* check every 10 minutes */
21
  /* Global storage */
21
+time_t lastdrac = 0;          /* time of last drac check */
22
  
22
+extern char *getenv ();
23
+ #ifdef DRAC_AUTH
23
+#endif /* DRAC_AUTH */
24
+ #define DRACTIMEOUT 10*60     /* check every 10 minutes */
24
+
25
+ time_t lastdrac = 0;          /* time of last drac check */
25
 char *version = "404";		/* edit number of this server */
26
+ extern char *getenv ();
26
 char *logout = "Logout";	/* syslogreason for logout */
27
+ #endif /* DRAC_AUTH */
27
 char *goodbye = NIL;		/* bye reason */
28
+ 
28
@@ -283,7 +294,50 @@
29
  char *version = "389";		/* edit number of this server */
29
   msg_string_next,		/* get next byte in string structure */
30
  char *logout = "Logout";	/* syslogreason for logout */
30
   msg_string_setpos		/* set position in string structure */
31
  char *goodbye = NIL;		/* bye reason */
31
 };
32
***************
32
-
33
*** 277,283 ****
33
+
34
    msg_string_next,		/* get next byte in string structure */
34
+#ifdef DRAC_AUTH
35
    msg_string_setpos		/* set position in string structure */
35
+/* DRAC Authorization
36
  };
36
+ */
37
! 
37
+void drac_auth ()
38
  /* Main program */
38
+{
39
  
39
+  if (time (0) > lastdrac + DRACTIMEOUT)
40
  int main (int argc,char *argv[])
40
+  {
41
--- 288,337 ----
41
+	  FILE *dracconf;
42
    msg_string_next,		/* get next byte in string structure */
42
+	  char host[100];
43
    msg_string_setpos		/* set position in string structure */
43
+	  char *drachost;
44
  };
44
+	  char *err;
45
! 
45
+	  char *p;
46
! #ifdef DRAC_AUTH
46
+
47
! /* DRAC Authorization
47
+	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
48
!  */
48
+	  {
49
! void drac_auth ()
49
+		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
50
! {
50
+		exit(1);
51
!   if (time (0) > lastdrac + DRACTIMEOUT)
51
+	  }
52
!   {
52
+
53
! 	  FILE *dracconf;
53
+	  fgets(host, 100, dracconf);
54
! 	  char host[100];
54
+	  p = strchr(host, '\n');
55
! 	  char *drachost;
55
+	  if(p != NULL)
56
! 	  char *err;
56
+		*p = '\0';
57
! 	  char *p;
57
+	  fclose(dracconf);
58
! 
58
+
59
! 	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
59
+	  if( drachost = (host) )
60
! 	  {
60
+	  {
61
! 		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
61
+		  struct sockaddr_in sin;
62
! 		exit(1);
62
+		  int sinlen = sizeof (struct sockaddr_in);
63
! 	  }
63
+		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
64
! 
64
+			"UNKNOWN" : inet_ntoa (sin.sin_addr);
65
! 	  fgets(host, 100, dracconf);
65
+
66
! 	  p = strchr(host, '\n');
66
+		  lastdrac = time(0);
67
! 	  if(p != NULL)
67
+
68
! 		*p = '\0';
68
+		  if (dracauth(drachost, inet_addr(client), &err) != 0)
69
! 	  fclose(dracconf);
69
+			  syslog (LOG_INFO, err);
70
! 
70
+		  else
71
! 	  if( drachost = (host) )
71
+			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
72
! 	  {
72
+	  }
73
! 		  struct sockaddr_in sin;
73
+  }
74
! 		  int sinlen = sizeof (struct sockaddr_in);
74
+}
75
! 		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
75
+#endif /* DRAC_AUTH */
76
! 			"UNKNOWN" : inet_ntoa (sin.sin_addr);
76
+
77
! 
77
 /* Main program */
78
! 		  lastdrac = time(0);
78
 
79
! 
79
 int main (int argc,char *argv[])
80
! 		  if (dracauth(drachost, inet_addr(client), &err) != 0)
80
@@ -1525,6 +1579,9 @@
81
! 			  syslog (LOG_INFO, err);
81
 	      lasterror ());
82
! 		  else
82
       return;
83
! 			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
83
     }
84
! 	  }
84
+	#ifdef DRAC_AUTH
85
!   }
85
+	drac_auth();
86
! }
86
+	#endif /* DRAC_AUTH */
87
! #endif /* DRAC_AUTH */
87
 				/* change in number of messages? */
88
! 
88
     if (existsquelled || (nmsgs != stream->nmsgs)) {
89
  /* Main program */
89
       PSOUT ("* ");
90
  
91
  int main (int argc,char *argv[])
92
***************
93
*** 1501,1506 ****
94
--- 1555,1563 ----
95
  	      lasterror ());
96
        return;
97
      }
98
+ 	#ifdef DRAC_AUTH
99
+ 	drac_auth();
100
+ 	#endif /* DRAC_AUTH */
101
  				/* change in number of messages? */
102
      if (existsquelled || (nmsgs != stream->nmsgs)) {
103
        PSOUT ("* ");
(-)ports/mail/imap-uw/files/patch-src-dmail-Makefile (-8 / +11 lines)
Lines 1-6 Link Here
1
--- src/dmail/Makefile.orig	Wed Nov 27 04:10:53 2002
1
--- src/dmail/Makefile.orig	2008-06-04 20:18:34.000000000 +0200
2
+++ src/dmail/Makefile	Wed Nov 27 04:12:31 2002
2
+++ src/dmail/Makefile	2009-01-16 10:28:52.000000000 +0100
3
@@ -23,17 +23,11 @@
3
@@ -31,20 +31,12 @@
4
 
4
 
5
 # Get local definitions from c-client directory
5
 # Get local definitions from c-client directory
6
 
6
 
Lines 10-23 Link Here
10
+CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
10
+CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
11
+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
11
+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
12
 
12
 
13
-dmail: $(CCLIENTLIB) dmail.o
13
-dmail: $(CCLIENTLIB) dmail.o dquota.o
14
+dmail: dmail.o
14
+dmail: dmail.o dquota.o
15
 	$(CC) $(CFLAGS) -o dmail dmail.o $(LDFLAGS)
15
 	$(CC) $(CFLAGS) -o dmail dmail.o dquota.o $(LDFLAGS)
16
 
17
-dmail.o: $C/mail.h $C/misc.h $C/osdep.h dquota.h
16
-
18
-
17
-dmail.o: $C/mail.h $C/misc.h $C/osdep.h
19
-dquota.o: dquota.h
18
-
20
-
19
-$(CCLIENTLIB):
21
-$(CCLIENTLIB):
20
-	cd $C;make
22
-	cd $C;make
21
 
23
-
22
 clean:
24
 clean:
23
 	rm -f *.o dmail
25
 	rm -f *.o dmail
26
 
(-)ports/mail/imap-uw/files/patch-src-tmail-Makefile (-8 / +11 lines)
Lines 1-6 Link Here
1
--- src/tmail/Makefile.orig	Wed Nov 27 04:13:15 2002
1
--- src/tmail/Makefile.orig	2008-06-04 20:18:34.000000000 +0200
2
+++ src/tmail/Makefile	Wed Nov 27 04:14:09 2002
2
+++ src/tmail/Makefile	2009-01-16 10:30:24.000000000 +0100
3
@@ -23,17 +23,11 @@
3
@@ -31,20 +31,12 @@
4
 
4
 
5
 # Get local definitions from c-client directory
5
 # Get local definitions from c-client directory
6
 
6
 
Lines 10-23 Link Here
10
+CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
10
+CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
11
+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
11
+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
12
 
12
 
13
-tmail: $(CCLIENTLIB) tmail.o
13
-tmail: $(CCLIENTLIB) tmail.o tquota.o
14
+tmail: tmail.o
14
+tmail: tmail.o tquota.o
15
 	$(CC) $(CFLAGS) -o tmail tmail.o $(LDFLAGS)
15
 	$(CC) $(CFLAGS) -o tmail tmail.o tquota.o $(LDFLAGS)
16
 
17
-tmail.o: $C/mail.h $C/misc.h $C/osdep.h tquota.h
16
-
18
-
17
-tmail.o: $C/mail.h $C/misc.h $C/osdep.h
19
-tquota.o: tquota.h
18
-
20
-
19
-$(CCLIENTLIB):
21
-$(CCLIENTLIB):
20
-	cd $C;make
22
-	cd $C;make
21
 
23
-
22
 clean:
24
 clean:
23
 	rm -f *.o tmail
25
 	rm -f *.o tmail
26

Return to bug 130617