Patch to make readline parse CSI keycodes properly

2009-07-19 Thread Andy Koppe
When pressing an unbound key or key combination in bash and other
readline programs, somewhat cryptic characters are often inserted into
the command line. For example, you get "~" for Insert, "4~" for F12,
or ";5A" for Ctrl+Up. This can be rather confusing and annoying.

The reason is that readline does not parse control sequences as
defined in section 5.4 of the ECMA-48 standard correctly. VT100
terminals and its numerous descendants use those for many keys or key
combinations that don't have single-character codes. They start with
the control sequence introducer (CSI), normally represented by "\e[",
followed by parameter and intermediate bytes in the range from 0x20 to
0x3F, followed by a final byte in the range from 0x40 to 0x7E.
Readline, at least in its default config, stops parsing these
sequences after the first byte following the "\e[", leaving any
remaining bytes to spill onto the command line.

As far as I can see, there's currently no way to address this short of
explicitly binding all the CSI keycodes to nothing. (Well, actually, a
single binding seems to suffice for codes that differ only in the last
character, but that doesn't help with the F-keys and the likes of
Insert.) That's a rather long list though, which would slow down
startup and lead to an explosion in the number of keymaps allocated
internally by readline.

Hence the attached small patch for the readline source, which avoids
such inefficiencies. It defines a function called 'skip-csi-seq' that
skips over the parameter, intermediate, and final bytes. This is
assigned to '\e['. Generally in readline, bindings for longer
sequences take precedence over shorter ones, which ensures that CSI
sequences that do have functions bound to them continue to work.

Here's the result in the output of 'bind':

$ bind -p | grep e\\[
"\e[D": backward-char
"\e[H": beginning-of-line
"\e[3~": delete-char
"\e[F": end-of-line
"\e[C": forward-char
"\e[B": next-history
"\e[A": previous-history
"\e[": skip-csi-seq

It's working correctly here, including when adding bindings for longer
keycodes: no more funny characters when accidentally hitting the wrong
key. Please consider the patch for inclusion into the readline
package.

Regards,
Andy


rl_skip_csi_seq.patch
Description: Binary data
--
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: gcc-3 problem when compiling

2009-07-19 Thread Thomas Steinbach

Hello Christoph,


since a few weeks I can't comp?ile my (native mingw) projet
which was no problem until the gcc was renamed to gcc-3
[...]
/3.4.4/../../../../i686-pc-cygwin/bin/as.exe: cannot execute binary file
make: *** [int/wrap_s.obj] Error 1


And what does
ls -l
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
show?


It shows:

---snip---
$ ls -l
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
r-x---+ 1 root Users 26 May 22 03:29
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe

u...@computer
$ _
---snap---

so, the file exist and is executable by group (Users), so the user
should also be able to execute... shouldn't it?

Anyway I set the file manually to

chmod 555
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe

and then the user (root), group(Users) and world should be able to execute,
but still get that error... :-(

Is the setting to 050 a result of the introduction of gcc v4.x? Why?
btw: all other bins (ar.exe, etc) in this bin directory are set to 550
btw2: all bins ind C:\cygwin\bin are set to 050 ??? but I don't
know if that was the state before the introduction of gcc 4.x
btw3: the admin user's name is "root" and the users name is "user"
and the common group of users is "Users", as you can see in the
result of the "ls -l" command

Is there an essential change of the right management since the
introduction of gcc v4.x?

Thomas


--
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: gcc-3 problem when compiling

2009-07-19 Thread Dave Korn
Thomas Steinbach wrote:

> Is the setting to 050 a result of the introduction of gcc v4.x? 

  No.  It is a sign that something else has gone wrong with your installation.

> btw: all other bins (ar.exe, etc) in this bin directory are set to 550

  That's also wrong.  It should be 750.

> btw2: all bins ind C:\cygwin\bin are set to 050 ??? but I don't
> know if that was the state before the introduction of gcc 4.x

  Sounds to me like your real problem is that all your permissions have been
trashed somehow, or whatever caused that.  I can imagine that last time you
ran setup.exe to get updates, it would have gone horribly wrong if you don't
have any write permissions to replace the updated files.

> Is there an essential change of the right management since the
> introduction of gcc v4.x?

  No, absolutely not.  The compiler has no control over permissions anyway,
that's all handled in the Cygwin DLL.

  Please run "cygcheck -s -v -r > cygcheck.out", and then send the
cygcheck.out file with your next post - as an attachment, please don't copy
and paste it into the body of the email.  That might give us enough more info
to figure out what's going on.

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: gcc-3 problem when compiling

2009-07-19 Thread Dave Korn
Thomas Steinbach wrote:

>> And what does
>> ls -l
>> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
>> show?
> 
> It shows:
> 
> ---snip---
> $ ls -l
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
> r-x---+ 1 root Users 26 May 22 03:29
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
> 
> u...@computer
> $ _
> ---snap---

  Wait, what!?  Where's the size of the file?  "ls -l" shows it between the
groupname and the date for me.

$ ls -l /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe
-rwxr-xr-x 2 Admin None 5853442 Jul  4 12:21
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe

  How odd.  Do check if it runs from the commandline; try

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe -v

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: Patch to make readline parse CSI keycodes properly

2009-07-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Andy Koppe on 7/19/2009 5:30 AM:
> It's working correctly here, including when adding bindings for longer
> keycodes: no more funny characters when accidentally hitting the wrong
> key. Please consider the patch for inclusion into the readline
> package.

I'll play with this, and consider adding it to the cygwin build of
readline.  But this seems like something that you should push upstream to
the bug-bash list (the bash maintainer also manages the upstream readline
library), as it seems like this will have platform-independent benefits.

- --
Don't work too hard, make some time for fun as well!

Eric Blake e...@byu.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpjKWIACgkQ84KuGfSFAYC3GACeKJrkTZJmi4lw4ZlEAgFOy2Yh
yqAAnR6VBD/77gNehUKClcqcxjncWid6
=vf7z
-END PGP SIGNATURE-

--
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: WCONTINUED/WIFCONTINUED

2009-07-19 Thread Christopher Faylor
On Fri, Jul 10, 2009 at 12:20:20PM -0400, Christopher Faylor wrote:
>On Fri, Jul 10, 2009 at 09:49:59AM +0200, Reini Urban wrote:
>>Any volunteer for WCONTINUED, WIFCONTINUED() for wait4() for the
>>initial cygwin-1.7 release?
>>See http://www.opengroup.org/onlinepubs/009695399/functions/wait.html
>>
>>Sorry, I'm not able to write this, but I have looked into wait.cc.
>
>I should be able to implement this.  It shouldn't be too hard*.

It actually wasn't that hard.  My somewhat simple test case behaves
the same as linux but I'll be there are corner conditions that I
missed.

It's in the latest snapshot: http://cygwin.com/snapshots/

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: Patch to make readline parse CSI keycodes properly

2009-07-19 Thread Andy Koppe
2009/7/19 Eric Blake:
>> It's working correctly here, including when adding bindings for longer
>> keycodes: no more funny characters when accidentally hitting the wrong
>> key. Please consider the patch for inclusion into the readline
>> package.
>
> I'll play with this, and consider adding it to the cygwin build of
> readline.  But this seems like something that you should push upstream to
> the bug-bash list (the bash maintainer also manages the upstream readline
> library), as it seems like this will have platform-independent benefits.

Okay, I'll give that a go.

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



Compiling with netapilib

2009-07-19 Thread Ian Puleston
Hi,

I'm trying to use gcc 3.4.4 to compile the Microsoft C sample at
http://msdn.microsoft.com/en-us/library/aa370663(VS.85).aspx to build a
small test program that makes the "NetWkstaGetInfo" Windows NetAPI
request. The Cygwin gcc library includes a libnetapi32.a library that
seems to include that function (see below) but linking with it gives an
"undefined reference to `_netwkstageti...@12'" error. Any idea what I am
missing - is there some other library that I need to link in too?

[Temp]: gcc -l netapi32 -o winTst2.exe winTst2.c
/cygdrive/c/Users/IPULES~2/Temp/cc4my5mj.o:winTst2.c:(.text+0x9a):
undefined reference to `_netwkstageti...@12'
/cygdrive/c/Users/IPULES~2/Temp/cc4my5mj.o:winTst2.c:(.text+0x169):
undefined reference to `_netapibufferf...@4'
collect2: ld returned 1 exit status
[Temp]: 
[Temp]: nm /usr/lib/w32api/libnetapi32.a | grep NetWkstaGetInfo
 T _netwkstageti...@12
 I __imp__netwkstageti...@12
[Temp]: 
[Temp]: nm /usr/lib/w32api/libnetapi32.a | grep NetApiBufferFree
 T _netapibufferf...@4
 I __imp__netapibufferf...@4
[Temp]:

Ian

--
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: Compiling with netapilib

2009-07-19 Thread Yaakov (Cygwin/X)

On 19/07/2009 13:13, Ian Puleston wrote:

I'm trying to use gcc 3.4.4 to compile the Microsoft C sample at
http://msdn.microsoft.com/en-us/library/aa370663(VS.85).aspx to build a
small test program that makes the "NetWkstaGetInfo" Windows NetAPI
request. The Cygwin gcc library includes a libnetapi32.a library that
seems to include that function (see below) but linking with it gives an
"undefined reference to `_netwkstageti...@12'" error. Any idea what I am
missing - is there some other library that I need to link in too?

[Temp]: gcc -l netapi32 -o winTst2.exe winTst2.c


http://cygwin.com/faq/faq-nochunks.html#faq.programming.win32-api


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: Compiling with netapilib

2009-07-19 Thread Christopher Faylor
On Sun, Jul 19, 2009 at 01:57:23PM -0500, Yaakov (Cygwin/X) wrote:
>On 19/07/2009 13:13, Ian Puleston wrote:
>> I'm trying to use gcc 3.4.4 to compile the Microsoft C sample at
>> http://msdn.microsoft.com/en-us/library/aa370663(VS.85).aspx to build a
>> small test program that makes the "NetWkstaGetInfo" Windows NetAPI
>> request. The Cygwin gcc library includes a libnetapi32.a library that
>> seems to include that function (see below) but linking with it gives an
>> "undefined reference to `_netwkstageti...@12'" error. Any idea what I am
>> missing - is there some other library that I need to link in too?
>>
>> [Temp]: gcc -l netapi32 -o winTst2.exe winTst2.c
>
>http://cygwin.com/faq/faq-nochunks.html#faq.programming.win32-api

Or, more precisely: library references go last, not first.

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



Incorrect codepage numbers in 1.7 guide

2009-07-19 Thread Andy Koppe
A couple of small mistakes in
http://cygwin.com/1.7/cygwin-ug-net/setup-locale.html#setup-locale-charsetlist:
ISO-8859-13 and -15 have codepage numbers 28603 and 28605, not 28563
and 28565.

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



OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Doug Lim
I've just installed Cygwin and OpenSSH on a Windows Server 2003 box with 
the goal of allowing sftp access to users.
I'm testing with the Administrator account and two non-administrator 
accounts. I am able to login via SSH to a bash
shell using all three accounts, however, when I try to connect to the 
server with sftp (using OpenSSH sftp on a linux
box and Filezilla on a Windows XP Pro box) I can connect and use sftp 
when logging in as the Administrator, but when
I connect using one of the non-Administrator accounts, the password is 
accepted and then the server immediately

closes the connection.

I'm trying to lock down the filesystem, removed the Users NT group from 
the entire D: Drive. Cygwin is installed on the
D: drive, so I've re-added the Users NT group back to D:\Cygwin with 
Read & Execute, List Folder Contents, and Read
permissions. I intend to give users access to selected IIS web sites by 
granting a user full control of their web site area
and by setting up a symlink from their home directory to the specific 
web site root.


I have verified that .bashrc isn't echoing back any extraneous info to 
non-interactive logins as follows (which I've read

causes problems with sftp connections).

$ ssh user@ /usr/bin/true
produces no output after keying in the user password.

If I then add one of the non-Administrator accounts to the 
Administrators group, sftp then begins working as expected

for that user.

The following are the contents of /etc/ssh_config on that server:
#   $OpenBSD: ssh_config,v 1.23 2007/06/08 04:40:40 pvalchev Exp $

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc

#   MACs hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no

Any ideas on getting sftp to work properly for non-Administrator users?

Thanks in advance.



--
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: [1.7] fifo regression

2009-07-19 Thread Christopher Faylor
On Tue, Jul 07, 2009 at 02:02:12PM -0400, Christopher Faylor wrote:
>On Mon, Jul 06, 2009 at 10:18:39PM -0400, Christopher Faylor wrote:
>>On Mon, Jul 06, 2009 at 07:03:11AM -0600, Eric Blake wrote:
>>>But on cygwin 1.7, when you attempt to create multiple writers to a single
>>>fifo, the second writer creates an fd just fine but then fails on any
>>>attempt to write to that fd:
>>
>>I see the problem but I don't know how to fix it yet.  It may be a
>>couple of days before I can come up with a solution.
>
>Just an update: I now have a headache.  Thanks again Microsoft for
>making it all so complicated.  This is YA example of a feature (Windows
>Named Pipes) which behave 98% of the way you'd expect it to work.  The
>2% is the killer.

Just an update:  @#$%^&*(!

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: FAQ question regarding tcl/tk and paths

2009-07-19 Thread Larry Hall (Cygwin)

Shaddy Baddah wrote:

Hi,

So, from the Cygwin FAQ:


*4.45.* Why doesn't Cygwin tcl/tk understand Cygwin paths?

The versions of Tcl/Tk distributed with Cygwin (e.g. cygtclsh80.exe,
cygwish80.exe) are not actually "Cygwin versions" of those tools. They
are built with the |-mno-cygwin| option to |gcc|, which means they do
not understand Cygwin mounts or symbolic links.

See the entry "How do I convert between Windows and UNIX paths?"
elsewhere in this FAQ.


Fine, I appreciate that. But the question I have is why? My searches
through the mailing list archives have been fruitless.



?  No?  Dang!  I've been looking for an
appropriate place to use that phrase.  I'll keep trying. ;-)

You might have more luck looking in the context of 'insight'.  'insight'
comes with the 'gdb' package but is built for Windows rather than relying
on X.  So the packaged version of Tcl/Tk is the one used for 'insight',
nothing more, nothing less.

--
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: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Doug Lim
After a bit more research on the problem, I found a discussion thread on 
the web discussing a similar problem from 2006. The difference is that 
the thread discusses scp connections dropping immediately after 
non-administrator authentication.


http://winscp.net/forum/viewtopic.php?t=3782

A response to a thread from March of this year indicates that copying 
all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin as a 
workaround. I've copied the DLL files on my server per the workaround 
and now non-administrator users are able to use sftp.


I've attached a copy of cygcheck.out from the server where this is 
happening.



Cygwin Configuration Diagnostics
Current System Time: Sun Jul 19 20:21:18 2009

Windows 2003 Web Server Ver 5.2 Build 3790 Service Pack 2

Path:   D:\Program Files\Windows Resource Kits\Tools\
d:\antiword\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\
D:\cygwin\bin

Output from D:\cygwin\bin\id.exe (nontsec)
UID: 500(Administrator) GID: 513(None)
513(None)   544(Administrators) 545(Users)

Output from D:\cygwin\bin\id.exe (ntsec)
UID: 500(Administrator) GID: 513(None)
513(None)   544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

CYGWIN = 'binmode ntsec'
Path = 'D:\Program Files\Windows Resource 
Kits\Tools\;d:\antiword\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\Microsoft SQL Server\80\Tools\Binn\;D:\cygwin\bin'

ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
APPDATA = 'C:\Documents and Settings\Administrator\Application Data'
CommonProgramFiles = 'C:\Program Files\Common Files'
COMPUTERNAME = 'TIG-WEB-01'
ComSpec = 'C:\WINDOWS\system32\cmd.exe'
FP_NO_HOST_CHECK = 'NO'
HOMEDRIVE = 'C:'
HOMEPATH = '\Documents and Settings\Administrator'
LOGONSERVER = '\\TIG-WEB-01'
NUMBER_OF_PROCESSORS = '4'
OS = 'Windows_NT'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = 'x86'
PROCESSOR_IDENTIFIER = 'x86 Family 15 Model 4 Stepping 1, GenuineIntel'
PROCESSOR_LEVEL = '15'
PROCESSOR_REVISION = '0401'
ProgramFiles = 'C:\Program Files'
PROMPT = '$P$G'
SESSIONNAME = 'Console'
SystemDrive = 'C:'
SystemRoot = 'C:\WINDOWS'
TEMP = 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp'
TMP = 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp'
USERDOMAIN = 'TIG-WEB-01'
USERNAME = 'Administrator'
USERPROFILE = 'C:\Documents and Settings\Administrator'
windir = 'C:\WINDOWS'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'D:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'D:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'D:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd N/AN/A
c:  hd  NTFS 12291Mb  82% CP CS UN PA FC 
d:  hd  NTFS127547Mb   5% CP CS UN PA FC 
e:  cd N/AN/A
m:  net NTFS127547Mb   3% CP CS UN PA FC 

D:\cygwin  /  system  binmode
D:\cygwin/bin  /usr/bin   system  binmode
D:\cygwin/lib  /usr/lib   system  binmode
.  /cygdrive  system  binmode,cygdrive

Found: D:\cygwin\bin\awk.exe
Found: D:\cygwin\bin\bash.exe
Found: D:\cygwin\bin\cat.exe
Found: D:\cygwin\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: D:\cygwin\bin\find.exe
Not Found: gcc
Not Found: gdb
Found: D:\cygwin\bin\grep.exe
Found: D:\cygwin\bin\kill.exe
Not Found: ld
Found: D:\cygwin\bin\ls.exe
Not Found: make
Found: D:\cygwin\bin\mv.exe
Not Found: patch
Not Found: perl
Found: D:\cygwin\bin\rm.exe
Found: D:\cygwin\bin\sed.exe
Found: D:\cygwin\bin\ssh.exe
Found: D:\cygwin\bin\sh.exe
Found: D:\cygwin\bin\tar.exe
Found: D:\cygwin\bin\test.exe
Not Found: vi
Not Found: vim

   61k 2009/03/02 D:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
  "cygbz2-1.dll" v0.0 ts=2009/3/1 20:52
7k 2003/10/19 D:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
  "cygcrypt-0.dll" v0.0 ts=2003/10/19 2:57
 1075k 2009/03/25 D:\cygwin\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0
  "cygcrypto-0.9.8.dll" v0.0 ts=2009/3/25 12:21
   40k 2009/03/01 D:\cygwin\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0
  "cygform-8.dll" v0.0 ts=2009/2/28 20:40
   41k 2009/03/27 D:\cygwin\bin\cygform-9.dll - os

[ANNOUNCEMENT] Updated: {libarchive/libarchive2/libarchive-devel/bsdtar/bsdcpio}-2.7.1pre-1

2009-07-19 Thread Charles Wilson
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and
read ISO9660 CDROM images. The bsdtar program is an implementation of
tar(1) that is built on top of libarchive.

Routine update tracking upstream merge of cygwin patches.

[[ compiled using gcc-3.4.4-999 ]]

Barring unforeseen errors, this will be the final libarchive
update for the cygwin-1.5 distribution.  Future development will
continue with libarchive-2.7.1pre-10 for cygwin-1.7.

CHANGES (since 2.7.0pre-1)

o Updated to latest upstream SVN (r. 1249)
o All of the cygwin patches necessary for the preceding release
  have been merged, in one form or another, upstream.
o Remove cygwin from setup.hint requires
o Recompiled against liblzma1

-- 
Charles Wilson
volunteer libarchive maintainer for cygwin



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 and answer all of the questions.

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

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

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



[ANNOUNCEMENT] [1.7] Updated: {libarchive/libarchive2/libarchive-devel/bsdtar/bsdcpio}-2.7.1pre-10

2009-07-19 Thread Charles Wilson
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and
read ISO9660 CDROM images. The bsdtar program is an implementation of
tar(1) that is built on top of libarchive.

Routine update tracking upstream merge of cygwin patches.

[[ compiled using gcc-3.4.4-999 ]]

This release is specific for cygwin-1.7.  It differs in one significant
aspect from the simultaneously-released libarchive-2.7.1pre-1 for
cygwin-1.5: this version supports extended attributes, because it was
compiled against the new cygwin-1.7 kernel which provides the necessary
facilities.

As usual, this package also differs in various trivial ways from the
cygwin-1.5 package: the README references cygport-0.9.5 and
cygwin-1.7.0-51, and the /usr/share/doc/ layout is influenced by the
cygport changes between 0.4.x and 0.9.x.

CHANGES (since 2.7.0pre-10)

o Updated to latest upstream SVN (r. 1249)
o All of the cygwin patches necessary for the preceding release
  have been merged, in one form or another, upstream.
o Remove cygwin from setup.hint requires
o Recompiled against liblzma1

-- 
Charles Wilson
volunteer libarchive maintainer for cygwin



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 and answer all of the questions.

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

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

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



Re: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Christopher Faylor
On Sun, Jul 19, 2009 at 08:50:47PM -0500, Doug Lim wrote:
>After a bit more research on the problem, I found a discussion thread on 
>the web discussing a similar problem from 2006. The difference is that 
>the thread discusses scp connections dropping immediately after 
>non-administrator authentication.
>
>http://winscp.net/forum/viewtopic.php?t=3782
>
>A response to a thread from March of this year indicates that copying 
>all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin as a 
>workaround. I've copied the DLL files on my server per the workaround 
>and now non-administrator users are able to use sftp.
>
>I've attached a copy of cygcheck.out from the server where this is 
>happening.

That sounds like a pretty  workaround.

Just setting the PATH to include cygwin's bin directory is likely to
work better.  I know that someone in that thread said that they did that
already but I'm not convinced that they really knew what they were
doing.

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: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Doug Lim

Christopher Faylor wrote:

On Sun, Jul 19, 2009 at 08:50:47PM -0500, Doug Lim wrote:
  
After a bit more research on the problem, I found a discussion thread on 
the web discussing a similar problem from 2006. The difference is that 
the thread discusses scp connections dropping immediately after 
non-administrator authentication.


http://winscp.net/forum/viewtopic.php?t=3782

A response to a thread from March of this year indicates that copying 
all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin as a 
workaround. I've copied the DLL files on my server per the workaround 
and now non-administrator users are able to use sftp.


I've attached a copy of cygcheck.out from the server where this is 
happening.



That sounds like a pretty  workaround.

Just setting the PATH to include cygwin's bin directory is likely to
work better.  I know that someone in that thread said that they did that
already but I'm not convinced that they really knew what they were
doing.

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


  


Except, cygwin\bin was already in the path as indicated in the 
cygcheck.out I attached. It doesn't explain why users belonging to the 
Local Administrators group would be able to maintain an SFTP connection 
while non-Administrators would get dropped immediately following 
authentication.


I just reconfirmed. I left cygwin\bin in the path and took the DLLs back 
out of cygwin\usr\sbin. Non-Administrator users are again dropped 
immediately after authentication.


Here's the sftp debug output with the DLLs removed from cygwin\usr\sbin 
on the server


d...@vorlon ~ $ sftp -v @
Connecting to ...
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to  [xx.xx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /home/dlim/.ssh/id_rsa type -1
debug1: identity file /home/dlim/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in /home/dlim/.ssh/known_hosts:21
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: 
publickey,password,keyboard-interactive

debug1: Next authentication method: publickey
debug1: Trying private key: /home/dlim/.ssh/id_rsa
debug1: Trying private key: /home/dlim/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: 
publickey,password,keyboard-interactive

debug1: Next authentication method: password
@'s password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessi...@openssh.com
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype e...@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 1584, received 2104 bytes, in 1.6 seconds
Bytes per second: sent 991.7, received 1317.2
debug1: Exit status 128
Connection closed


--
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: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Doug Lim

Doug Lim wrote:

Christopher Faylor wrote:

On Sun, Jul 19, 2009 at 08:50:47PM -0500, Doug Lim wrote:
 
After a bit more research on the problem, I found a discussion 
thread on the web discussing a similar problem from 2006. The 
difference is that the thread discusses scp connections dropping 
immediately after non-administrator authentication.


http://winscp.net/forum/viewtopic.php?t=3782

A response to a thread from March of this year indicates that 
copying all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin 
as a workaround. I've copied the DLL files on my server per the 
workaround and now non-administrator users are able to use sftp.


I've attached a copy of cygcheck.out from the server where this is 
happening.



That sounds like a pretty  workaround.

Just setting the PATH to include cygwin's bin directory is likely to
work better.  I know that someone in that thread said that they did that
already but I'm not convinced that they really knew what they were
doing.

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


  


Except, cygwin\bin was already in the path as indicated in the 
cygcheck.out I attached. It doesn't explain why users belonging to the 
Local Administrators group would be able to maintain an SFTP 
connection while non-Administrators would get dropped immediately 
following authentication.


I just reconfirmed. I left cygwin\bin in the path and took the DLLs 
back out of cygwin\usr\sbin. Non-Administrator users are again dropped 
immediately after authentication.


Here's the sftp debug output with the DLLs removed from 
cygwin\usr\sbin on the server


d...@vorlon ~ $ sftp -v @
Connecting to ...
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to  [xx.xx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /home/dlim/.ssh/id_rsa type -1
debug1: identity file /home/dlim/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in /home/dlim/.ssh/known_hosts:21
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: 
publickey,password,keyboard-interactive

debug1: Next authentication method: publickey
debug1: Trying private key: /home/dlim/.ssh/id_rsa
debug1: Trying private key: /home/dlim/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: 
publickey,password,keyboard-interactive

debug1: Next authentication method: password
@'s password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessi...@openssh.com
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype e...@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 1584, received 2104 bytes, in 1.6 seconds
Bytes per second: sent 991.7, received 1317.2
debug1: Exit status 128
Connection closed


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


More information about the problem. Having to copy all of the DLLs from 
cygwin\bin to cygwin\usr\sbin is overkill. I started removing DLL copies 
from cygwin\usr\sbin until non-admin users started getting dropped from 
sftp after authentication. I was able to remove all of the DLLs except 
cygwin1.dll. As soon as I removed cygwin1.dll from cygwin\usr\sbin 
non-admin users started getting dropped from sftp sessions immediately 
after authentication again.




--
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: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Christopher Faylor
On Sun, Jul 19, 2009 at 10:14:51PM -0500, Doug Lim wrote:
>On Sun, Jul 19, 2009 at 10:37:42PM -0400, Christopher Faylor wrote:
>>On Sun, Jul 19, 2009 at 08:50:47PM -0500, Doug Lim wrote:
>>>After a bit more research on the problem, I found a discussion thread
>>>on the web discussing a similar problem from 2006.  The difference is
>>>that the thread discusses scp connections dropping immediately after
>>>non-administrator authentication.
>>>
>>>http://winscp.net/forum/viewtopic.php?t=3782
>>>
>>>A response to a thread from March of this year indicates that copying
>>>all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin as a
>>>workaround.  I've copied the DLL files on my server per the workaround
>>>and now non-administrator users are able to use sftp.
>>>
>>>I've attached a copy of cygcheck.out from the server where this is
>>>happening.
>>
>>That sounds like a pretty  workaround.
>>
>>Just setting the PATH to include cygwin's bin directory is likely to
>>work better.  I know that someone in that thread said that they did
>>that already but I'm not convinced that they really knew what they were
>>doing.
>
>Except, cygwin\bin was already in the path as indicated in the
>cygcheck.out I attached.

The cygcheck.out file shows that the cygwin directory was in the PATH
when you ran the cygcheck program.  It doesn't necessarily mean that it
is the path that a service sees.

>It doesn't explain why users belonging to the Local Administrators
>group would be able to maintain an SFTP connection while
>non-Administrators would get dropped immediately following
>authentication.

Copying a bunch of DLLs to /usr/sbin doesn't explain this either.

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: OpenSSH - sftp not working for non-Administrator users

2009-07-19 Thread Doug Lim

Christopher Faylor wrote:

On Sun, Jul 19, 2009 at 10:14:51PM -0500, Doug Lim wrote:
  

On Sun, Jul 19, 2009 at 10:37:42PM -0400, Christopher Faylor wrote:


On Sun, Jul 19, 2009 at 08:50:47PM -0500, Doug Lim wrote:
  

After a bit more research on the problem, I found a discussion thread
on the web discussing a similar problem from 2006.  The difference is
that the thread discusses scp connections dropping immediately after
non-administrator authentication.

http://winscp.net/forum/viewtopic.php?t=3782

A response to a thread from March of this year indicates that copying
all of the DLL files from cygwin\usr\bin to cygwin\usr\sbin as a
workaround.  I've copied the DLL files on my server per the workaround
and now non-administrator users are able to use sftp.

I've attached a copy of cygcheck.out from the server where this is
happening.


That sounds like a pretty  workaround.

Just setting the PATH to include cygwin's bin directory is likely to
work better.  I know that someone in that thread said that they did
that already but I'm not convinced that they really knew what they were
doing.
  

Except, cygwin\bin was already in the path as indicated in the
cygcheck.out I attached.



The cygcheck.out file shows that the cygwin directory was in the PATH
when you ran the cygcheck program.  It doesn't necessarily mean that it
is the path that a service sees.
  

I added D:\cygwin\bin to the PATH via the Environment Variables button on the 
Advanced tab in the System Properties control panel applet followed by a system 
reboot after cygwin and openssh were installed. If you're suggesting that's not 
sufficient for a running service to see the updated path, then what would you 
suggest should be done differently?


It doesn't explain why users belonging to the Local Administrators
group would be able to maintain an SFTP connection while
non-Administrators would get dropped immediately following
authentication.



Copying a bunch of DLLs to /usr/sbin doesn't explain this either.

  
I don't understand and can't offer an explanation of why the workaround 
works. I can't speak to the fact that it doesn't make sense that the 
workaround should work. I only know that this isn't just theoretical. 
This is actual testing and documentation of what has and hasn't worked.

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


  




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