public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Existence check fails on Cygwin Perl
@ 2010-08-17  8:55 Lemke, Michael  SZ/HZA-ZSB2
  2010-08-17  9:06 ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Lemke, Michael  SZ/HZA-ZSB2 @ 2010-08-17  8:55 UTC (permalink / raw)
  To: cygwin

On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
>On Aug 16 18:13, Andrew DeFaria wrote:
>>  This is strange. I usually tend to use Cygwin's Perl as it is more
>> full featured and works well but there are times when I am forced to
>> use "cqperl" - a Perl that comes with Rational Clearquest - at my
>> clients. Here it seems that Cygwin's Perl utterly fails the test
>> where as cqperl - a derivative of ActiveuuState - works.
>> 
>> This is using the existence check (-e) for a file. The file happens
>> to be on a share thus we are using UNC notation. It doesn't even
>> matter if "server" is a real server or not, nor whether the share
>> and path exist. Use anything you like. In fact use "server" and
>> "path" and "file". Either way Cygwin's Perl reports that the file
>> exists even when it doesn't, or the path is wrong or even if the
>> server does not exist!
>> 
>> $ cat test.pl'
>> use warnings;
>> use strict;
>> 
>> # Obviously non-existant server and file
>> my $file = "\\\\server\\path\\file";
>> 
>> # Check for existance returns true for Cygwin - false for ActiveState
>> if (-e $file) {
>>   print "true\n"
>> } else {
>>   print "false\n"
>> }
>> $ perl test.pl
>> true
>> $ cqperl test.pl
>> false
>> $
>
>I can not reproduce your problem.  I used "\\\\server\\path\\file"
>unchanged, as well as valid server and share names and just a
>non-existant file name.  In both cases the script prints "false".
>And it prints "true" for an existing file, just as expected.

Hm, I can reproduce it and it's even simpler, no perl involved:

pc> [ -e //server/junk ] && date
Tue Aug 17 10:28:14 WEDT 2010
pc> ls -ls //server/junk
0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk

Here's no server called server.

pc> uname -a
CYGWIN_NT-5.1 p01080268 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
pc> mount
C:/MyStuff/1.7cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/MyStuff/1.7cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/MyStuff/cygwin/home on /home type ntfs (text)
C:/MyStuff/1.7cygwin on / type ntfs (binary,auto)
U: on /u type ntfs (text)
C: on /c type ntfs (text,posix=0,user,noumount,auto)
I: on /i type vfat (text,posix=0,user,noumount,auto)
J: on /j type ntfs (text,posix=0,user,noumount,auto)
K: on /k type unknown (text,posix=0,user,noumount,auto)
Q: on /q type ntfs (text,posix=0,user,noumount,auto)
S: on /s type ntfs (text,posix=0,user,noumount,auto)
V: on /v type ntfs (text,posix=0,user,noumount,auto) 

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17  8:55 Existence check fails on Cygwin Perl Lemke, Michael  SZ/HZA-ZSB2
@ 2010-08-17  9:06 ` Corinna Vinschen
  2010-08-17  9:48   ` Andy Koppe
  2010-08-17 15:05   ` Andrew DeFaria
  0 siblings, 2 replies; 13+ messages in thread
From: Corinna Vinschen @ 2010-08-17  9:06 UTC (permalink / raw)
  To: cygwin

On Aug 17 10:54, Lemke, Michael  SZ/HZA-ZSB2 wrote:
> On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
> >On Aug 16 18:13, Andrew DeFaria wrote:
> >> $ cat test.pl'
> >> use warnings;
> >> use strict;
> >> 
> >> # Obviously non-existant server and file
> >> my $file = "\\\\server\\path\\file";
> >> 
> >> # Check for existance returns true for Cygwin - false for ActiveState
> >> if (-e $file) {
> >>   print "true\n"
> >> } else {
> >>   print "false\n"
> >> }
> >> $ perl test.pl
> >> true
> >> $ cqperl test.pl
> >> false
> >> $
> >
> >I can not reproduce your problem.  I used "\\\\server\\path\\file"
> >unchanged, as well as valid server and share names and just a
> >non-existant file name.  In both cases the script prints "false".
> >And it prints "true" for an existing file, just as expected.
> 
> Hm, I can reproduce it and it's even simpler, no perl involved:
> 
> pc> [ -e //server/junk ] && date
> Tue Aug 17 10:28:14 WEDT 2010
> pc> ls -ls //server/junk
> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
> 
> Here's no server called server.

I can't reproduce, but I'm already running Cygwin 1.7.6.  I have a vague
memory that we already had a report along these lines and that I patched
this at one point...  I *think* that's what is successfully hidden
behind the "Fix erroneous handling of devices in path checking." message
in the announcement...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17  9:06 ` Corinna Vinschen
@ 2010-08-17  9:48   ` Andy Koppe
  2010-08-17 10:03     ` Corinna Vinschen
  2010-08-17 15:05   ` Andrew DeFaria
  1 sibling, 1 reply; 13+ messages in thread
From: Andy Koppe @ 2010-08-17  9:48 UTC (permalink / raw)
  To: cygwin

On 17 August 2010 10:06, Corinna Vinschen wrote:
> On Aug 17 10:54, Lemke, Michael  SZ/HZA-ZSB2 wrote:
>> On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
>> >On Aug 16 18:13, Andrew DeFaria wrote:
>> >> $ cat test.pl'
>> >> use warnings;
>> >> use strict;
>> >>
>> >> # Obviously non-existant server and file
>> >> my $file = "\\\\server\\path\\file";
>> >>
>> >> # Check for existance returns true for Cygwin - false for ActiveState
>> >> if (-e $file) {
>> >>   print "true\n"
>> >> } else {
>> >>   print "false\n"
>> >> }
>> >> $ perl test.pl
>> >> true
>> >> $ cqperl test.pl
>> >> false
>> >> $
>> >
>> >I can not reproduce your problem.  I used "\\\\server\\path\\file"
>> >unchanged, as well as valid server and share names and just a
>> >non-existant file name.  In both cases the script prints "false".
>> >And it prints "true" for an existing file, just as expected.
>>
>> Hm, I can reproduce it and it's even simpler, no perl involved:
>>
>> pc> [ -e //server/junk ] && date
>> Tue Aug 17 10:28:14 WEDT 2010
>> pc> ls -ls //server/junk
>> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
>>
>> Here's no server called server.
>
> I can't reproduce, but I'm already running Cygwin 1.7.6.  I have a vague
> memory that we already had a report along these lines and that I patched
> this at one point...  I *think* that's what is successfully hidden
> behind the "Fix erroneous handling of devices in path checking." message
> in the announcement...

http://www.cygwin.com/ml/cygwin/2010-06/msg00049.html

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17  9:48   ` Andy Koppe
@ 2010-08-17 10:03     ` Corinna Vinschen
  0 siblings, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2010-08-17 10:03 UTC (permalink / raw)
  To: cygwin

On Aug 17 10:47, Andy Koppe wrote:
> On 17 August 2010 10:06, Corinna Vinschen wrote:
> > On Aug 17 10:54, Lemke, Michael  SZ/HZA-ZSB2 wrote:
> >> On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
> >> >On Aug 16 18:13, Andrew DeFaria wrote:
> >> >> $ cat test.pl'
> >> >> use warnings;
> >> >> use strict;
> >> >>
> >> >> # Obviously non-existant server and file
> >> >> my $file = "\\\\server\\path\\file";
> >> >>
> >> >> # Check for existance returns true for Cygwin - false for ActiveState
> >> >> if (-e $file) {
> >> >>   print "true\n"
> >> >> } else {
> >> >>   print "false\n"
> >> >> }
> >> >> $ perl test.pl
> >> >> true
> >> >> $ cqperl test.pl
> >> >> false
> >> >> $
> >> >
> >> >I can not reproduce your problem.  I used "\\\\server\\path\\file"
> >> >unchanged, as well as valid server and share names and just a
> >> >non-existant file name.  In both cases the script prints "false".
> >> >And it prints "true" for an existing file, just as expected.
> >>
> >> Hm, I can reproduce it and it's even simpler, no perl involved:
> >>
> >> pc> [ -e //server/junk ] && date
> >> Tue Aug 17 10:28:14 WEDT 2010
> >> pc> ls -ls //server/junk
> >> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
> >>
> >> Here's no server called server.
> >
> > I can't reproduce, but I'm already running Cygwin 1.7.6.  I have a vague
> > memory that we already had a report along these lines and that I patched
> > this at one point...  I *think* that's what is successfully hidden
> > behind the "Fix erroneous handling of devices in path checking." message
> > in the announcement...
> 
> http://www.cygwin.com/ml/cygwin/2010-06/msg00049.html

Oh, right, thanks.  I have to refurbish my memory, I guess.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17  9:06 ` Corinna Vinschen
  2010-08-17  9:48   ` Andy Koppe
@ 2010-08-17 15:05   ` Andrew DeFaria
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew DeFaria @ 2010-08-17 15:05 UTC (permalink / raw)
  To: cygwin

  On 08/17/2010 02:06 AM, Corinna Vinschen wrote:
> I can't reproduce, but I'm already running Cygwin 1.7.6.  I have a vague
> memory that we already had a report along these lines and that I patched
> this at one point...  I *think* that's what is successfully hidden
> behind the "Fix erroneous handling of devices in path checking." message
> in the announcement...
>
>
> Corinna
>
Oh fudge! Great. You know corp America - always back a few versions! 
They'll never get up to the newest version of Cygwin before my contract 
runs out!

But thanks, I guess it's time for me to update Cygwin again... I knew it 
would come does to something in Cygwin's handling of such UNC paths.

-- 
Andrew DeFaria <http://defaria.com>
I was thinking that women should put pictures of missing husbands on 
beer cans.


--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
@ 2010-08-17 15:45 Lemke, Michael  SZ/HZA-ZSB2
  0 siblings, 0 replies; 13+ messages in thread
From: Lemke, Michael  SZ/HZA-ZSB2 @ 2010-08-17 15:45 UTC (permalink / raw)
  To: cygwin

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:
>> 
>> 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
>> 
>> Great, it's fixed.
>> 
>> But wait:
>> 
>> pc> ls -ls //server/junk
>> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
>> 
>> I was wrong above, here is a server called 'server'.  But it doesn't
have
>> a file 'junk'.
>>  
>> Doing the equivalent from a DOS box:
>> 
>> 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 =
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 =
NtCreateFile (1:\??\UNC\server\junk)
   72  551247 [main] ls 3504 symlink_info::check: 0xC000006D =
NtQueryInformationFile (\??\UNC\server\junk)
   54  551301 [main] ls 3504 symlink_info::check: 0xC0000033 =
NtOpenFile(\??\UNC\server\)
   27  551328 [main] ls 3504 symlink_info::check: not a symlink
   25  551353 [main] ls 3504 symlink_info::check: 0 = 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 =
NtCreateFile (0x0, 80100000, \??\UNC\server\junk, io, NULL, 0, 7, 1,
4020, NULL, 0)
   28  890957 [main] ls 3504 fhandler_base::open: 0 =
fhandler_base::open (\??\UNC\server\junk, 0x110000)
   28  890985 [main] ls 3504 fhandler_base::open_fs: 0 =
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 =
NtCreateFile (0x0, 20080, \??\UNC\server\junk, io, NULL, 0, 7, 1, 4000,
NULL, 0)
   27 1060633 [main] ls 3504 fhandler_base::open: 0 =
fhandler_base::open (\??\UNC\server\junk, 0x110000)
   24 1060657 [main] ls 3504 fhandler_base::open_fs: 0 =
fhandler_disk_file::open (\??\UNC\server\junk, 0x10000)
   54 1060711 [main] ls 3504 fhandler_base::fstat_by_name: 0xC0000033 =
NtOpenFile(\??\UNC\server\junk)
   49 1060760 [main] ls 3504 fhandler_base::fstat_helper: 0xC000003B =
NtOpenFile(\??\UNC\server\junk)
   27 1060787 [main] ls 3504 fhandler_base::fstat_helper: 0 = fstat
(\??\UNC\server\junk, 0x6BA1C0) st_atime=456F7080 st_size=0,
st_mode=0x81A4, st_ino=6244810932582208719, sizeof=96
   36 1060823 [main] ls 3504 stat_worker: 0 = (\??\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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17 14:19 ` Corinna Vinschen
@ 2010-08-17 14:26   ` Corinna Vinschen
  0 siblings, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2010-08-17 14:26 UTC (permalink / raw)
  To: cygwin

On Aug 17 16:19, Corinna Vinschen wrote:
> On Aug 17 14:58, Lemke, Michael  SZ/HZA-ZSB2 wrote:
> > But wait:
> > 
> > pc> ls -ls //server/junk
> > 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
> > 
> > I was wrong above, here is a server called 'server'.  But it doesn't have
> > a file 'junk'.
> >  
> > Doing the equivalent from a DOS box:
> > 
> > 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.

...and a follow-up question:

  Are you running your test from a ssh session, by any chance?
  If so, what kind of authentication are you using, in terms of
  the different methods explained in
  http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17 12:58 Lemke, Michael  SZ/HZA-ZSB2
@ 2010-08-17 14:19 ` Corinna Vinschen
  2010-08-17 14:26   ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2010-08-17 14:19 UTC (permalink / raw)
  To: cygwin

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:
> 
> 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
> 
> Great, it's fixed.
> 
> But wait:
> 
> pc> ls -ls //server/junk
> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk
> 
> I was wrong above, here is a server called 'server'.  But it doesn't have
> a file 'junk'.
>  
> Doing the equivalent from a DOS box:
> 
> 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.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
@ 2010-08-17 12:58 Lemke, Michael  SZ/HZA-ZSB2
  2010-08-17 14:19 ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Lemke, Michael  SZ/HZA-ZSB2 @ 2010-08-17 12:58 UTC (permalink / raw)
  To: cygwin

On Tue, 17 Aug 2010 12:03:19 +0200, Corinna Vinschen wrote:
>On Aug 17 10:47, Andy Koppe wrote:
>> On 17 August 2010 10:06, Corinna Vinschen wrote:
>> > On Aug 17 10:54, Lemke, Michael ÂSZ/HZA-ZSB2 wrote:
>> >> On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
>> >> >On Aug 16 18:13, Andrew DeFaria wrote:

[perl example removed.]

>> >>
>> >> Hm, I can reproduce it and it's even simpler, no perl involved:
>> >>
>> >> pc> [ -e //server/junk ] && date
>> >> Tue Aug 17 10:28:14 WEDT 2010
>> >> pc> ls -ls //server/junk
>> >> 0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec Â1 Â2006 //server/junk
>> >>
>> >> Here's no server called server.
>> >
>> > I can't reproduce, but I'm already running Cygwin 1.7.6. ÂI have a vague
>> > memory that we already had a report along these lines and that I patched
>> > this at one point... ÂI *think* that's what is successfully hidden
>> > behind the "Fix erroneous handling of devices in path checking." message
>> > in the announcement...
>> 
>> http://www.cygwin.com/ml/cygwin/2010-06/msg00049.html
>
>Oh, right, thanks.  I have to refurbish my memory, I guess.

Now that 1.7.6 has appeared at my favorite mirror I repeated the test:

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

Great, it's fixed.

But wait:

pc> ls -ls //server/junk
0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec  1  2006 //server/junk

I was wrong above, here is a server called 'server'.  But it doesn't have
a file 'junk'.
 
Doing the equivalent from a DOS box:

U:\>dir \\server\junk
Logon failure: unknown user name or bad password.


Michael

P.S. Sorry for breaking the thread, can't do any better at the moment.

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17 12:52   ` Nellis, Kenneth
@ 2010-08-17 12:58     ` Reini Urban
  0 siblings, 0 replies; 13+ messages in thread
From: Reini Urban @ 2010-08-17 12:58 UTC (permalink / raw)
  To: cygwin

2010/8/17 Nellis, Kenneth <Kenneth.Nellis@acs-inc.com>:
>> From: Corinna Vinschen
>> On Aug 16 18:13, Andrew DeFaria wrote:
>> >  This is strange. I usually tend to use Cygwin's Perl as it is more
>> > full featured and works well but there are times when I am forced to
>> > use "cqperl" - a Perl that comes with Rational Clearquest - at my
>> > clients. Here it seems that Cygwin's Perl utterly fails the test
>> > where as cqperl - a derivative of ActiveuuState - works.
>> >
>> > This is using the existence check (-e) for a file. The file happens
>> > to be on a share thus we are using UNC notation. It doesn't even
>> > matter if "server" is a real server or not, nor whether the share
>> > and path exist. Use anything you like. In fact use "server" and
>> > "path" and "file". Either way Cygwin's Perl reports that the file
>> > exists even when it doesn't, or the path is wrong or even if the
>> > server does not exist!
>> >
> <snip>
>>
>> I can not reproduce your problem.  I used "\\\\server\\path\\file"
>> unchanged, as well as valid server and share names and just a
>> non-existant file name.  In both cases the script prints "false".
>> And it prints "true" for an existing file, just as expected.
>>
>> BLODA?
>>
>>
>> Corinna
>
> FWIW, I was able to reproduce the OP's results, both with Cygwin's
> Perl 5.10.1 and cqperl v5.8.6. I hadn't had any BLODA issues to
> date.

Sure. You need a recent cygwin snapshot to get it fixed.
  http://www.cygwin.com/ml/cygwin/2010-06/msg00049.html
  http://cygwin.com/snapshots/

$ [ -e //server/junk ] && date
$ uname -a
CYGWIN_NT-6.1 ATGRZWN503050 1.7.6s(0.230/5/3) 20100816 13:53:13 i686 Cygwin
-- 
Reini Urban

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Existence check fails on Cygwin Perl
  2010-08-17  8:20 ` Corinna Vinschen
@ 2010-08-17 12:52   ` Nellis, Kenneth
  2010-08-17 12:58     ` Reini Urban
  0 siblings, 1 reply; 13+ messages in thread
From: Nellis, Kenneth @ 2010-08-17 12:52 UTC (permalink / raw)
  To: cygwin

> From: Corinna Vinschen
> On Aug 16 18:13, Andrew DeFaria wrote:
> >  This is strange. I usually tend to use Cygwin's Perl as it is more
> > full featured and works well but there are times when I am forced to
> > use "cqperl" - a Perl that comes with Rational Clearquest - at my
> > clients. Here it seems that Cygwin's Perl utterly fails the test
> > where as cqperl - a derivative of ActiveuuState - works.
> >
> > This is using the existence check (-e) for a file. The file happens
> > to be on a share thus we are using UNC notation. It doesn't even
> > matter if "server" is a real server or not, nor whether the share
> > and path exist. Use anything you like. In fact use "server" and
> > "path" and "file". Either way Cygwin's Perl reports that the file
> > exists even when it doesn't, or the path is wrong or even if the
> > server does not exist!
> >
<snip>
> 
> I can not reproduce your problem.  I used "\\\\server\\path\\file"
> unchanged, as well as valid server and share names and just a
> non-existant file name.  In both cases the script prints "false".
> And it prints "true" for an existing file, just as expected.
> 
> BLODA?
> 
> 
> Corinna

FWIW, I was able to reproduce the OP's results, both with Cygwin's
Perl 5.10.1 and cqperl v5.8.6. I hadn't had any BLODA issues to
date.

--Ken Nellis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Existence check fails on Cygwin Perl
  2010-08-17  1:14 Andrew DeFaria
@ 2010-08-17  8:20 ` Corinna Vinschen
  2010-08-17 12:52   ` Nellis, Kenneth
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2010-08-17  8:20 UTC (permalink / raw)
  To: cygwin

On Aug 16 18:13, Andrew DeFaria wrote:
>  This is strange. I usually tend to use Cygwin's Perl as it is more
> full featured and works well but there are times when I am forced to
> use "cqperl" - a Perl that comes with Rational Clearquest - at my
> clients. Here it seems that Cygwin's Perl utterly fails the test
> where as cqperl - a derivative of ActiveuuState - works.
> 
> This is using the existence check (-e) for a file. The file happens
> to be on a share thus we are using UNC notation. It doesn't even
> matter if "server" is a real server or not, nor whether the share
> and path exist. Use anything you like. In fact use "server" and
> "path" and "file". Either way Cygwin's Perl reports that the file
> exists even when it doesn't, or the path is wrong or even if the
> server does not exist!
> 
> $ cat test.pl'
> use warnings;
> use strict;
> 
> # Obviously non-existant server and file
> my $file = "\\\\server\\path\\file";
> 
> # Check for existance returns true for Cygwin - false for ActiveState
> if (-e $file) {
>   print "true\n"
> } else {
>   print "false\n"
> }
> $ perl test.pl
> true
> $ cqperl test.pl
> false
> $

I can not reproduce your problem.  I used "\\\\server\\path\\file"
unchanged, as well as valid server and share names and just a
non-existant file name.  In both cases the script prints "false".
And it prints "true" for an existing file, just as expected.

BLODA?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Existence check fails on Cygwin Perl
@ 2010-08-17  1:14 Andrew DeFaria
  2010-08-17  8:20 ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew DeFaria @ 2010-08-17  1:14 UTC (permalink / raw)
  To: cygwin

  This is strange. I usually tend to use Cygwin's Perl as it is more 
full featured and works well but there are times when I am forced to use 
"cqperl" - a Perl that comes with Rational Clearquest - at my clients. 
Here it seems that Cygwin's Perl utterly fails the test where as cqperl 
- a derivative of ActiveuuState - works.

This is using the existence check (-e) for a file. The file happens to 
be on a share thus we are using UNC notation. It doesn't even matter if 
"server" is a real server or not, nor whether the share and path exist. 
Use anything you like. In fact use "server" and "path" and "file". 
Either way Cygwin's Perl reports that the file exists even when it 
doesn't, or the path is wrong or even if the server does not exist!

$ cat test.pl'
use warnings;
use strict;

# Obviously non-existant server and file
my $file = "\\\\server\\path\\file";

# Check for existance returns true for Cygwin - false for ActiveState
if (-e $file) {
   print "true\n"
} else {
   print "false\n"
}
$ perl test.pl
true
$ cqperl test.pl
false
$



--
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-08-17 15:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17  8:55 Existence check fails on Cygwin Perl Lemke, Michael  SZ/HZA-ZSB2
2010-08-17  9:06 ` Corinna Vinschen
2010-08-17  9:48   ` Andy Koppe
2010-08-17 10:03     ` Corinna Vinschen
2010-08-17 15:05   ` Andrew DeFaria
  -- strict thread matches above, loose matches on Subject: below --
2010-08-17 15:45 Lemke, Michael  SZ/HZA-ZSB2
2010-08-17 12:58 Lemke, Michael  SZ/HZA-ZSB2
2010-08-17 14:19 ` Corinna Vinschen
2010-08-17 14:26   ` Corinna Vinschen
2010-08-17  1:14 Andrew DeFaria
2010-08-17  8:20 ` Corinna Vinschen
2010-08-17 12:52   ` Nellis, Kenneth
2010-08-17 12:58     ` Reini Urban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).