Your message dated Tue, 17 Nov 2015 02:00:22 +0100
with message-id <[email protected]>
and subject line Re: Bug #668133: dash: incorrect behaviour for builtin test -w
operator on readonly mounts
has caused the Debian Bug report #668133,
regarding dash:incorrect behaviour for builtin test -w operator on readonly
mounts
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
668133: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668133
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.5.1-7.4
Severity: normal
While DASH properly reports that a *file* on a READONLY mount is not
writeable through its builtin 'test' function, it does not properly
detect that a *directory* is not writeable.
(filesystem type is not important, as this is true on NFS and EXT4
at least, and suspect it's fstype agnostic)
### filesystem is currently read-write
BASH:~# awk '$2=="/d2"{print $0}' /proc/mounts
/dev/sdd2 /d2 ext4
rw,nosuid,nodev,relatime,errors=remount-ro,barrier=1,journal_checksum,nodelalloc,data=journal
0 0
### remount filesystem read-only
BASH:~# mount -o remount,ro /d2
### See that 'bash' performs as expected...
### confirm filesystem is now read-only
BASH:~# awk '$2=="/d2"{print $0}' /proc/mounts
/dev/sdd2 /d2 ext4
ro,nosuid,nodev,relatime,errors=remount-ro,barrier=1,journal_checksum,nodelalloc,data=journal
0 0
### attempt to touch a file to confirm
BASH:~# touch /d2/foompy
touch: cannot touch `/d2/foompy': Read-only file system
### use our builtin command 'test' (as [) to confirm
### expected behaviour that files and directories are
### not writeable
BASH:~# [ ! -w /d2/foompy ] && echo "Not Writeable"
Not Writeable
BASH:~# [ ! -w /d2 ] && echo "Not Writeable"
Not Writeable
### invoke 'dash' to see the bug
BASH:~# /bin/dash
### use our builtin command 'test' (as [) to confirm
### that files are not writeable as expected
DASH# [ ! -w /d2/foompy ] && echo "Not Writeable"
Not Writeable
### use out builtin command 'test' (as [) to confirm
### that directories are not writeable as expected,
### however, we do NOT get the expected response.
DASH# [ ! -w /d2 ] && echo "Not Writeable"
# [ -w /d2 ] && echo "Writeable"
Writeable
### Not even if the directory is fully declared:
# [ ! -w /d2/. ] && echo "Not Writeable"
#
Unless i'm wrong, the POSIX spec shows nothing for 'test'
that would indicate that behaviour should be different
for file versus directory.
-- System Information:
Debian Release: 6.0.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages dash depends on:
ii debianutils 3.4 Miscellaneous utilities specific t
ii dpkg 1.15.8.12 Debian package management system
ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
dash recommends no packages.
dash suggests no packages.
-- debconf information:
* dash/sh: true
--- End Message ---
--- Begin Message ---
Version: 0.5.7-1
This bug has been fixed upstream, it is not reproducible with version
0.5.7 of dash (included in the Debian package 0.5.7-1 and in the current
package 0.5.7-4).
Cheers,
--
Gioele Barabucci <[email protected]>
--- End Message ---