OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
mount_msdos: case sensitivity and other anomalies

From: -f (fobiit.org)
Date: Tue Dec 07 2004 - 17:26:08 CST


hi there,

this mail started as a question about how to pass esoteric
parameters to mount thru mount_msdos thru fstab.

as i wrote the mail and was making the homework,
i just basically worked myself to the solution.
of course, its not rocket science using the brilliant
documentation....

...still, this is an attitude to problem solving i perfected
here on this mailing list (not really learned, i always tried
going that way, maybe one of the reasons i started using openbsd)

again, a nice proof of how unix changes the way of life, the zen...

amaaq> cat /etc/fstab | grep msdos
/dev/wd0j /obiit msdos rw,-l,-x,-m666 0 0

amaaq> mount | grep msdos
/dev/wd0j on /obiit type msdos (local, uid=1000, gid=0, mask=0666, long, direxec)

but not all my problems are solved though....
all the filenames on the msdos mount which are shorter than
13chars are always uppercase, even when in windows i explicitly
rename them to lowercase. windows honors this case, so this makes
me believe, that these filenames are stored case sensitively in the
directory entry structure...

but the kernel shows all the short names in uppercase....

but then again, when i create a directory with a lowercase
name in openbsd, it stays that way...

amaaq> mkdir sum
amaaq> ls
sum/

but, if i try to change a filename from uppercase to lowercase:

amaaq> mv TODO todo
amaaq> ls
TODO

no change whatsoever. but if i use an aux name, say:

amaaq> mv TODO T
amaaq> mv T todo; ls
todo

but here is the real killer:
when i try to rename an uppercase directory to lowercase,
there is something seriously wrong:

amaaq> mv DOC x; ls
x/
amaaq> mv x doc
mv: rename x to doc/x: Invalid argument
amaaq> ls
x/
amaaq> ls doc
<files under doc>

'doc' shouldn't exist anymore! but it still does.
after remounting the partition, doc is not accessible
anymore.

what is going on?
--
even if you win the rat race, you're still a rat.