...
 
Commits (8)
......@@ -87,7 +87,18 @@ fetchmail-6.5.0 (not yet released):
--------------------------------------------------------------------------------
fetchmail-6.4.0 (released 2019-09-27, 27429 LoC):
fetchmail-6.4.1 (released 2019-09-28, 27473 LoC):
## REGRESSION FIXES:
* The bug fix Debian Bug#941129 was incomplete and caused
+ a regression in the default file locations, so that fetchmail was no longer
able to find it configuration files in some situations.
Reported by Cy Schubert.
+ a regression under _FORTIFY_SOURCE where PATH_MAX > minimal _POSIX_PATH_MAX.
--------------------------------------------------------------------------------
fetchmail 6.4.0 (released 2019-09-27, 27429 LoC):
# NOTE THAT FETCHMAIL IS NO LONGER PUBLISHED THROUGH IBIBLIO.
* They have stopped accepting submissions and consider themselves an archive.
......
......@@ -194,7 +194,7 @@ print "=== local\n";
print "=== sourceforge \n";
system("rsync -acvHP autobuild/$project-$version$xzsufx autobuild/$project-$version$xzsufx.asc autobuild/README m-a\@frs.sourceforge.net:/home/frs/project/fetchmail/branch_6.4/");
unlink 'autobuild/README' or die "cannot unlink autobuild/README: $!";
# unlink 'autobuild/README' or die "cannot unlink autobuild/README: $!";
print "=== Done - please review final tasks\n";
......
......@@ -99,15 +99,50 @@ void envquery(int argc, char **argv)
endpwent();
/* This documentation added to 6.4.1,
* and manual page corrected.
*
* here's the home directory logic:
* 1. we derive home. it is taken from:
* a. HOME_ETC
* b. HOME
* c. the user's passwd entry
* 2. we derive fmhome. It is normally
* a. home.
* b. It can be overridden from FETCHMAILHOME.
* If and only if fmhome != home, then the
* default configuration files will be expected
* without leading dots.
*/
/* compute user's home directory */
home = getenv("HOME_ETC");
if (!home && !(home = getenv("HOME")))
if (!home)
home = getenv("HOME");
if (!home)
home = xstrdup(pwp->pw_dir);
/* and make it an absolute path, so we
* can optionally chdir("/") later in daemonize()
* without changing behaviour.
*/
{
static char *_home_abs;
char *tmp;
if (_home_abs) free(_home_abs), _home_abs = 0;
tmp = realpath(home, NULL);
if (tmp) {
home = _home_abs = tmp;
} else {
report(stderr, GT_("Cannot find absolute path for user's home directory.\n"));
exit(PS_UNDEFINED);
}
}
/* compute fetchmail's home directory */
fmhome = getenv("FETCHMAILHOME");
if (NULL == fmhome) {
fmhome = home;
at_home = 1;
}
/* and make it an absolute path, so we
* can optionally chdir("/") later in daemonize()
......@@ -115,9 +150,16 @@ void envquery(int argc, char **argv)
* This is to fix Debian Bug#941129 by Alex Andreotti.
*/
{
static char _fmhome_abs[_POSIX_PATH_MAX];
char *tmp = realpath(fmhome, _fmhome_abs);
if (tmp) fmhome = _fmhome_abs;
static char *_fmhome_abs;
char *tmp;
if (_fmhome_abs) free(_fmhome_abs), _fmhome_abs = 0;
tmp = realpath(fmhome, NULL);
if (tmp) {
fmhome = _fmhome_abs = tmp;
} else {
report(stderr, GT_("Cannot find absolute path for fetchmail's home directory.\n"));
exit(PS_UNDEFINED);
}
}
#define RCFILE_NAME "fetchmailrc"
......@@ -127,7 +169,7 @@ void envquery(int argc, char **argv)
* for its files. We don't want to do that if fetchmail has its
* own home ($FETCHMAILHOME), however.
*/
rcfile = (char *)xmalloc(strlen(fmhome)+sizeof(RCFILE_NAME)+(fmhome==home)+2);
rcfile = (char *)xmalloc(strlen(fmhome) + sizeof(RCFILE_NAME) + 3);
/* avoid //.fetchmailrc */
if (strcmp(fmhome, "/") != 0)
strcpy(rcfile, fmhome);
......@@ -136,7 +178,7 @@ void envquery(int argc, char **argv)
if (rcfile[strlen(rcfile) - 1] != '/')
strcat(rcfile, "/");
if (fmhome==home)
if (at_home)
strcat(rcfile, ".");
strcat(rcfile, RCFILE_NAME);
}
......
......@@ -66,6 +66,7 @@ flag versioninfo; /* emit only version info */
char *user; /* the name of the invoking user */
char *home; /* invoking user's home directory */
char *fmhome; /* fetchmail's home directory */
int at_home; /* fetchmail is running inside the user's home directory */
const char *program_name; /* the name to prefix error messages with */
flag configdump; /* dump control blocks for configurator */
const char *fetchmailhost; /* either `localhost' or the host's FQDN */
......
......@@ -442,6 +442,7 @@ extern flag versioninfo; /* emit only version info */
extern char *user; /* name of invoking user */
extern char *home; /* home directory of invoking user */
extern char *fmhome; /* fetchmail home directory */
extern int at_home; /* normally 1, but 0 if FETCHMAILHOME overrides it */
extern int pass; /* number of re-polling pass */
extern flag configdump; /* dump control blocks as Python dictionary */
extern const char *fetchmailhost; /* either "localhost" or an FQDN */
......
......@@ -2828,18 +2828,21 @@ that of the last host queried.
.SH FILES
.TP 5
~/.fetchmailrc
default run control file
~/.fetchmailrc, $HOME/.fetchmailrc, $HOME_ETC/.fetchmailrc, $FETCHMAILHOME/fetchmailrc
default run control file (location can be overridden with environment variables)
.TP 5
~/.fetchids
~/.fetchids, $HOME/.fetchids, $HOME_ETC/.fetchids, $FETCHMAILHOME/.fetchids
default location of file recording last message UIDs seen per host.
(location can be overridden with environment variables)
.TP 5
~/.fetchmail.pid
lock file to help prevent concurrent runs (non-root mode).
~/.fetchmail.pid, $HOME/.fetchmail.pid, $HOME_ETC/.fetchmail.pid, $FETCHMAILHOME/fetchmail.pid
default location of lock file to help prevent concurrent runs (non-root mode).
(location can be overridden with environment variables)
.TP 5
~/.netrc
~/.netrc, $HOME/.netrc, $HOME_ETC/.netrc
your FTP run control file, which (if present) will be searched for
passwords as a last resort before prompting for one interactively.
(location can be overridden with environment variables)
.TP 5
/var/run/fetchmail.pid
lock file to help prevent concurrent runs (root mode, Linux systems).
......@@ -2851,10 +2854,10 @@ lock file to help prevent concurrent runs (root mode, systems without /var/run).
.IP \fBFETCHMAILHOME\fP
If this environment variable is set to a valid and
existing directory name, fetchmail will read $FETCHMAILHOME/fetchmailrc
(the dot is missing in this case), $FETCHMAILHOME/.fetchids and
$FETCHMAILHOME/.fetchmail.pid rather than from the user's home
(the dot is missing in this case), $FETCHMAILHOME/.fetchids (keeping its dot) and
$FETCHMAILHOME/fetchmail.pid (without dot) rather than from the user's home
directory. The .netrc file is always looked for in the the invoking
user's home directory regardless of FETCHMAILHOME's setting.
user's home directory (or $HOME_ETC) regardless of FETCHMAILHOME's setting.
.IP \fBFETCHMAILUSER\fP
If this environment variable is set, it is used as the name of the
......@@ -2886,15 +2889,26 @@ used as a workaround when TOP does not work properly.
(since v6.3.17):
If this environment variable is set and not empty, fetchmail will always load
the default X.509 trusted certificate locations for SSL/TLS CA certificates,
even if \fB\-\-sslcertfile\fP and \fB\-\-sslcertpath\fP are given. The latter locations take precedence over the system default locations.
even if \fB\-\-sslcertfile\fP and \fB\-\-sslcertpath\fP are given.
The latter locations take precedence over the system default locations.
This is useful in case there are broken certificates in the system directories
and the user has no administrator privileges to remedy the problem.
.IP \fBHOME_ETC\fP
If the HOME_ETC variable is set, fetchmail will read
$HOME_ETC/.fetchmailrc instead of ~/.fetchmailrc.
.IP \fBHOME\fP
(documented since 6.4.1):
This variable is nomally set to the user's home directory. If it is set
to a different directory than what is the password database, HOME takes
prececence.
If HOME_ETC and FETCHMAILHOME are both set, HOME_ETC will be ignored.
.IP \fBHOME_ETC\fP
(documented corrected to match behaviour code since 6.4.1):
If the HOME_ETC variable is set, it will override fetchmail's idea of $HOME,
i. e. fetchmail will read .fetchmailrc, .fetchids, .fetchmail.pid and .netrc
from $HOME_ETC instead of $HOME (or if HOME is also unset,
from the passwd file's home directory location).
If HOME_ETC and FETCHMAILHOME are both set, FETCHMAILHOME takes prececence
and HOME_ETC will be ignored.
.IP \fBSOCKS_CONF\fP
(only if SOCKS support is compiled in) this variable is used by the
......
......@@ -44,7 +44,7 @@ void fm_lock_setup(struct runctl *ctl)
+ strlen(FETCHMAIL_PIDFILE) + 3); /* 3: "/", "." and NUL */
strcpy(lockfile, fmhome);
strcat(lockfile, "/");
if (fmhome == home)
if (at_home)
strcat(lockfile, ".");
strcat(lockfile, FETCHMAIL_PIDFILE);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -43,10 +43,10 @@
<h1>Fetchmail</h1>
<div style="background-color:#c0ffc0;color:#000000;">
<h1>NEWS: FETCHMAIL 6.4.0 RELEASE</h1>
<p>On 2019-09-27, <a
<h1>NEWS: FETCHMAIL 6.4.1 RELEASE</h1>
<p>On 2019-09-28, <a
href="https://sourceforge.net/projects/fetchmail/files/branch_6.4/">fetchmail
6.4.0 has been released (click this link to download, or to see changes since 6.3.26)
6.4.1 has been released (click this link to download, or to see changes since 6.3.26)
</a>. Note that you will need OpenSSL 1.0.2 to compile.</p>
<p>This is a RECOMMENDED update for all users. Fetchmail 6.3.x versions are discontinued and no longer supported.</p>
</div>
......