|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0672 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 0672.
Report 0672 Actions
Problem Report Number 0672 Submitter's Classification Specification problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0065 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1999-05-10 08:00 Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 5.0.2 Test Identification POSIX.cmd/mkfifo 19,30 Specification Commands and Utilities Issue 4 Version 2 Location in Spec See Problem Text Problem Summary PIN4C.00049 This test may fail on implementations since the -m mode interaction with umask has been ruled unclear. Problem Text
Mkfifo's interaction with the current umask setting is undefined,
therefore, we request a temporary interpretation allowing historical
practice.
mkfifo assertion #19(a):
umask 27
mkdir -m +rw tetmkfifo0191.tmp
VSC5.0.2 expects: r--rw-rw-
Using the following formula we obtain the VSC4.1.6 result:
(rw-rw-rw- & ~(----w-rwx)) | (rw-rw-rw- & ~(----w-rwx)) =
(rw-r-----) | (rw-r-----) = rw-r-----
The umask is applied to the initial permissions as well as
to the -m option-argument.
mkfifo assertion #19(b):
umask 27
mkfifo -m +x tetmkfifo0192.tmp
The VSC5.0.2 formula and results:
rw-rw-rw- | (--x--x--x & ~(----w-rwx)) =
rw-rw-rw- | (--x--x---) = rwxrwxrw-
Using the following formula we obtain the VSC4.1.6 result:
(rw-rw-rw & ~(----w-rwx)) | (--x--x--x) & ~(----w-rwx)) =
(rw-r-----) | (--x--x---) = rwxr-x---
The umask is applied to the initial permissions as well as
to the -m option-argument.
mkfifo assertion #30:
umask u=rwx,g=rx,o=x
mkfifo -m -w tetmkfifo0301.tmp
The VSC5.0.2 formula and result:
rw-rw-rw- & ~(-w--w--w- & ~(----w-rw-)) =
rw-rw-rw- & ~(-w-------) = r--rw-rw-
Using the following formula we obtain the VSC4.1.6 result:
(rw-rw-rw- & ~(----w-rw-)) & ~(-w--w--w- & ~(----w-rw-)) =
(rw-r-----) & ~(-w-------) = r--r-----
The umask is applied to the initial permissions as well as
to the -m option-argument.
Note: Note: the VSC5.0.2 testsuite was the first suite we ran after
VSC4.1.6 testing. Therefore, we do not know in which testsuite the
above described change first occurred.
Test Output
***********************************************************************
/tset/POSIX.cmd/mkfifo/mkfifo.ex 1 Failed
Test Information:
Assertion #19 (A): Check -m mode in general with nonzero um
<LC> ask
Command failed: 'expr "Xprw-r-----" : 'Xpr-[A-Z-]rw[A-Z-]r
<LC> w[A-Z-]' >/dev/null 2>&1'
Command failed: 'expr "Xprwxr-x---" : 'Xprw[a-z]rw[a-z]rw[
<LC> A-Z-]' >/dev/null 2>&1'
***********************************************************************
***********************************************************************
/tset/POSIX.cmd/mkfifo/mkfifo.ex 1 Failed
Test Information:
Assertion #30 (A): When a single mode clause has op '-' and
<LC> only param are specified
Command failed: 'expr "Xpr--r-----" : 'Xpr-[A-Z-]rw[A-Z-]r
<LC> w[A-Z-]' >/dev/null 2>&1'
***********************************************************************
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
A permanent interpretation is recommended.
The pasc-1003.2-67 interpretation request states
Should mkdir -m mode utilize the current umask in setting permissions?
I would propose that it does not.
The test assertion in 2003.2 Draft 9 say it should based on the
DESCRIPTION for mkdir which says it "shall perform actions equivalent
to the POSIX.1 mkdir()"
However, existing practise in System V (on which the rationale
says this option was added) is to set the permission to the explict
value specified by the mode argument to -m; and the text in lines
6950-6956 state that "The mode option-argument shall be the same as
the mode operand defined for the chmod utility". The chmod utility
ignores the umask.
So for an example, say
$ umask 22
$ mkdir -m 456 foodir
$ ls -ld
gives (on System V)
dr--r-xrw- 2 andrew relx 512 Jul 1 04:29 foodir
whereas the 2003.2 draft wants
dr--r-xr-- 2 andrew relx 512 Jul 1 04:29 foodir
The System V behaviour seems more inituitive as a user, and usage has
been to, in a single command set the mode explicitly with the -m option,
rather than call umask followed by mkdir -m xxx.
My understanding of the rationale text lines 7184-7187 "For example,
by default, the mode of the directory is affected by the file mode
creation mask" is that this does not apply to the -m case, which
is not the default.
The official repsonse is
The standard is unclear on this issue, and no conformance distinction can
be made between alternative implementations based on this. This is being
referred to the sponsor.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Permanent Interpretation (PIN) Review Conclusion
A Permanent Interpretation is granted.
Problem Reporting System Options:
- View Report 0672
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority