Re: Different user environment for key vs password authentication

2010-06-02 Thread Larry Hall (Cygwin)

On 6/2/2010 6:13 PM, Jaynna Sims wrote:


Hi,
We are having problems doing registry updates and installing software via ssh
using key authentication but it works using password authentication.   We
noticed that some of the environment variables have different values
depending on the authentication type, for example TMP, TEMP, USERNAME.  With
key authentication, these values are for the user that the sshd service is
running as.  With password authentication, these values are for the user that
is connecting as. Can someone explain in a bit of detail what happens at
login for key and password authentication?  It seems we need to get the same
environment loaded for password authentication to load for key authentication
so we are trying to figure out how to make this happen by understanding what
is actually happening. Turning on debug for our ssh server did not yield any
useful information.  And sorry but right now I don't have access to the
server so I'm hoping that someone can give insight into how the different
authentication load their respective environments without needing more
detail.  I can say that the privilege separation is turned on.




--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


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



Different user environment for key vs password authentication

2010-06-02 Thread Jaynna Sims

Hi,
We are having problems doing registry updates and installing software via ssh 
using key authentication but it works using password authentication.   We 
noticed that some of the environment variables have different values depending 
on the authentication type, for example TMP, TEMP, USERNAME.  With key 
authentication, these values are for the user that the sshd service is running 
as.  With password authentication, these values are for the user that is 
connecting as.
Can someone explain in a bit of detail what happens at login for key and 
password authentication?  It seems we need to get the same environment loaded 
for password authentication to load for key authentication so we are trying to 
figure out how to make this happen by understanding what is actually happening. 
 
Turning on debug for our ssh server did not yield any useful information.  And 
sorry but right now I don't have access to the server so I'm hoping that 
someone can give insight into how the different authentication load their 
respective environments without needing more detail.  I can say that the 
privilege separation is turned on.
Thanks,Jaynna Sims
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

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



[ANNOUNCEMENT] Updated: lapack 3.2.1-2

2010-06-02 Thread Marco Atzeri
New versions 3.2.1-2 of

lapack (source)
liblapack0
liblapack-devel

for cygwin-1.7 are available in the Cygwin distribution:

CHANGES
correct position of liblapack-devel files
/usr/lib/pkgconfig/blas.pc
/usr/lib/pkgconfig/lapack.pc


DESCRIPTION
Comprehensive FORTRAN library for linear algebra operations.
Includes matrix inversions, least squared solutions to
sets of equations, eigenvector analysis, singular value
decomposition, etc.

HOMEPAGE
http://www.netlib.org/lapack/

Regards
Marco Atzeri






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



1.7.5-1: cp: skipping file `xxx', as it was replaced while being copied (again)

2010-06-02 Thread Wayne Johnson
I know, this has been reported before.  I searched the archive and it 
was suggested that upgrading to 1.7.5 would fix the problem, but 
apparently not in my case.

I am running WindowsXPx64 and 
cygwin.dll 1.7.5-1.  I'm attempting to copy a file from a Tandem system 
(stop laughing) running Samba (stop laughing). and get the error:
  
cp: skipping file `//tiny.labs/wjohnson/build/TANDEM/bin/qpcfg', as it 
was replaced while being copied

I tried listing the inode number 
and it still seems to change between each try.  Something like:

D:\dev>ls -i //tiny.labs/wjohnson/build/TANDEM/bin/qpcfg
18446738026459551968 
//tiny.labs/wjohnson/build/TANDEM/bin/qpcfg

D:\dev>ls -i 
//tiny.labs/wjohnson/build/TANDEM/bin/qpcfg
18446738026451034128 //tiny.labs/wjohnson/build/TANDEM/bin/qpcfg
 
I have another (older) system running Cygwin on 32 bit windows and Cygwin 
1.5.25(0.156/4/2) and it 
seems to work fine.  I also tried this on a 32 bit VM running WindowsXP 
and 1.7.5-1, hosted on the same 64 bit system where it fails and it 
works there as well, but does not work on a similar VM with 64 bit XP 
and 1.7.5.  Looks like this is an issue with 1.7.x and 64 bit windows.

Any suggestions on what to try would be appreciated, 
otherwise I will have to go back to 1.5.25.

Thanks.

 --- 
Wayne Johnson, | There are two kinds of people: Those 
3943 Penn Ave. N.  | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908   | and those to whom God says, "All right, 
(612) 522-7003| then,  have it your way." --C.S. 
Lewis


  

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



Re: Whatever happened to cygwin's php?

