|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0282 Details Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0282.
Report 0282 Actions
Problem Report Number 0282 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0282 Raised 2002-10-01 08:00 Updated 2003-03-13 08:00 Published 2002-10-08 08:00 Product Standard Network File System Certification Program The Open Brand certification program Test Suite VSX4+XNFS version 4.4.5 Test Identification XOPEN.os/streamio/tempnam 7 Linked Problem Reports PIN4.060, (in, old, system) Problem Summary TSD4.282 Standard reference: http://www.opengroup.org/onlinepubs/007904975/functions/tempnam.html " If dir is a null pointer or points to a string which is not a name for an appropriate directory, the path pre... Problem Text
Standard reference:
http://www.opengroup.org/onlinepubs/007904975/functions/tempnam.html
"
If dir is a null pointer or points to a string which is not a name
for an appropriate directory, the path prefix defined as P_tmpdir
in the <stdio.h> header shall be used. If that directory is not
accessible, an implementation-defined directory may be used.
"
From tmpdir.c, our implementation-defined fallback is "/tmp"
(P_tmpdir is "/var/tmp"). We do an access checks on P_tmpdir
and "/tmp" but not on the generated name. This appears to be
legal according to the above reference.
The test attempts to make the implementation-defined directory
unaccessible by getting tempnam to generate an implementation
defined name. It then mkdir's the full path it received, but
instead of doing a chmod(.., 0) on each path component, it only
uses (mode_t)0 on the last component; all other components are
mkdir'ed with MODE_ANY. This is all done in tempnam_su.c,
t7_cmd() and xnfs_create_dir().
Hence, the implementation-defined dir "/tmp" *is* accessible and
the test is wrong to think that it oughn't to be. Also the reference
above doesn't say we have to check accessibility of "/tmp" (even
though we do anyway).Test Output
200|82 7 19:04:50|TP Start
520|82 7 00066392 3 1|tempnam(dir, NULL) did not return NULL when dir,
P_tmpdir, and the implementation defined directory (/tmp/AAAa00G9I) were not
accessible
520|82 7 00066392 3 2|instead returned /tmp/BAAa00G9I
520|82 7 00066392 3 3|tempnam(dir, NULL) did not return NULL when dir,
P_tmpdir, and the implementation defined directory (/tmp/AAAa00G9I) were not
accessible
520|82 7 00066392 3 4|instead returned /tmp/CAAa00G9I
220|82 7 1 19:04:50|FAIL
410|82 7 1 19:04:50|IC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a fault in the test suite.
The code is treating the entire return value from the first
tempnam() call as the implementation-defined directory. It should
strip off the last component before making it inaccessible, as
is done in the non-XNFS version of the test.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 0282
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority