Subject: Re: bin/36644: vacation does not work if homedir not present
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Wolfgang Solfrank <Wolfgang@Solfrank.net>
List: netbsd-bugs
Date: 07/13/2007 13:20:02
The following reply was made to PR bin/36644; it has been noted by GNATS.

From: Wolfgang Solfrank <Wolfgang@Solfrank.net>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/36644: vacation does not work if homedir not present
Date: Fri, 13 Jul 2007 15:17:23 +0200

 > --- vacation.c.orig	2004-08-19 15:43:54.000000000 +0200
 > +++ vacation.c	2007-07-13 12:35:07.000000000 +0200
 > @@ -244,7 +244,7 @@
 >  		    getprogname(), *argv);
 >  		exit(1);
 >  	}
 > -	if (chdir(pw->pw_dir)) {
 > +	if (chdir(pw->pw_dir) && dbprefix[0] != '/' && msgfile[0] != '/') {
 >  		syslog(LOG_ERR, "%s: no such directory %s.",
 >  		    getprogname(), pw->pw_dir);
 >  		exit(1);
 
 Obviously you mean
 
 +	if (chdir(pw->pw_dir) && (dbprefix[0] != '/' || msgfile[0] != '/')) {
 
 here, as you said "... if both the database and message files are given as
 absolute paths."  To be applied similarly to the alternatives you mention.
 
 Ciao,
 Wolfgang
 -- 
 Wolfgang@Solfrank.net