2010-06-02 Thread Gary
Yaakov (Cygwin/X) wrote:
> On Wed, 2 Jun 2010 17:29:38 +0200, Gary wrote:
>> It looks like it might never have made it to "official" status, but I
>> found Max Bowsher's ITP via google @
>> http://www.cygwin.com/ml/cygwin-apps/2006-06/msg7.html
>> 
>> Has anything been done more recently?
>
> Cygwin Ports provides PHP packages.  If you have further questions
> about Ports packages, please be sure to use the cygwin-ports-general
> list.

Are you on an advertising campaign today? :-)

Thanks for the info.

-- 
Gary
Non-kook (allegedly)

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



Re: Cygwin Performance and stat()

2010-06-02 Thread Christopher Faylor
On Wed, Jun 02, 2010 at 10:46:03AM -0700, Christopher Wingert wrote:
>Thanks for the pointer, I just gave it a whirl, it actually didn't make
>much of a difference.
>
>I am going to start looking into making a patch.

Let me point out that the kind of slowdown that you are seeing is not
something that I would consider acceptable.  So what I'd like to see is
an analysis of *why* Cygwin is so slow rather than a band-aid which uses
an environment variable or different api to work around a real problem.

cgf

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



Re: Cygwin Performance and stat()

2010-06-02 Thread Christopher Wingert
Thanks for the pointer, I just gave it a whirl, it actually didn't make
much of a difference.

I am going to start looking into making a patch.

Chris



> On Jun  1 14:42, Christopher Wingert wrote:
>> I think there are a lot of use cases where the extra information (ACL
>> information *I assume* is the majority of the problem) is unnecessary.
>> For most of the applications filename, size, and the three dates are all
>> that is necessary.  So cygwin stat is overkill.  So if I can tell the
>> emulation layer (via an environment flag) or the actually utility
>> (bash/ls/make/find/du) via a command line switch, I think I can save a
>> lot
>> of time waiting.
>>
>> Just to highlight how bad this problem is.  I have a network drive with
>> 681 sub directories and approximately 90k files.  A time comparison for
>> getting directory information as follows:
>>
>> *DOS "dir /s" takes 17 seconds.
>> *Cygwin "ls -lR" takes 5950 seconds (that's almost two hours).
>> *msls -lR takes 55 seconds.
>> *myls (see code below) takes 7 seconds.
>>
>> Each test was done twice and after a reboot to make sure there was no
>> caching involved.
>>
>> To be clear, Cygwin ls is 850X slower.
>
> Did you try to mount the network drive with the "noacl" mount option?
> That skips requesting the owner/group information.
>
>
> 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
>
>



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



Re: Whatever happened to cygwin's php?

2010-06-02 Thread Cygwin/X
On Wed, 2 Jun 2010 17:29:38 +0200, Gary . wrote:
> It looks like it might never have made it to "official" status, but I
> found Max Bowsher's ITP via google @
> http://www.cygwin.com/ml/cygwin-apps/2006-06/msg7.html
> 
> Has anything been done more recently?

Cygwin Ports provides PHP packages.  If you have further questions
about Ports packages, please be sure to use the cygwin-ports-general
list.


Yaakov

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



Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd

2010-06-02 Thread cw
I am sorry, this was completely my fault.

I made a stupid syntax mistake while changing the source to configure
the program and that was the cause of the problem.

Sorry again.



On Wed, 02 Jun 2010 10:04 -0400, "Christopher Faylor"
 wrote:
> On Wed, Jun 02, 2010 at 03:46:11PM +0200, c...@tocaido.net wrote:
> >Hello,
> >
> >I am trying to compile the latest release of uw-imapd under Cygwin and
> >Windows XP but the program crash after the first command.
> >
[]

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



[ANNOUNCEMENT] Updated: libelf0-0.8.13-2, libelf0-devel-0.8.13-2

2010-06-02 Thread Dave Korn

The updated libelf0-0.8.13-2 and libelf0-devel-0.8.13-2 packages have
been uploaded to cygwin.com and will shortly be available at your local mirror.

libelf0-0.8.13-2
--

This is a trivial update that adds two exports to the libelf DLL, the
'elf_getaroff' and 'nlist' functions, which were missing in the -1 package.

[From the original release announcement:]

This is a Cygwin package of Michael "Tired" Riepe's libelf library.  It
is required in order to build cross-compiler versions of GCC-4.5.0 and
above targeted at ELF-based platforms (such as Linux) from source if you
want to enable the new LTO (Link-Time-Optimisation) feature; GCC uses
the system's native object format as a container for LTO information when
compiling, and relies on libelf support to do so for ELF-based targets.

--ooOOOoo--
PLEASE SEND BUG REPORTS, PROBLEMS, ETC. TO THE CYGWIN MAILING LIST.
--ooOOOoo--


OBTAINING THE RELEASE
=

  To update your installation, click on the "Install Cygwin now" link on the
http://cygwin.com/ web page.  This downloads setup.exe to your system.  Then,
run setup.exe, fill in all of the options, and make appropriate choices on the
"Select Packages" screen; libelf0 will be found under the "Libs" section of
the Category view, and the -devel package lives under "Devel".

 If you have questions or comments, please send them to the cygwin mailing
list at: .

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message. Send email to
the address specified there. It will be in the format:



If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


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



Whatever happened to cygwin's php?

2010-06-02 Thread Gary .
It looks like it might never have made it to "official" status, but I
found Max Bowsher's ITP via google @
http://www.cygwin.com/ml/cygwin-apps/2006-06/msg7.html

Has anything been done more recently?

-- 
Gary
Non-kook (allegedly)

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



Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd

2010-06-02 Thread René Berber
cw wrote:

> I am trying to compile the latest release of uw-imapd under Cygwin and
> Windows XP but the program crash after the first command.
> 
> This is with the vanilla source from upstream. I know that it is not
> supposed to work very well but yesterday I did the same thing on a
> Windows Seven box and I did not have any problem.
[snip]
> GNU gdb 6.8.0.20080328-cvs (cygwin-special)
> [...]
> This GDB was configured as "i686-pc-cygwin"...
> (gdb) run
> Starting program: /tmp/imap-2007e/imapd/imapd.exe
> [New thread 2592.0x5cc]
> [New thread 2592.0x7c0]
> * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS
> NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN
> SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND]
> Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun
> 2010 15:33:48 +0200
> [New thread 2592.0x84c]
> aaa hhh
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x611097f3 in strlen () from /usr/bin/cygwin1.dll
> (gdb) bt
> #0  0x611097f3 in strlen () from /usr/bin/cygwin1.dll
> #1  0x7c85ada0 in OutputDebugStringA () from
> /cygdrive/c/WINDOWS/system32/kernel32.dll
> #2  0x40010006 in ?? ()
> #3  0x in ?? ()
[snip]
> Any pointer would be very much appreciated.

This looks like the well known "strlen(NULL)" problem, it crashes on
Solaris and I guess on Cygwin, does work on Linux.

You'll have to patch UW-IMAP, which already has many uses of strlen()
guarded.
-- 
René Berber


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



Re: cygpath behaviour when input is not a path

2010-06-02 Thread Gary .
On 6/2/10, Dave Korn wrote:
> On 01/06/2010 09:19, Gary . wrote:
 Since the tool
 output is mixed paths and text, I'd hoped cygpath made "intelligent"
 guesses about what was and was not likely to be a path.
...
>> Okay. So I'm SOL with tool output like
>> "Parse error: syntax error, unexpected '}' in
>> C:\cygwin\home\jg\work\foo.php on line 10"
>> then, short of parsing it myself :-(
>
>   Hang on, isn't this is a bit far from your original question?  You wanted
> to
> know what happens when cygpath is "given a PATH list ... without the -p

Lumme! I've been rumbled! Quick, Chopper, get the getaway car started, sharpish!

Or, more seriously, my original question was based on what I saw while
investigating looking at the tool output, that's all.

> have you ever heard the term GIGO?

Not only have I heard it, I've vast experience in it.

> cygpath expects anything you pass it is a path

Okay. That's what I was wondering. Thanks.

-- 
Gary
Non-kook (allegedly)

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



Re: linker switches

2010-06-02 Thread Csaba Raduly
On Tue, Jun 1, 2010 at 10:25 PM, James Rome  wrote:
> I am doing a C project in NetBeans 6.9RC1, in Windows 7 64-bits.
> gcc.exe     -o dist/Debug-Cygwin/Cygwin_4.x-Windows/tkfpush
> build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o
> build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o: In function `main':
> /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:173: undefined
> reference to `_wsastar...@8'

As an alternative to Larry Hall's suggestion,
If you want to build a Windows program from Cygwin, you need to pass
-mno-cygwin to gcc during compilation and probably also during
linking. You need to use gcc 3 for this to work.
Also, you need to pass the names of the Windows libraries in the
linking step; in this case perhaps -lwsock32

-- 
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

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



Re: Cygwin 1.7: Accessing (local) junctions via SMB

2010-06-02 Thread Larry Hall (Cygwin)

On 6/2/2010 5:53 AM, Mario Küchler wrote:

Corinna Vinschen wrote:
(...)

In contrast, the behaviour of Cygwin 1.7, which is to read the actual
reparse point content and treat it as symlinks, does not make sense for
remote reparse points, apparently.  Only the remote system knows how to
treat them correctly.  So I just applied a patch to Cygwin.


Great! Can you already estimate when this patched version will be
released?


In a parallel universe, it is already released and receiving rave reviews. ;-)
In this universe, you'll have to be content with a snapshot for the time being.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


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



Re: Listing a non-existent network file

2010-06-02 Thread Corinna Vinschen
On Jun  2 15:56, Corinna Vinschen wrote:
> On Jun  2 13:55, Christian Franke wrote:
> > Andy Koppe wrote:
> > > On Cygwin 1.7:
> > > $ ls -l //foo/bar
> > > -rw-r--r-- 1 andy Administrators 0 Dec  1  2006 //foo/bar
> > > 
> > > Server 'foo' doesn't exist, and on both the reply comes after about 10
> > > seconds, presumably a server lookup timeout. I think the Cygwin 1.5
> > > reply is the correct one.
> > > 
> > > This is on an XP machine; I haven't yet tried it elsewhere.
> > > 
> > 
> > Can also be reproduced on Win7 and Cygwin 1.7.5-1.
> 
> I'll have a look.

Should be fixed in CVS now.


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



ssh error

2010-06-02 Thread Andrew DeFaria
This must have something to do with Windows 2003. New Windows 2003 
server. Installed Cygwin 1.7. If I set up pre-shared key so I can ssh 
without having to enter my password it fails.


From Windows 2003 -> XP:

2 [main] -bash 7288 C:\cygwin\bin\bash.exe: *** fatal error - couldn't 
dynamically determine load address for 'WSAGetLastError' (handle 
0x), Win32 error 126

Connection to hcu-g97pnd1 closed.

Similarly, if I try to scp a file from the XP -> Windows 2003:

Seacase:scp hcu-g97pnd1:Perl-* .
3 [main] sshd 8160 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could 
not load ws2_32, Win32 error 126


And while I can ssh with a pre-shared key from XP -> Windows 2003:

Hcu-g97pnd1:ssh seacase

…

Seacase:

I cannot scp nor ssh with a single command from XP -> Windows 2003:

Hcu-g97pnd1:ssh seacase id
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
5 [main] sshd 27240 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could 
not load user32, Win32 error 1114

Hcu-g97pnd1:scp /etc/passwd seacase:/tmp
3 [main] sshd 22020 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could 
not load user32, Win32 error 1114

lost connection

I can scp or ssh with a single command from XP -> Windows 2003 if I 
remove the pre-shared key:


Hcu-g97pnd1:ssh seacase id
lf827...@seacase's password:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
uid=2456697(lf827522) gid=70025(unity) 
groups=70025(unity),544(Administrators),555(Remote Desktop

Users),545(Users)
Hcu-g97pnd1:scp /etc/password seacase:/tmp
lf827...@seacase's password:
/etc/password: No such file or directory
Hcu-g97pnd1:scp /etc/passwd seacase:/tmp
lf827...@seacase's password:
passwd 100% 1760 1.7KB/s 00:00
Hcu-g97pnd1:

Similar with Windows 2003 -> XP:

Seacase:ssh hcu-g97pnd1 id
3 [main] sshd 6852 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could 
not load ws2_32, Win32 error 126

Seacase:scp hcu-g97pnd1:/etc/passwd /tmp
5 [main] sshd 6884 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could 
not load ws2_32, Win32 error

126

And with pre-shared key turned off:

Seacase:ssh hcu-g97pnd1 id
lf827...@hcu-g97pnd1's password:
uid=2456697(lf827522) gid=70025(unity) 
groups=70025(unity),0(root),544(Administrators),545(Users),1012(SophosUser)

Seacase:scp hcu-g97pnd1:/etc/passwd /tmp
lf827...@hcu-g97pnd1's password:
passwd 100% 1760 1.7KB/s 00:00

To summarize with pre-shared key I can only ssh with no command from XP 
-> Windows 2003. All other things fail like ssh with a command or scp. 
Without a pre-shared key, everything works.


Is there any way to get pre-shared key to work. Note here I’m not even 
addressing the known issue of mounted file systems and pre-shared key.

--
Andrew DeFaria 
A fool-proof method for sculpting an elephant: First, get a huge block 
of marble; then chip away everything that doesn't look like an elephant.



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



Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd

2010-06-02 Thread Christopher Faylor
On Wed, Jun 02, 2010 at 03:46:11PM +0200, c...@tocaido.net wrote:
>Hello,
>
>I am trying to compile the latest release of uw-imapd under Cygwin and
>Windows XP but the program crash after the first command.
>
>This is with the vanilla source from upstream. I know that it is not
>supposed to work very well but yesterday I did the same thing on a
>Windows Seven box and I did not have any problem.
>
>This is the output from ldd:
>
>[15:06][/tmp/imap-2007e/imapd] > ldd ./imapd.exe
>ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c90)
>kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll
>(0x7c80)
>cygwin1.dll => /usr/bin/cygwin1.dll (0x6100)
>ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL
>(0x77dd)
>RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll
>(0x77e7)
>Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll
>(0x77fe)
>
>(I am not using the SSL option)
>
>Here is the stackdump:
>
>Exception: STATUS_ACCESS_VIOLATION at eip=611097F3
>eax=4D61696C ebx= ecx= edx=4D61696C esi=0001
>edi=4D61696C
>ebp=0022B778 esp=0022B774
>program=C:\cygwin\tmp\imap-2007e\imapd\imapd.exe, pid 1560, thread main
>cs=001B ds=0023 es=0023 fs=003B gs= ss=0023
>Stack trace:
>Frame Function  Args
>0022B778  611097F3  (4D61696C, 0022BA3A, 00470CC9, 0001)
>0022BA58  6113E916  (0022D000, 0022BA78, 00470CC6, 0022BB00)
>0022BAE8  61114064  (0022BB00, 00470CC6, 008599A0, 4D61696C)
>0022BF08  610BC826  (00469DC0, , , )
>0022BF38  00441A76  (0022BFC0, 00469DC0, , )
>0022C3C8  0040548A  (, 00469546, 0708, 00869B90)
>0022CD28  00407952  (0001, 008598C0, 008480E0, 8000)
>0022CD98  61006E73  (, 0022CDD4, 61006720, 7FFDC000)
>End of stack trace
>
>Using GDB on a running program:
>
>[15:33][/tmp/imap-2007e/imapd] > gdb ./imapd.exe
>GNU gdb 6.8.0.20080328-cvs (cygwin-special)
>[...]
>This GDB was configured as "i686-pc-cygwin"...
>(gdb) run
>Starting program: /tmp/imap-2007e/imapd/imapd.exe
>[New thread 2592.0x5cc]
>[New thread 2592.0x7c0]
>* PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS
>NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN
>SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND]
>Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun
>2010 15:33:48 +0200
>[New thread 2592.0x84c]
>aaa hhh
>
>Program received signal SIGSEGV, Segmentation fault.
>0x611097f3 in strlen () from /usr/bin/cygwin1.dll
>(gdb) bt
>#0  0x611097f3 in strlen () from /usr/bin/cygwin1.dll
>#1  0x7c85ada0 in OutputDebugStringA () from
>/cygdrive/c/WINDOWS/system32/kernel32.dll
>#2  0x40010006 in ?? ()
>#3  0x in ?? ()
>
>(I have used "aaa hhh" as an example nonsensical comman, but I get the
>crash whatever I use as an input)
>
>
>Using GDB on a coredump ends with:
>
>#0  0x611097f3 in strlen () from C:\cygwin\bin\cygwin1.dll
>
>
>Now I am stuck ... Seeing that it is not a program guaranteed to work
>under cygwin I would not have asked on the mailing list, but for the
>fact that a) it is working under Win7 but not under WinXP and b) GDB
>seems to say that the problem is in the cygwin1.dll.

If it's actually dying in strlen() (which is debatable) then that
wouldn't be a Cygwin problem.  It would be a problem with a program
sending garbage to strlen().

Unfortunately, you need to do quite a bit more debugging of the problem
than just looking at a stack trace.  I'd suggest setting breakpoints
throughout the code and stepping around to see what function is dying.

cgf

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



Re: Listing a non-existent network file

2010-06-02 Thread Corinna Vinschen
On Jun  2 13:55, Christian Franke wrote:
> Andy Koppe wrote:
> > On Cygwin 1.7:
> > $ ls -l //foo/bar
> > -rw-r--r-- 1 andy Administrators 0 Dec  1  2006 //foo/bar
> > 
> > Server 'foo' doesn't exist, and on both the reply comes after about 10
> > seconds, presumably a server lookup timeout. I think the Cygwin 1.5
> > reply is the correct one.
> > 
> > This is on an XP machine; I haven't yet tried it elsewhere.
> > 
> 
> Can also be reproduced on Win7 and Cygwin 1.7.5-1.

I'll have a look.


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



STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd

2010-06-02 Thread cw
Hello,

I am trying to compile the latest release of uw-imapd under Cygwin and
Windows XP but the program crash after the first command.

This is with the vanilla source from upstream. I know that it is not
supposed to work very well but yesterday I did the same thing on a
Windows Seven box and I did not have any problem.

This is the output from ldd:

[15:06][/tmp/imap-2007e/imapd] > ldd ./imapd.exe
ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c90)
kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll
(0x7c80)
cygwin1.dll => /usr/bin/cygwin1.dll (0x6100)
ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL
(0x77dd)
RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll
(0x77e7)
Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll
(0x77fe)

(I am not using the SSL option)

Here is the stackdump:

Exception: STATUS_ACCESS_VIOLATION at eip=611097F3
eax=4D61696C ebx= ecx= edx=4D61696C esi=0001
edi=4D61696C
ebp=0022B778 esp=0022B774
program=C:\cygwin\tmp\imap-2007e\imapd\imapd.exe, pid 1560, thread main
cs=001B ds=0023 es=0023 fs=003B gs= ss=0023
Stack trace:
Frame Function  Args
0022B778  611097F3  (4D61696C, 0022BA3A, 00470CC9, 0001)
0022BA58  6113E916  (0022D000, 0022BA78, 00470CC6, 0022BB00)
0022BAE8  61114064  (0022BB00, 00470CC6, 008599A0, 4D61696C)
0022BF08  610BC826  (00469DC0, , , )
0022BF38  00441A76  (0022BFC0, 00469DC0, , )
0022C3C8  0040548A  (, 00469546, 0708, 00869B90)
0022CD28  00407952  (0001, 008598C0, 008480E0, 8000)
0022CD98  61006E73  (, 0022CDD4, 61006720, 7FFDC000)
End of stack trace

Using GDB on a running program:

[15:33][/tmp/imap-2007e/imapd] > gdb ./imapd.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
[...]
This GDB was configured as "i686-pc-cygwin"...
(gdb) run
Starting program: /tmp/imap-2007e/imapd/imapd.exe
[New thread 2592.0x5cc]
[New thread 2592.0x7c0]
* PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS
NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN
SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND]
Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun
2010 15:33:48 +0200
[New thread 2592.0x84c]
aaa hhh

Program received signal SIGSEGV, Segmentation fault.
0x611097f3 in strlen () from /usr/bin/cygwin1.dll
(gdb) bt
#0  0x611097f3 in strlen () from /usr/bin/cygwin1.dll
#1  0x7c85ada0 in OutputDebugStringA () from
/cygdrive/c/WINDOWS/system32/kernel32.dll
#2  0x40010006 in ?? ()
#3  0x in ?? ()

(I have used "aaa hhh" as an example nonsensical comman, but I get the
crash whatever I use as an input)


Using GDB on a coredump ends with:

#0  0x611097f3 in strlen () from C:\cygwin\bin\cygwin1.dll


Now I am stuck ... Seeing that it is not a program guaranteed to work
under cygwin I would not have asked on the mailing list, but for the
fact that a) it is working under Win7 but not under WinXP and b) GDB
seems to say that the problem is in the cygwin1.dll.

Well, b) could just be me not being able to use GDB  

One more thing, I have made a search and I am pretty sure that there is
only one cygwin1.dll on my system.


Any pointer would be very much appreciated.

Thanks,
Davide D.



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



Re: cygpath behaviour when input is not a path

