|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0772 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 0772.
Report 0772 Actions
Problem Report Number 0772 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0287 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1999-01-28 08:00 Product Standard Commands and Utilities V3 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSC version 5.0.2 Test Identification XOPEN.cmd/ipcrm 1021 Problem Summary TSD4C.00224 This test may fail on implementations because ! is not executable when called using execvp(). Problem Text
In PG4C.00121 the consultants responded:
The ! character is a reserved word (Commands and Utilities,
Section 2.9.2 Pipelines) and is valid shell syntax:
If the reserved word "!" does not precede the pipeline, the
exit status will be the exit status of the last command
specified in the pipeline. Otherwise, the exit status will be
the logical NOT of the exit status of the last command. That
is, if the last commnd returns zero, the exit status will be
1; if the last command returns greater than zero, the exit
status will be zero.
While this is true, this doesn't apply to the problem. ExecWithPriv uses
execvp(). The above will apply when the command interpreter gets
control. Page 191 of the XPG5 XSH states the following:
int execvp(const char *file, char *const argv[]);
"the argument file is used to construct a pathname that identifies the
new process image file. ..."
and further states:
"If the process image file is not a valid executable object, execlp() and
execvp() use the contents of that file as standard input to a command
interpreter conforming to system(). ...."
The call to ExecWithPriv looks like the following:
ExecWithPriv ALLPRIV ! ipcs -q | grep $msg_key >/dev/null
And the execvp() call in ExecWithPriv looks like:
execvp(argv[0], argv);
argv[0] is set to "!". "!" is not a file and thus cannot be found. Much less
opened to discover whether it is an an executable binary or shell script,
Therefore the new process image file is not found and execvp() fails with
an file not found error.
Changing the ExecWithPriv call to the following appears to fix the problem:
ExecWithPriv ALLPRIV ksh -c "! ipcs -q | grep $msg_key >/dev/null"
The tests for shared memory and semaphores will need to be accordingly also.Test Output
***********************************************************************
/tset/XOPEN.cmd/ipcrm/ipcrm.ex 1 Failed
Test Information:
Assertion #1021 (A): Non-privileged non-owner user not allo
<LC> wed to remove ipc
PREP: message queue case
SETUP: create privilaged message queue
SETUP: message queue exists
TEST: ipcrm -Q 0xa000000
VERIFY: message queue is still there
CLEANUP: remove message queue
CLEANUP: message queue is gone
Command failed: '! ipcs -q | grep 0xa000000 >/dev/null'
PREP: shared memory case
SETUP: create privilaged shared memory
SETUP: shared memory exists
TEST: ipcrm -M 0xa000000
VERIFY: shared memory is still there
CLEANUP: remove shared memory
CLEANUP: shared memory is gone
Command failed: '! ipcs -m | grep 0xa000000 >/dev/null'
PREP: semaphore case
SETUP: create privilaged semaphore
SETUP: semaphore exists
TEST: ipcrm -S 0xa000000
VERIFY: semaphore is still there
CLEANUP: remove semaphore
CLEANUP: semaphore is gone
Command failed: '! ipcs -s | grep 0xa000000 >/dev/null'
***********************************************************************
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We agree this is a test suite deficiency in the test
suite version(s) listed.
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 0772
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority