delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/14/16:42:11

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <478BD708.9020909@gmail.com>
Date: Mon, 14 Jan 2008 16:41:28 -0500
From: Nicholas Wourms <nwourms AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008011403 Lightning/0.6a1 Thunderbird/3.0a1pre Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: [1.7.0 HEAD]: Cygwin no longer encoding/decoding names on managed mounts
X-Proofpoint-Virus-Version: vendor=fsecure engine=4.65.5502:2.3.11,1.2.37,4.0.164 definitions=2008-01-14_06:2008-01-13,2008-01-14,2008-01-14 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0708230000 definitions=main-0801140147
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019