This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[1.7.0 HEAD]: Cygwin no longer encoding/decoding names on managed mounts


Hi All,

I'm not sure when this cropped up, but it happened sometime after the
great "win 9x" code purge. The problem is that the Cygwin dll no longer
decodes or encodes file/directory names on managed mounts.


Steps to reproduce (WinXP SP2 x32):
-----------------------------------
1) mkdir -p /usr/src2
2) mount -b -s -o managed C:\\cygwin\\usr\\src2 /usr/src2
3) cd /usr/src2
4) mkdir -p FOO
5) ls -1 /cygdrive/c/cygwin/usr/src2

1.5.25(0.156/4/2) results:
--------------------------
Expected: %46%4F%4F
Actual: %46%4F%4F

1.7.0(0.179/4/2) results:
-------------------------
Expected: %46%4F%4F
Actual: FOO


For this test, I setup a fresh, default Cygwin install on another
machine. The Cygwin dll which was used was from the 1.5.25-7 package. I
ran the test and everything worked as expected. However, on the machine
with the Cygwin dll compiled from cvs HEAD, it did not. Running strace
on the "mkdir -p FOO" operation seems to confirm that the munging gets
skipped somewhere in the normalize_posix_path function.


strace snippet from 1.5.25(0.156/4/2):
--------------------------------------
[main] mkdir dll_crt0_1: user_data->main 0x4012A0
[main] mkdir __set_errno: void dll_crt0_1(void*):946 val 0
[main] mkdir normalize_posix_path: src FOO
[main] mkdir cwdstuff::get: posix /usr/src2
[main] mkdir cwdstuff::get: (/usr/src2) = cwdstuff::get (0x22C740, 260,
1, 0), errno 0
[main] mkdir normalize_posix_path: /usr/src2/FOO = normalize_posix_path
(FOO)
[main] mkdir mount_info::conv_to_win32_path: conv_to_win32_path
(/usr/src2/FOO)
[main] mkdir set_flags: flags: binary (0x2)
[main] mkdir mount_info::conv_to_win32_path: src_path /usr/src2/FOO, dst
C:\Cygnus\cygwin\usr\src2\%46%4F%4F, flags 0x80A, rc 0
__________________________^^^^^^^^^
[main] mkdir symlink_info::check: GetFileAttributes
(C:\Cygnus\cygwin\usr\src2\%46%4F%4F) failed
[main] mkdir geterrno_from_win_error: windows error 2 == errno 2
[main] mkdir symlink_info::check: GetFileAttributes
(C:\Cygnus\cygwin\usr\src2\%46%4F%4F.lnk) failed
[main] mkdir geterrno_from_win_error: windows error 2 == errno 2
[main] mkdir symlink_info::check: 0 = symlink.check
(C:\Cygnus\cygwin\usr\src2\%46%4F%4F, 0x22C400) (0x80A)
[main] mkdir mount_info::conv_to_win32_path: conv_to_win32_path (/usr/src2)
[main] mkdir set_flags: flags: binary (0x2)
[main] mkdir mount_info::conv_to_win32_path: src_path /usr/src2, dst
C:\Cygnus\cygwin\usr\src2, flags 0x80A, rc 0
[main] mkdir symlink_info::check: not a symlink
[main] mkdir symlink_info::check: 0 = symlink.check
(C:\Cygnus\cygwin\usr\src2, 0x22C400) (0x80A)
[main] mkdir path_conv::check:
this->path(C:\Cygnus\cygwin\usr\src2\%46%4F%4F), has_acls(1)
[main] mkdir build_fh_pc: fh 0x61169E30
[main] mkdir alloc_sd: uid 1010, gid 544, attribute 41FF
[main] mkdir cygpsid::debug_print: alloc_sd: owner SID =
S-1-5-21-1454471165-492894223-1957994488-1010
[main] mkdir cygpsid::debug_print: alloc_sd: group SID = S-1-5-32-544
[main] mkdir alloc_sd: ACL-Size: 148
[main] mkdir alloc_sd: Created SD-Size: 212
[main] mkdir mkdir: 0 = mkdir (FOO, 511)


strace snippet from 1.7.0(0.179/4/2):
-------------------------------------
[main] mkdir dll_crt0_1: user_data->main 0x4012A0
[main] mkdir __set_errno: void dll_crt0_1(void*):931 val 0
[main] mkdir normalize_posix_path: src FOO
[main] mkdir cwdstuff::get: posix /usr/src2
[main] mkdir cwdstuff::get: (/usr/src2) = cwdstuff::get (0x22C750, 260,
1, 0), errno 0
[main] mkdir normalize_posix_path: /usr/src2/FOO = normalize_posix_path
(FOO)
[main] mkdir mount_info::conv_to_win32_path: conv_to_win32_path
(/usr/src2/FOO)
[main] mkdir set_flags: flags: binary (0x2)
[main] mkdir mount_info::conv_to_win32_path: src_path /usr/src2/FOO, dst
C:\Cygnus\cygwin\usr\src2\FOO, flags 0x80A, rc 0
__________________________^^^
[main] mkdir symlink_info::check: 0xC0000034 = NtQueryAttributesFile
(\??\C:\Cygnus\cygwin\usr\src2\FOO)
[main] mkdir geterrno_from_win_error: windows error 2 == errno 2
[main] mkdir symlink_info::check: 0xC0000034 = NtQueryAttributesFile
(\??\C:\Cygnus\cygwin\usr\src2\FOO.lnk)
[main] mkdir geterrno_from_win_error: windows error 2 == errno 2
[main] mkdir symlink_info::check: 0 = symlink.check
(C:\Cygnus\cygwin\usr\src2\FOO, 0x224520) (0x80A)
[main] mkdir mount_info::conv_to_win32_path: conv_to_win32_path (/usr/src2)
[main] mkdir set_flags: flags: binary (0x2)
[main] mkdir mount_info::conv_to_win32_path: src_path /usr/src2, dst
C:\Cygnus\cygwin\usr\src2, flags 0x80A, rc 0
[main] mkdir symlink_info::check: not a symlink
[main] mkdir symlink_info::check: 0 = symlink.check
(C:\Cygnus\cygwin\usr\src2, 0x224520) (0x80A)
[main] mkdir path_conv::check:
this->path(C:\Cygnus\cygwin\usr\src2\FOO), has_acls(1)
[main] mkdir build_fh_pc: fh 0x611E4C7C
[main] mkdir alloc_sd: uid 500, gid 545, attribute 41FF
[main] mkdir cygsid::debug_print: alloc_sd: owner SID =
S-1-5-21-1292428093-813497703-1801674531-500 (+)
[main] mkdir cygsid::debug_print: alloc_sd: group SID = S-1-5-32-545 (+)
[main] mkdir alloc_sd: ACL-Size: 148
[main] mkdir alloc_sd: Created SD-Size: 212
[main] mkdir mkdir: 0 = mkdir (FOO, 511)


Anyway, that's all I could come up with for now. Anyone else seeing
this? I'll see if I can't do more later on this week when I have more time.

Cheers,
Nicholas





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]