From owner-freebsd-cvsweb@FreeBSD.ORG Tue May 20 16:56:29 2003 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3A2937B401; Tue, 20 May 2003 16:56:29 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id A47A343F85; Tue, 20 May 2003 16:56:28 -0700 (PDT) (envelope-from bgroh@redhat.com) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4KNuSH21556; Tue, 20 May 2003 19:56:28 -0400 Received: from hypatia.brisbane.redhat.com (IDENT:root@hypatia.brisbane.redhat.com [172.16.5.3])h4KNuPI15424; Tue, 20 May 2003 19:56:26 -0400 Received: from redhat.com (bernd.brisbane.redhat.com [172.16.5.91]) h4KNuNj02906; Wed, 21 May 2003 09:56:23 +1000 Message-ID: <3ECAC291.3000801@redhat.com> Date: Wed, 21 May 2003 10:04:33 +1000 From: Bernd Groh User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20030225 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: Bernd Groh References: <3ECAA87C.7090406@softtek.com> <1053469908.22989.53.camel@bobcat.ods.org> <3ECAB9B5.6060005@redhat.com> In-Reply-To: <3ECAB9B5.6060005@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-cvsweb@freebsd.org Subject: Re: Error: Failed to spawn GNU rlog X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2003 23:56:30 -0000 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