Bug 59499 - [patch] textproc/xerces-c2: openFile function opens files for reading and writing instead of reading only
Summary: [patch] textproc/xerces-c2: openFile function opens files for reading and wri...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-20 09:00 UTC by Konstantin Oznobihin
Modified: 2004-01-02 20:12 UTC (History)
0 users

See Also:


Attachments
patch (794 bytes, patch)
2003-11-20 09:00 UTC, Konstantin Oznobihin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Oznobihin 2003-11-20 09:00:33 UTC
	The XMLPlatformUtils::openFile function opens files with fopen and
	passes it "r+" string as mode argument. This makes(according to
	fopen(3)) it try to open file for reading and writing while it
	should be opened for reading only. As a result you can't
	work with files not owned by you which is rather common case
	for dtd files.

Fix: Just change mode from "r+" to "r", here is the patch:
How-To-Repeat: 	Try "SAX2Pint somefile.xml" where somefile.xml belongs to
	other user and has access rights rw-r--r--.
Comment 1 Mark Linimon 2003-11-20 11:36:54 UTC
I'm sorry, I'm finding it a little bit difficult to figure out which port this
PR applies to.
Comment 2 Konstantin Oznobihin 2003-11-21 14:55:34 UTC
I'm sorry, it is textproc/xerces-c2. It seems that I hastened :-)

-- 
Konstantin Oznobihin <bork@rsu.ru>
Systems programmer and administrator
Computer Center of Rostov State University.
Comment 3 Konstantin Oznobihin 2003-11-21 14:57:47 UTC
I'm sorry, it is textproc/xerces-c2. It seems that I hastened :-)

-- 
Konstantin Oznobihin <bork@rsu.ru>
Systems programmer and administrator
Computer Center of Rostov State University.
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2004-01-02 18:43:35 UTC
Dear maintainer of port textproc/xerces-c2, please take a look at change
proposed at:

http://www.freebsd.org/cgi/query-pr.cgi?pr=59499

Do you approve or reject this change?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

What do you mean? An African or a European swallow?
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-01-02 18:43:39 UTC
State Changed
From-To: open->feedback

Asked maintainer about it.
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2004-01-02 18:43:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Watch.
Comment 7 Bjoern A. Zeeb 2004-01-02 19:13:18 UTC
On Fri, 2 Jan 2004, Pav Lucistnik wrote:

> Dear maintainer of port textproc/xerces-c2, please take a look at change
> proposed at:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=59499
>
> Do you approve or reject this change?

looks good; is already fixed in apache cvs and 2.4 but I hadn't had the
time to update the port due to kernel hacking.

please commit.

-- 
Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
56 69 73 69 74				http://www.zabbadoz.net/
Comment 8 Pav Lucistnik freebsd_committer freebsd_triage 2004-01-02 20:12:42 UTC
State Changed
From-To: feedback->closed

Committed, thanks!