Date: Wed, 21 May 2003 10:04:33 +1000 From: Bernd Groh <bgroh@redhat.com> To: Bernd Groh <bgroh@redhat.com> Cc: freebsd-cvsweb@freebsd.org Subject: Re: Error: Failed to spawn GNU rlog Message-ID: <3ECAC291.3000801@redhat.com> In-Reply-To: <3ECAB9B5.6060005@redhat.com> References: <3ECAA87C.7090406@softtek.com> <1053469908.22989.53.camel@bobcat.ods.org> <3ECAB9B5.6060005@redhat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Here's the fix:
sub getDirLogs($$@) {
my ($cvsroot, $dirname, @otherFiles) = @_;
my ($state, $otherFiles, $tag, $file, $date, $branchpoint, $branch,
$log);
my ($rev, $revision, $revwanted, $filename, $head, $author);
$tag = $input{only_with_tag};
my ($DirName) = $cvsroot . '/' . $where;
my (@files, @filetags);
# added new array to store files initially
my (@allfiles);
my $fh = do { local (*FH); };
push (@allfiles, &safeglob($DirName . '*,v'));
push (@allfiles, &safeglob($DirName . 'Attic/*,v'))
if (!$input{'hideattic'});
foreach my $file (@otherFiles) {
push (@allfiles, $DirName . $file);
}
# just execute rlog with the files we have read access to
# (i'm sure there's an easier way than actually having to
# open the file, but I can't think of it at the moment *l*)
foreach my $file (@allfiles) {
if (-r $file) {
push (@files, $file);
}
}
# just execute rlog if there are any files
if ($#files < 0) {
return;
}
# this will now also ensure that rlog is not called on any
# files it really shouldn't be
# after this point, code remains the same
...
This will now simply not display any files you do not have
read-permissions on. Adding an according error-message later on might be
a good option.
Cheers,
Bernd
--
Disclaimer: http://apac.redhat.com/disclaimer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ECAC291.3000801>
