X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: Existence check fails on Cygwin Perl Date: Tue, 17 Aug 2010 17:44:54 +0200 Message-ID: <010016E11294264BB30D58894AB4040D02B20353@de010369.de.ina.com> From: "Lemke, Michael SZ/HZA-ZSB2" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, 17 Aug 2010 16:19:40 +0200, Corinna Vinschen wrote: >On Aug 17 14:58, Lemke, Michael SZ/HZA-ZSB2 wrote: >> Now that 1.7.6 has appeared at my favorite mirror I repeated the test: >>=20 >> pc> uname -a >> CYGWIN_NT-5.1 p01080268 1.7.6(0.230/5/3) 2010-08-16 16:06 i686 Cygwin >> pc> ls -ls //junk/file >> ls: cannot access //junk/file: No such file or directory >>=20 >> Great, it's fixed. >>=20 >> But wait: >>=20 >> pc> ls -ls //server/junk >> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec 1 2006 //server/junk >>=20 >> I was wrong above, here is a server called 'server'. But it doesn't have >> a file 'junk'. >>=20=20 >> Doing the equivalent from a DOS box: >>=20 >> U:\>dir \\server\junk >> Logon failure: unknown user name or bad password. > >Works for me if the server called "server" exists, but has no >share named "junk". > > bash$ ls -ls //server/junk > ls: cannot access //server/cygwinx: No such file or directory > >The noticable difference is that the access returns another error >on the Win32/native NT level: > > C:\>dir \\server\junk > The network name cannot be found. > >So there's YA error possible when accessing a non-existant share. >Great! To fix this for Cygwin 1.7.7, I need an strace from you: > > bash$ strace -o share-logon-failure.trace ls //server/junk > >Just send the share-logon-failure.trace file as attachment. Can I send this as PM to you instead? This is via a regular domain login BTW, no ssh or anything. I guess, the interesting part is this: 30 14511 [main] ls 3504 normalize_posix_path: src //server/junk 27 14538 [main] ls 3504 normalize_posix_path: //server/junk =3D normalize_posix_path (//server/junk) 27 14565 [main] ls 3504 mount_info::conv_to_win32_path: conv_to_win32_path (//server/junk) 26 14591 [main] ls 3504 set_flags: flags: text (0x2000000) 25 14616 [main] ls 3504 mount_info::conv_to_win32_path: src_path //server/junk, dst \\server\junk, flags 0x2004020, rc 0 536559 551175 [main] ls 3504 symlink_info::check: 0xC000006D =3D NtCreateFile (1:\??\UNC\server\junk) 72 551247 [main] ls 3504 symlink_info::check: 0xC000006D =3D NtQueryInformationFile (\??\UNC\server\junk) 54 551301 [main] ls 3504 symlink_info::check: 0xC0000033 =3D NtOpenFile(\??\UNC\server\) 27 551328 [main] ls 3504 symlink_info::check: not a symlink 25 551353 [main] ls 3504 symlink_info::check: 0 =3D symlink.check (\\server\junk, 0x22B760) (0x2404020) 169010 720363 [main] ls 3504 fs_info::update: Cannot get volume attributes (\??\UNC), C0000010 91 720454 [main] ls 3504 build_fh_pc: fh 0x6123B13C 31 720485 [main] ls 3504 stat_worker: (\??\UNC\server\junk, 0x6BA1C0, 0x6123B13C), file_attributes 0 36 720521 [main] ls 3504 fhandler_base::open: (\??\UNC\server\junk, 0x110000) 170319 890840 [main] ls 3504 seterrno_from_nt_status: /ext/build/netrel/src/cygwin-1.7.6-1/winsup/cygwin/fhandler.cc:590 status 0xC000006D -> windows error 1326 61 890901 [main] ls 3504 geterrno_from_win_error: unknown windows error 1326, setting errno to 13 28 890929 [main] ls 3504 fhandler_base::open: C000006D =3D NtCreateFile (0x0, 80100000, \??\UNC\server\junk, io, NULL, 0, 7, 1, 4020, NULL, 0) 28 890957 [main] ls 3504 fhandler_base::open: 0 =3D fhandler_base::open (\??\UNC\server\junk, 0x110000) 28 890985 [main] ls 3504 fhandler_base::open_fs: 0 =3D fhandler_disk_file::open (\??\UNC\server\junk, 0x10000) 31 891016 [main] ls 3504 fhandler_base::open: (\??\UNC\server\junk, 0x110000) 169508 1060524 [main] ls 3504 seterrno_from_nt_status: /ext/build/netrel/src/cygwin-1.7.6-1/winsup/cygwin/fhandler.cc:590 status 0xC000006D -> windows error 1326 49 1060573 [main] ls 3504 geterrno_from_win_error: unknown windows error 1326, setting errno to 13 33 1060606 [main] ls 3504 fhandler_base::open: C000006D =3D NtCreateFile (0x0, 20080, \??\UNC\server\junk, io, NULL, 0, 7, 1, 4000, NULL, 0) 27 1060633 [main] ls 3504 fhandler_base::open: 0 =3D fhandler_base::open (\??\UNC\server\junk, 0x110000) 24 1060657 [main] ls 3504 fhandler_base::open_fs: 0 =3D fhandler_disk_file::open (\??\UNC\server\junk, 0x10000) 54 1060711 [main] ls 3504 fhandler_base::fstat_by_name: 0xC0000033 =3D NtOpenFile(\??\UNC\server\junk) 49 1060760 [main] ls 3504 fhandler_base::fstat_helper: 0xC000003B =3D NtOpenFile(\??\UNC\server\junk) 27 1060787 [main] ls 3504 fhandler_base::fstat_helper: 0 =3D fstat (\??\UNC\server\junk, 0x6BA1C0) st_atime=3D456F7080 st_size=3D0, st_mode=3D0x81A4, st_ino=3D6244810932582208719, sizeof=3D96 36 1060823 [main] ls 3504 stat_worker: 0 =3D (\??\UNC\server\junk, 0x6BA1C0) Michael -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple