~ari-tczew/ubuntu/dapper/fetchmail/fix-CVE-2008-2711

« back to all changes in this revision

Viewing changes to rcfile_y.y

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-02-07 12:12:13 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060207121213-onurwfrzdlzlzxnt
Tags: 6.3.2-2ubuntu1
* Resynchronise with Debian. This brings the new upstream version to dapper
  since upstream support for 6.2 was dropped.
* Drop debian/patches/CVE-2005-4348.dpatch, upstream now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#endif
23
23
#include <string.h>
24
24
 
25
 
#if NET_SECURITY
26
 
#include <net/security.h>
27
 
#endif /* NET_SECURITY */
 
25
#if defined(__CYGWIN__)
 
26
#include <sys/cygwin.h>
 
27
#endif /* __CYGWIN__ */
28
28
 
29
29
#include "fetchmail.h"
30
30
#include "i18n.h"
65
65
%token AUTHENTICATE TIMEOUT KPOP SDPS ENVELOPE QVIRTUAL
66
66
%token USERNAME PASSWORD FOLDER SMTPHOST FETCHDOMAINS MDA BSMTP LMTP
67
67
%token SMTPADDRESS SMTPNAME SPAMRESPONSE PRECONNECT POSTCONNECT LIMIT WARNINGS
68
 
%token NETSEC INTERFACE MONITOR PLUGIN PLUGOUT
 
68
%token INTERFACE MONITOR PLUGIN PLUGOUT
69
69
%token IS HERE THERE TO MAP WILDCARD
70
70
%token BATCHLIMIT FETCHLIMIT FETCHSIZELIMIT FASTUIDL EXPUNGE PROPERTIES
71
71
%token SET LOGFILE DAEMON SYSLOG IDFILE INVISIBLE POSTMASTER BOUNCEMAIL 
73
73
%token <proto> PROTO AUTHTYPE
74
74
%token <sval>  STRING
75
75
%token <number> NUMBER
76
 
%token NO KEEP FLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS 
 
76
%token NO KEEP FLUSH LIMITFLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS 
77
77
%token DROPSTATUS DROPDELIVERED
78
78
%token DNS SERVICE PORT UIDL INTERVAL MIMEDECODE IDLE CHECKALIAS 
79
79
%token SSL SSLKEY SSLCERT SSLPROTO SSLCERTCK SSLCERTPATH SSLFINGERPRINT
151
151
#ifdef KERBEROS_V5
152
152
                                                current.server.authenticate = A_KERBEROS_V5;
153
153
#else
154
 
                                                current.server.authenticate = A_KERBEROS_V4;
 
154
                                                current.server.authenticate = A_KERBEROS_V4;
155
155
#endif /* KERBEROS_V5 */
156
 
#if INET6_ENABLE
157
156
                                            current.server.service = KPOP_PORT;
158
 
#else /* INET6_ENABLE */
159
 
                                            current.server.port = KPOP_PORT;
160
 
#endif /* INET6_ENABLE */
161
157
                                        }
162
158
                | PRINCIPAL STRING      {current.server.principal = xstrdup($2);}
163
159
                | ESMTPNAME STRING      {current.server.esmtp_name = xstrdup($2);}
175
171
                | CHECKALIAS            {current.server.checkalias = FLAG_TRUE;}
176
172
                | NO CHECKALIAS         {current.server.checkalias  = FLAG_FALSE;}
177
173
                | SERVICE STRING        {
178
 
#if INET6_ENABLE
179
174
                                        current.server.service = $2;
180
 
#endif /* INET6_ENABLE */
181
175
                                        }
 
176
                | SERVICE NUMBER        {
 
177
                                        int port = $2;
 
178
                                        char buf[10];
 
179
                                        snprintf(buf, sizeof buf, "%d", port);
 
180
                                        current.server.service = xstrdup(buf);
 
181
                }
182
182
                | PORT NUMBER           {
183
 
#if INET6_ENABLE
184
183
                                        int port = $2;
185
184
                                        char buf[10];
186
 
                                        sprintf(buf, "%d", port);
 
185
                                        snprintf(buf, sizeof buf, "%d", port);
187
186
                                        current.server.service = xstrdup(buf);
188
 
#else
189
 
                                        current.server.port = $2;
190
 
#endif /* INET6_ENABLE */
191
187
                }
192
188
                | INTERVAL NUMBER
