Группа :: Сети/Почта
Пакет: fetchmail
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: fetchmail-6.2.5-nopermcheck.patch
--- fetchmail-6.2.5/options.c.orig-nopermcheck 2003-10-15 23:22:31 +0400
+++ fetchmail-6.2.5/options.c 2003-10-16 13:17:44 +0400
@@ -88,6 +88,8 @@
#define LA_FETCHSIZELIMIT 61
#define LA_FASTUIDL 62
+ /* 'i' */
+#define LA_NOPERMCHECK 64
/* options still left: CDgGhHjJoORwWxXYz */
static const char *shortoptions =
@@ -109,6 +111,7 @@
{"syslog", no_argument, (int *) 0, LA_SYSLOG },
{"nosyslog", no_argument, (int *) 0, LA_NOSYSLOG },
{"fetchmailrc",required_argument,(int *) 0, LA_RCFILE },
+ {"nopermcheck",no_argument, (int *) 0, LA_NOPERMCHECK },
{"idfile", required_argument, (int *) 0, LA_IDFILE },
{"postmaster",required_argument, (int *) 0, LA_POSTMASTER },
{"nobounce", no_argument, (int *) 0, LA_NOBOUNCE },
@@ -287,6 +290,7 @@
case 'V':
case LA_VERSION:
versioninfo = TRUE;
+ permcheck = FALSE;
break;
case 'c':
case LA_CHECK:
@@ -329,6 +333,9 @@
case LA_RCFILE:
rcfile = prependdir (optarg, currentwd);
break;
+ case LA_NOPERMCHECK:
+ permcheck = FALSE;
+ break;
case 'i':
case LA_IDFILE:
rctl->idfile = prependdir (optarg, currentwd);
--- fetchmail-6.2.5/fetchmail.c.orig-nopermcheck 2003-10-15 23:22:31 +0400
+++ fetchmail-6.2.5/fetchmail.c 2003-10-16 13:12:15 +0400
@@ -56,6 +56,7 @@
flag quitmode; /* if --quit was set */
flag check_only; /* if --probe was set */
flag versioninfo; /* emit only version info */
+flag permcheck = TRUE; /* perform permission checks on files */
char *user; /* the name of the invoking user */
char *home; /* invoking user's home directory */
char *fmhome; /* fetchmail's home directory */
@@ -941,7 +942,7 @@
report(stderr, GT_("couldn't time-check the run-control file\n"));
/* this builds the host list */
- if ((st = prc_parse_file(rcfile, !versioninfo)) != 0)
+ if ((st = prc_parse_file(rcfile, permcheck)) != 0)
/*
* FIXME: someday, send notification mail here if backgrounded.
* Right now, that can happen if the user changes the rcfile
@@ -1209,7 +1210,7 @@
#ifdef POP3_ENABLE
/* initialize UID handling */
- if (!versioninfo && (st = prc_filecheck(run.idfile, !versioninfo)) != 0)
+ if (!versioninfo && (st = prc_filecheck(run.idfile, TRUE)) != 0)
exit(st);
else
initialize_saved_lists(querylist, run.idfile);
--- fetchmail-6.2.5/fetchmail.h.orig-nopermcheck 2003-10-15 23:22:31 +0400
+++ fetchmail-6.2.5/fetchmail.h 2003-10-16 13:12:15 +0400
@@ -388,6 +388,7 @@
extern char *rcfile; /* path name of rc file */
extern int linelimit; /* limit # lines retrieved per site */
extern flag versioninfo; /* emit only version info */
+extern flag permcheck; /* perform permission checks on files */
extern char *user; /* name of invoking user */
extern char *home; /* home directory of invoking user */
extern char *fmhome; /* fetchmail home directory */