2010-06-02 Thread Dave Korn
On 01/06/2010 09:19, Gary . wrote:
> On 5/31/10, Dave Korn wrote:
>> On 30/05/2010 08:51, Gary wrote:
>>> Since the tool
>>> output is mixed paths and text, I'd hoped cygpath made "intelligent"
>>> guesses about what was and was not likely to be a path.
>>>
>>   Well, that is basically what it does; but, being a POSIX tool, the
>> consequence is that it assumes that a colon is just a char like any other in
>> a filename.
> 
> Okay. So I'm SOL with tool output like
> "Parse error: syntax error, unexpected '}' in
> C:\cygwin\home\jg\work\foo.php on line 10"
> then, short of parsing it myself :-(

  Hang on, isn't this is a bit far from your original question?  You wanted to
know what happens when cygpath is "given a PATH list ... without the -p
option".  Now you're telling me that you want to feed it a bunch of gibberish,
amongst which might or might not be a path, and have it spot that?  I think
you oversimplified the initial presentation a little there!

> Actually cygpath's response to the tool ouput in this instance was
> "cygpath: can't convert empty path"
> although that seems to be a barf on a previous, empty, line of output,
> because on testing just that line with cygpath -u I got
> "Parse error: syntax error, unexpected '}' in C:/cygwin/home/jg/work/foo.php 
> on
> line 10"
> That is, the path is more posix-like, but certainly isn't "unixified".

  Well, have you ever heard the term GIGO?  That's basically what you're
getting here.  cygpath expects anything you pass it is a path, and given the
flexibility of the POSIX filename character set, it can't really be expected
to know better; how does it know you don't mean what you say?  After all, ...

> $ pushd /tmp/
> /tmp ~
> 
> $ mkdir posixpaths
> 
> $ cd posixpaths/
> 
> $ touch "Parse error: syntax error, unexpected '}' in"
> 
> $ ls -la
> total 0
> drwxr-xr-x+ 1 Admin None 0 2010-06-02 14:17 .
> drwxrwxrwt  1 Admin None 0 2010-06-02 14:17 ..
> -rw-r--r--  1 Admin None 0 2010-06-02 14:17 Parse error: syntax error, unexpec
> ted '}' in
> 
> $

... you might have a file by that name!  Sounds to me like you want to pipe it
through sed or grep (probably via d2u on the way) to extract just the
filenames and pass them to cygpath.

cheers,
  DaveK


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



Re: Listing a non-existent network file

2010-06-02 Thread Christian Franke
Andy Koppe wrote:
> On Cygwin 1.7:
> $ ls -l //foo/bar
> -rw-r--r-- 1 andy Administrators 0 Dec  1  2006 //foo/bar
> 
> Server 'foo' doesn't exist, and on both the reply comes after about 10
> seconds, presumably a server lookup timeout. I think the Cygwin 1.5
> reply is the correct one.
> 
> This is on an XP machine; I haven't yet tried it elsewhere.
> 

Can also be reproduced on Win7 and Cygwin 1.7.5-1.

Christian




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



Listing a non-existent network file

2010-06-02 Thread Andy Koppe
On Cygwin 1.5:
$ ls //foo/bar
ls: cannot access //foo/bar: No such file or directory

On Cygwin 1.7:
$ ls -l //foo/bar
-rw-r--r-- 1 andy Administrators 0 Dec  1  2006 //foo/bar

Server 'foo' doesn't exist, and on both the reply comes after about 10
seconds, presumably a server lookup timeout. I think the Cygwin 1.5
reply is the correct one.

This is on an XP machine; I haven't yet tried it elsewhere.

Andy

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



Re: Using custom Winsock socket functions with Cygwin

2010-06-02 Thread Bruce Cran
On Tue, 1 Jun 2010 20:06:08 +0100
Bruce Cran  wrote:

> I have a Winsock provider DLL which communicates with a kernel SCTP
> stack. I'd like to enable applications built with both Visual Studio
> and Cygwin to run because there's lots of code that's been ported from
> Linux. However, the problem I've come across is that because I have a
> few custom socket functions such as sctp_sendmsg and sctp_recvmsg that
> don't go through the Winsock layer but still get a SOCKET
> descriptor, I get passed Cygwin's internal file descriptor - i.e. I
> can see my WSPAccept function returns a value of 161 up the stack but
> it gets translated to 4 by Cygwin's socket code, and the 161 value
> will be stored in the io_handle member of the fhandler_socket class.
> I thought I could maybe use GetFileType and _get_osfhandle to deal
> with running under Cygwin but it turns out that GetFileType tells me
> I have a valid handle, and converting it using _get_osfhandle anyway
> gives me an invalid handle back.
> 
> Is there some way to detect that the handle's wrong and fetch the
> proper one without my code needing detailed knowledge of the
> fhandler_socket class?
> 

I think I can see what the problem is now: since I call _get_osfhandle
from within the Winsock provider, it seems to be bypassing the Cygwin
layer; likewise, if I call getsockopt cygwin1.dll doesn't show up in
the call stack either, and WSAENOTSOCK gets returned.

The workaround I've come up with is to redefine my custom sctp_recvmsg
function as being inline so it gets called within the context of the
application; that means I can call getsockopt using a custom 'optname'
which can return the SOCKET handle, having gone through cygwin1.dll.
This seems to work, but is such a hack that I'm hoping there's some
better solution.

-- 
Bruce Cran

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



Re: Cygwin 1.7: Accessing (local) junctions via SMB

2010-06-02 Thread Mario Küchler
Corinna Vinschen wrote:
(...)
> In contrast, the behaviour of Cygwin 1.7, which is to read the actual
> reparse point content and treat it as symlinks, does not make sense for
> remote reparse points, apparently.  Only the remote system knows how to
> treat them correctly.  So I just applied a patch to Cygwin.

Great! Can you already estimate when this patched version will be
released?

> Thanks for the report,

You are welcome :)