193
189
                        {current.server.interval = $2;}
209
205
                                        }
210
206
 
211
207
                | QVIRTUAL STRING       {current.server.qvirtual=xstrdup($2);}
212
 
                | NETSEC STRING         {
213
 
#ifdef NET_SECURITY
214
 
                                            void *request;
215
 
                                            int requestlen;
216
 
 
217
 
                                            if (net_security_strtorequest($2, &request, &requestlen))
218
 
                                                yyerror(GT_("invalid security request"));
219
 
                                            else {
220
 
                                                current.server.netsec = xstrdup($2);
221
 
                                                free(request);
222
 
                                            }
223
 
#else
224
 
                                            yyerror(GT_("network-security support disabled"));
225
 
#endif /* NET_SECURITY */
226
 
                                        }
227
208
                | INTERFACE STRING      {
228
 
#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__)
 
209
#ifdef CAN_MONITOR
229
210
                                        interface_parse($2, &current.server);
230
 
#else /* (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) */
 
211
#else
231
212
                                        fprintf(stderr, GT_("fetchmail: interface option is only supported under Linux (without IPv6) and FreeBSD\n"));
232
 
#endif /* (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) */
 
213
#endif
233
214
                                        }
234
215
                | MONITOR STRING        {
235
 
#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__)
 
216
#ifdef CAN_MONITOR
236
217
                                        current.server.monitor = xstrdup($2);
237
 
#else /* (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) */
 
218
#else
238
219
                                        fprintf(stderr, GT_("fetchmail: monitor option is only supported under Linux (without IPv6) and FreeBSD\n"));
239
 
#endif /* (defined(linux) && !defined(INET6_ENABLE) || defined(__FreeBSD__)) */
 
220
#endif
240
221
                                        }
241
222
                | PLUGIN STRING         { current.server.plugin = xstrdup($2); }
242
223
                | PLUGOUT STRING        { current.server.plugout = xstrdup($2); }
243
224
                | DNS                   {current.server.dns = FLAG_TRUE;}
244
225
                | NO DNS                {current.server.dns = FLAG_FALSE;}
245
226
                | NO ENVELOPE           {current.server.envelope = STRING_DISABLED;}
246
 
                | TRACEPOLLS            {current.tracepolls = FLAG_TRUE;}
247
 
                | NO TRACEPOLLS         {current.tracepolls = FLAG_FALSE;}
 
227
                | TRACEPOLLS            {current.server.tracepolls = FLAG_TRUE;}
 
228
                | NO TRACEPOLLS         {current.server.tracepolls = FLAG_FALSE;}
248
229
                ;
249
230
 
250
231
userspecs       : user1opts             {record_current(); user_reset();}
333
314
 
334
315
                | KEEP                  {current.keep        = FLAG_TRUE;}
335
316
                | FLUSH                 {current.flush       = FLAG_TRUE;}
 
317
                | LIMITFLUSH            {current.limitflush  = FLAG_TRUE;}
336
318
                | FETCHALL              {current.fetchall    = FLAG_TRUE;}
337
319
                | REWRITE               {current.rewrite     = FLAG_TRUE;}
338
320
                | FORCECR               {current.forcecr     = FLAG_TRUE;}
359
341
 
360
342
                | NO KEEP               {current.keep        = FLAG_FALSE;}
361
343
                | NO FLUSH              {current.flush       = FLAG_FALSE;}
 
344
                | NO LIMITFLUSH         {current.limitflush  = FLAG_FALSE;}
362
345
                | NO FETCHALL           {current.fetchall    = FLAG_FALSE;}
363
346
                | NO REWRITE            {current.rewrite     = FLAG_FALSE;}
364
347
                | NO FORCECR            {current.forcecr     = FLAG_FALSE;}
437
420
    }
438
421
 
439
422
#ifndef __BEOS__
 
423
#ifdef __CYGWIN__
 
424
    if (cygwin_internal(CW_CHECK_NTSEC, pathname))
 
425
#endif /* __CYGWIN__ */
440
426
    if (statbuf.st_mode & (S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH | S_IXOTH))
441
427
    {
442
428
        fprintf(stderr, GT_("File %s must have no more than -rwx--x--- (0710) permissions.\n"), 
596
582
int yywrap(void) {return 1;}
597
583
 
598
584
/* rcfile_y.y ends here */
599
 
 
600