You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/12/19 18:55:17 UTC
DO NOT REPLY [Bug 25660] New: -
Platform Utils create files with unspecified permissions on Solaris
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25660>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25660
Platform Utils create files with unspecified permissions on Solaris
Summary: Platform Utils create files with unspecified permissions
on Solaris
Product: Xerces-C++
Version: 2.4.0
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Major
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: kschultz@rsinc.com
When using the DOMWriter to serialize a document out to a new file, the file
is created with bogus permissions. In my case, it was 0060 (octal), with the
locking bit set. The expected behavior is something closer to 0666, before
umask application.
The problem can be traced to the two openFileToWrite methods in
util/Platforms/Solaris/SolarisPlatformUtils.cpp. The open() function is used
to create the files, and a third parm is required when O_CREAT is specified in
the second parm. Since the third parm is not specified, the file is created
with an indeterminate set of permission bits.
One fix is to add a third parm, 0666 (octal), to both calls to open().
Another approach is to use fopen() instead of open(). All of the other
platforms seem to use fopen(), so I'm not sure why open() is used on Solaris.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org