Regards,
Mario


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



AW: R statistical computing on Cygwin

2010-06-02 Thread DEWI - N. Zacharias

Hi Yaakov


> Von: Yaakov []
> Gesendet: Mittwoch, 2. Juni 2010 09:57
> An: cygwin-ports-gene...@lists.sourceforge.net
> Cc: cygwin@cygwin.com
> Betreff: Re: R statistical computing on Cygwin
>
> On Wed, 2 Jun 2010 09:02:06 +0200
> "DEWI - N. Zacharias" wrote:
> > I can not find out if there is a package for Cygwin with R  a
> > language specialized on statistical analysis .
>
> Not in the official distro, but Cygwin Ports provides an R package:
>
> http://cygwinports.org/

Thanks for the quick answer.


> If you have further questions about Ports packages, please direct them
> to the cygwin-ports-general list; Reply-To set accordingly.

Will do so in future!


Have a nice day
Norbert

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


--
Dipl. Phys.
Norbert Zacharias
Wind Measurements & Power Curve Measurements
DEWI GmbH
Ebertstrasse 96
26382 Wilhelmshaven
Germany


Tel.:   +49 4421 4808 876

Fax:+49 4421 4808 843


Email:  n.zachar...@dewi.de
Home:   http://http://www.dewi.de

DEWI GmbH - Deutsches Windenergie-Institut, Wilhelmshaven
Commercial Register No.: Amtsgericht Oldenburg, HRB 130241
Managing Director: Jens Peter Molly
Chairman of the supervisory board: Ministerialrat Dr. Niels Kämpny

P Please consider the environment before printing this email.



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



Re: Cygwin Performance and stat()

2010-06-02 Thread Corinna Vinschen
On Jun  1 14:42, Christopher Wingert wrote:
> I think there are a lot of use cases where the extra information (ACL
> information *I assume* is the majority of the problem) is unnecessary. 
> For most of the applications filename, size, and the three dates are all
> that is necessary.  So cygwin stat is overkill.  So if I can tell the
> emulation layer (via an environment flag) or the actually utility
> (bash/ls/make/find/du) via a command line switch, I think I can save a lot
> of time waiting.
> 
> Just to highlight how bad this problem is.  I have a network drive with
> 681 sub directories and approximately 90k files.  A time comparison for
> getting directory information as follows:
> 
> *DOS "dir /s" takes 17 seconds.
> *Cygwin "ls -lR" takes 5950 seconds (that's almost two hours).
> *msls -lR takes 55 seconds.
> *myls (see code below) takes 7 seconds.
> 
> Each test was done twice and after a reboot to make sure there was no
> caching involved.
> 
> To be clear, Cygwin ls is 850X slower.

Did you try to mount the network drive with the "noacl" mount option?
That skips requesting the owner/group information.


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



Re: R statistical computing on Cygwin

2010-06-02 Thread Cygwin/X
On Wed, 2 Jun 2010 09:02:06 +0200
"DEWI - N. Zacharias" wrote:
> I can not find out if there is a package for Cygwin with R  a
> language specialized on statistical analysis .

Not in the official distro, but Cygwin Ports provides an R package:

http://cygwinports.org/

If you have further questions about Ports packages, please direct them
to the cygwin-ports-general list; Reply-To set accordingly.


Yaakov

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



R statistical computing on Cygwin

2010-06-02 Thread DEWI - N. Zacharias

Hi all,

I can not find out if there is a package for Cygwin with R  a language 
specialized on statistical analysis .

http://www.r-project.org/

Is there anyone how use R in the Cygwin environment ??

Have fun
Norbert


--
Dipl. Phys.
Norbert Zacharias
Wind Measurements & Power Curve Measurements
DEWI GmbH
Ebertstrasse 96
26382 Wilhelmshaven
Germany


Tel.:   +49 4421 4808 876

Fax:+49 4421 4808 843


Email:  n.zachar...@dewi.de
Home:   http://http://www.dewi.de

DEWI GmbH - Deutsches Windenergie-Institut, Wilhelmshaven
Commercial Register No.: Amtsgericht Oldenburg, HRB 130241
Managing Director: Jens Peter Molly
Chairman of the supervisory board: Ministerialrat Dr. Niels Kämpny

P Please consider the environment before printing this email.



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