How to use openssl in cygwin

2006-06-05 Thread cxf

Hi,all:
   I installed the Cygwin which is the Full version.
   I write the Program as the following:
   #include 
   int  main()
   {
EVP_MD_CTX md_ctx;
unsigned int result_size;
int rv;
rv = EVP_SignInit(&md_ctx, EVP_sha1());
return rv;
   }

  It is very simple,then I compile the program using the Cygwin(the 
file name is example.c)

   gcc -c example.c
   gcc -lcrypto -o example example.o

   but the gcc give out the error:
   undefined  reference to '_EVP_sha1'
   undefined  reference to '_EVP_DigestInit'

   I have checked that the libcrypto.a is in the right way.
   I doubt whether the libcrypto.a have the function: EVP_sha1 and 
EVP_DigestInit.


   (I compile the example.c in Linux,It is OK!)




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsh with command hangs, rlogin works

2006-06-05 Thread Lars Björnfot
Andrew DeFaria wrote:
> Still nothing in /var/log/messages

No need to reboot. Just make sure the syslogd is started, it should
output somthing when it starts but nothing special when launching in.rshd.

To make sure syslog works, just

$ syslog hello
$ tail /var/log/messages

> Also, we must remember you're on XP (Home?) and I'm on 2003 Server...

Yes, XP Home at home and XP Pro at work. Same segfault on both.


> > (...) maybe chmod 600
> Hmmm... I thought that permissions had to be at least o+r

You are right. I check on my work machine where .rhosts exists
and it does have permission 644. Sorry.


> What I'm really doing is mounting /// -> /us (we have
> /us and /china for US and China users) and then I put /us/adefaria
> in the home field of /etc/passwd. Interestingly an ls -l of /us
> shows permissions of 000!

Maybe OK. Cygwin "ls -l" does not show the whole true. I guess Windows
ACL shows the truth but I try to avoid changing them. Always get
a feeling of sinking in quicksand.

Lars


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Robin Walker

--On 04 June 2006 19:06 -0500 René Berber wrote:


Robin Walker wrote:

--On 04 June 2006 16:27 -0500 René Berber wrote:

Robin Walker wrote:


In the Windows Application Log there are, for each failed connection
attempt, entries of the form:

sshd: PID : fatal: fork of unprivileged child failed.


What is you configuration in respect to privilege separation?


UsePrivilegeSeparation yes


Did you check if the rest of the configuration for using privilege
separation was done (i.e. the creation of the unprivileged user sshd, the
creation of the /var/empty directory with owner SYSTEM and all access).


Yes - all those features are correct, as made by ssh-host-config earlier 
the same day.



The error message shows that the main sshd server is running but it
cannot spawn child processes, which it always does on a new connection
(privilege or not) so the second process failure is the interesting part.
The error message doesn't show anything from that second process.


Surely, it won't show anything from the second process, because the second 
process never got created (fork failed)?


One of the frustrating things about this issue is that it is 
non-deterministic: sometimes it works, and sometimes it doesn't.  For 
instance, here is a verbose ssh client trace of three consecutive attempts, 
made within seconds of each other: the first fails (fork failure in 
Application Log), the second works, the third fails (fork failure).  Given 
that the second one worked, the basic settings in the system must be OK.


C:\Documents and Settings\rdhw>ssh -vvv 127.0.0.1
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/rdhw/.ssh/identity type -1
debug1: identity file /home/rdhw/.ssh/id_rsa type -1
debug1: identity file /home/rdhw/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer

C:\Documents and Settings\rdhw>ssh -vvv 127.0.0.1
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/rdhw/.ssh/identity type -1
debug1: identity file /home/rdhw/.ssh/id_rsa type -1
debug1: identity file /home/rdhw/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-gro

up14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour1

28,arcfour256,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED],aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour1

28,arcfour256,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED],aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED]

ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED]

ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[EMAIL PROTECTED],zlib
debug2: kex_parse_kexinit: none,[EMAIL PROTECTED],zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-gro

up14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour1

28,arcfour256,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED],aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour1

28,arcfour256,arcfour,aes192-cbc,aes256-cbc,[EMAIL PROTECTED],aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED]

ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: 
hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL PROTECTED]

ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: none,[EMAIL PROTECTED]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserve

Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Robin Walker

--On 04 June 2006 18:18 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

In the Windows Application Log there are, for each failed connection
attempt, entries of the form:

sshd: PID : fatal: fork of unprivileged child failed.


Did you try a recent snapshot?


If, by "snapshot", you mean System Restore Point, then the problems began 
too long ago for a restore point still to exist.  I have been searching for 
solutions for some months already.



Please read and follow the problem reporting guidelines found at:



I couldn't see anything there that addresses this problem.  I included a 
cygcheck output in a previous post in this thread.  I have already spent 
some months struggling with this before coming to this list, and Googled 
every likely search term.  The searches show some other users had a similar 
problem, but cured it with a rebaseall.  That worked once for me, but no 
longer.



Think about things that have changed about the time things stopped working
for you.  This includes things both a part of and external to Cygwin.


Most likely, it was a Cygwin update.  sshd worked OK during most of 2005, 
but has not worked since I updated Cygwin early in 2006.  I don't use ssh 
on a daily basis, and it took some time to notice that connections were 
failing.


Is there any way I can get a previous version of cygwin1.dll to check 
against?


--
Robin Walker (Junior Bursar), Queens' College, Cambridge CB3 9ET, UK
[EMAIL PROTECTED]  http://www.queens.cam.ac.uk/  Tel:+44 1223 335528

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Larry Hall (Cygwin)

Robin Walker wrote:

--On 04 June 2006 18:18 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

In the Windows Application Log there are, for each failed connection
attempt, entries of the form:

sshd: PID : fatal: fork of unprivileged child failed.


Did you try a recent snapshot?


If, by "snapshot", you mean System Restore Point, then the problems 
began too long ago for a restore point still to exist.  I have been 
searching for solutions for some months already.



No, I mean a recent Cygwin snapshot of the pending 1.5.20 release.  See



Think about things that have changed about the time things stopped 
working

for you.  This includes things both a part of and external to Cygwin.


Most likely, it was a Cygwin update.  sshd worked OK during most of 
2005, but has not worked since I updated Cygwin early in 2006.  I don't 
use ssh on a daily basis, and it took some time to notice that 
connections were failing.


Is there any way I can get a previous version of cygwin1.dll to check 
against?





Use setup.exe.  But backing up may not be very easy if you have other
upgraded apps that depend on new functionality in 1.5.19.


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

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to use openssl in cygwin

2006-06-05 Thread Larry Hall (Cygwin)
cxf wrote:
> Hi,all:
>I installed the Cygwin which is the Full version.
>I write the Program as the following:
>#include 
>int  main()
>{
> EVP_MD_CTX md_ctx;
> unsigned int result_size;
> int rv;
> rv = EVP_SignInit(&md_ctx, EVP_sha1());
> return rv;
>}
> 
>   It is very simple,then I compile the program using the Cygwin(the file 
> name is example.c)
>gcc -c example.c
>gcc -lcrypto -o example example.o
> 
>but the gcc give out the error:
>undefined  reference to '_EVP_sha1'
>undefined  reference to '_EVP_DigestInit'
> 
>I have checked that the libcrypto.a is in the right way.
>I doubt whether the libcrypto.a have the function: EVP_sha1 and 
> EVP_DigestInit.


A rookie mistake.  Your library is in the wrong place.  Put
it at the end, not the beginning of the line.


>(I compile the example.c in Linux,It is OK!)


That's a crutch that it's best not to make a habit of
leaning on...


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

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Robin Walker

--On 05 June 2006 08:23 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

--On 04 June 2006 18:18 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

In the Windows Application Log there are, for each failed connection
attempt, entries of the form:

sshd: PID : fatal: fork of unprivileged child failed.


Did you try a recent snapshot?


I mean a recent Cygwin snapshot of the pending 1.5.20 release.  See



Instant success with 20060604 version of cygwin1.dll

Thank you!!

--
Robin Walker (Junior Bursar), Queens' College, Cambridge CB3 9ET, UK
[EMAIL PROTECTED]  http://www.queens.cam.ac.uk/  Tel:+44 1223 335528

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: converse of cygwin_attach_handle_to_fd()?

2006-06-05 Thread Dave Korn
On 04 June 2006 00:10, Samuel Thibault wrote:

> Hi,
> 
> cygwin_attach_handle_to_fd() lets create a cygwin fd on top of a windows
> handle. When calling close() on the fd, the windows handle is closed
> too. Is there any way to close the fd without closing the underlying
> handle? (i.e. the converse of cygwin_attach_handle_to_fd(), actually)

  Well, the simple workaround would be to write a wrapper function for
cygwin_attach_handle_to_fd; the wrapper would call DuplicateHandle to get a
spare copy of the original handle and then pass that duplicated handle to
cygwin_attach_handle_to_fd instead of the original handle; that way, when you
close the fd, the duplicate of the handle is closed, entirely independently of
the original.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Please update SWIG to current version 1.3.29

2006-06-05 Thread Richard Graham
It would be helpful if the swig application distributed with
cygwin was updated to the latest version (1.3.29).

Thank you,
Richard Graham


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: converse of cygwin_attach_handle_to_fd()?

2006-06-05 Thread Brian Ford
On Sun, 4 Jun 2006, Samuel Thibault wrote:

> (i.e. the converse of cygwin_attach_handle_to_fd(), actually)

get_osfhandle()?  I'm not sure of its close semantics, though.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsh with command hangs, rlogin works

2006-06-05 Thread Andrew DeFaria

Lars Björnfot wrote:

Andrew DeFaria wrote:

Still nothing in /var/log/messages
No need to reboot. Just make sure the syslogd is started, it should 
output somthing when it starts but nothing special when launching in.rshd.


To make sure syslog works, just

$ syslog hello
$ tail /var/log/messages
I set up syslogd again. I encountered the following problems. First the 
syslogd-config script output an error "setfacl: No such file or 
directory". This turns out to be from the command: setfacl -m 
u:system:rwx /dev. Apparently /dev isn't a file or directory on 2003!


Next I tried starting the syslogd service and it wouldn't work. I had 
this problem before when I set up syslogd on this server but since 
nothing ever got written to /var/log/messages I removed it. Turns out it 
has a problem creating a socket file in /dev. By default it tries to 
create /dev/log and it can't. Syslogd does have a -p paramter to specify 
an alternate place for this socket file. I used -p /var/run/syslogd. I 
had to hack that into the registry.


As for /var/log/messages I have:

[ccadmin] sons-sc-cc:tail -f /var/log/messages
Jun  4 23:12:16 SONS-SC-CC syslogd: restart
Jun  4 23:12:29 SONS-SC-CC syslogd: exiting on signal 15
Jun  4 23:12:44 SONS-SC-CC syslogd: restart

Executing syslog hello in another window just gives me a command prompt 
back. Nothing gets written to /var/log/messages!


Wait, I take that back, somewhat... While the syslog hello doesn't put 
anything in /var/log/messages an rsh localhost id does:


[ccadmin] sons-sc-cc:tail -f /var/log/messages
Jun  4 23:12:16 SONS-SC-CC syslogd: restart
Jun  4 23:12:29 SONS-SC-CC syslogd: exiting on signal 15
Jun  4 23:12:44 SONS-SC-CC syslogd: restart
Jun  5 07:36:13 SONS-SC-CC kernel: in.rshd[5168]: segfault at 0003 
rip 0022E4E5 rsp 0022E454 error 4
Jun  5 07:45:01 SONS-SC-CC kernel: in.rshd[8132]: segfault at 0003 
rip 0022E4E5 rsp 0022E454 error 4



Also, we must remember you're on XP (Home?) and I'm on 2003 Server...

Yes, XP Home at home and XP Pro at work. Same segfault on both.


(...) maybe chmod 600

Hmmm... I thought that permissions had to be at least o+r
You are right. I check on my work machine where .rhosts exists and it 
does have permission 644. Sorry.
What I'm really doing is mounting /// -> /us (we have 
/us and /china for US and China users) and then I put /us/adefaria in 
the home field of /etc/passwd. Interestingly an ls -l of /us shows 
permissions of 000!


Maybe OK. Cygwin "ls -l" does not show the whole true. I guess Windows 
ACL shows the truth but I try to avoid changing them. Always get a 
feeling of sinking in quicksand.
Another data point I figured out. Currently I can rsh localhost but I 
have to supply a password. This works. "rsh localhost id" hangs. If I 
add localhost to /etc/hosts.equiv or if I remove the password for the 
user I am rsh'ing as, both methods of allowing passwordless login, I get 
"Switching to user failed":


[ccadmin] sons-sc-cc:rsh localhost
Password:
Last login: Mon Jun  5 07:34:14 from SONS-SC-CC.SALIRA.COM
CYGWIN_NT-5.2 SONS-SC-CC 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
[ccadmin] sons-sc-cc:exit
logout
rlogin: connection closed.
[ccadmin] sons-sc-cc:echo "localhost" > /etc/hosts.equiv
[ccadmin] sons-sc-cc:rsh localhost
Switching to user ccadmin failed!
rlogin: connection closed.
[ccadmin] sons-sc-cc:

Putting "localhost" in ~/.rhosts does nothing - I'm still prompted for a 
password.


One interesting thing is that I still do not understand how it works at 
all. The inetd service is running as Local System Account. From what 
I've read this Local System Account does not have enough privileges on 
2003 Server to perform the operation of switching user. Yet in the first 
case above it manages to do that. How?


It seems whenever I configure it so allow passwordless login (adding 
localhost to /etc/hosts.equiv or removing the password from /etc/passwd) 
I fail with "Switching to user failed".


The sshd_server user, created by the ssh-host-config script, should have 
enough privileges to switch user so I changed inetd to start through the 
sshd_server user. Now I get:


[ccadmin] sons-sc-cc:rsh localhost
Password:
Last login: Mon Jun  5 07:37:15 from SONS-SC-CC.SALIRA.COM
CYGWIN_NT-5.2 SONS-SC-CC 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
login: no shell: /bin/bash: Permission denied
rlogin: connection closed.

What's the deal here?
--
Andrew DeFaria 
When you open a new bag of cotton balls, are you supposed to throw the 
top one away?



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



problem building ping

2006-06-05 Thread Socaciu, Dan \(Com US\)
I downloaded the ping source and I'm simply trying to build it.
When I try to make it this is the error message i'm getting:
 
$ make
/bin/sh: mdtype: command not found
/bin sh: ostype: command not found
+ '[' '!' -d - ']'
++ find Makefile -newer -/Makefile -print
+ '[' -n Makefile ']'
+ make - --unix config
make[1]: Entering directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
/bin/sh: mdtype: command not found
/bin/sh: ostype: command not found
+ mkdir -
mkdir: cannot create directory `-': File exists
+ chmod ug+w -
+ ln -s ../ping.c -
ln: creating symbolic link `-/ping.c' to `../ping.c': File exists
+ sed -e '/^all:/d' Makefile
+ chmod ug+w -/Makefile
chmod: invalid option -- /
Try `chmod --help' for more information.
+ cd -
/bin/sh: line 0: cd: OLDPWD not set
+ make - --unix -w depend
make[2]: Entering directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
cc -M ping.c | sed 's/\.o//' | \
awk ' { if ($1 != prev) \
{ if (rec != "") print rec; rec = $0; prev = $1; } \
else { if (length(rec $2) > 78) { print rec; rec = $0; } \
else rec = rec " " $2 } } \
END { print rec } ' >> makedep;
echo '/^# DO NOT DELETE THIS LINE/+2,$d' >eddep;
echo '$r makedep' >>eddep;
echo 'w' >>eddep;
cp Makefile Makefile.bak;
ed - Makefile < eddep;
rm eddep makedep;
echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile;
echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile;
echo '# see make depend above' >> Makefile;
make[2]: Leaving directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
make[1]: Leaving directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
+ cd -
/bin/sh: line 0: cd: OLDPWD not set
+ make - --unix ping
make[1]: Entering directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
rm -f ping.o; cc -O -c ping.c
ping.c: In function `main':
ping.c:183: warning: passing arg 2 of `signal' from incompatible pointer
type
ping.c:184: warning: passing arg 2 of `signal' from incompatible pointer
type
ping.c:205: warning: passing arg 2 of `select' from incompatible pointer
type
ping.c:208: warning: passing arg 5 of `recvfrom' from incompatible
pointer type
ping.c: In function `catcher':
ping.c:246: warning: passing arg 2 of `signal' from incompatible pointer
type
ping.c: In function `pinger':
ping.c:268: error: dereferencing pointer to incomplete type
ping.c:268: error: `ICMP_ECHO' undeclared (first use in this function)
ping.c:268: error: (Each undeclared identifier is reported only once
ping.c:268: error: for each function it appears in.)
ping.c:269: error: dereferencing pointer to incomplete type
ping.c:270: error: dereferencing pointer to incomplete type
ping.c:271: error: dereferencing pointer to incomplete type
ping.c:272: error: dereferencing pointer to incomplete type
ping.c:283: error: dereferencing pointer to incomplete type
ping.c: In function `pr_pack':
ping.c:361: error: `ICMP_MINLEN' undeclared (first use in this function)
ping.c:364: error: aggregate value used where an integer was expected
ping.c:364: error: aggregate value used where an integer was expected
ping.c:364: error: aggregate value used where an integer was expected
ping.c:364: error: aggregate value used where an integer was expected
ping.c:364: error: aggregate value used where an integer was expected
ping.c:364: error: incompatible type for argument 1 of `__ntohl'
ping.c:369: error: dereferencing pointer to incomplete type
ping.c:369: error: `ICMP_ECHOREPLY' undeclared (first use in this
function)
ping.c:371: error: aggregate value used where an integer was expected
ping.c:371: error: aggregate value used where an integer was expected
ping.c:371: error: aggregate value used where an integer was expected
ping.c:371: error: aggregate value used where an integer was expected
ping.c:371: error: aggregate value used where an integer was expected
ping.c:371: error: incompatible type for argument 1 of `__ntohl'
ping.c:372: error: dereferencing pointer to incomplete type
ping.c:372: error: dereferencing pointer to incomplete type
ping.c:372: error: dereferencing pointer to incomplete type
ping.c:380: error: dereferencing pointer to incomplete type
ping.c:384: error: dereferencing pointer to incomplete type
ping.c:398: error: dereferencing pointer to incomplete type
make[1]: *** [ping.o] Error 1
make[1]: Leaving directory `/cygdrive/c/cygwin/usr/src/ping-1.0'
make: [submake] Error 2 (ignored)
 
 
I think it might be because it can't properly find the header files it's
looking for.
I'm wondering if there's something I missed with the cygwin environment.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: problem building ping

2006-06-05 Thread Dave Korn
On 05 June 2006 16:01, Socaciu, Dan (Com US) wrote:

> I downloaded the ping source and I'm simply trying to build it.
> When I try to make it this is the error message i'm getting:
> 
> $ make

  You aren't doing it right at all.  Use setup.exe to install the source for
ping; use the build script that comes with the source to build it.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: window resizing not updating COLUMNS and LINES

2006-06-05 Thread mwoehlke

Ehud Karni wrote:

On  Wed, 31 May 2006 18:47:24 -0500, mwoehlke wrote:

'export COLUMNS' is needed for 'printenv COLUMNS' to work,
since in the printenv case you need the variable to be
transferred to the child printenv process.

Ok, that makes sense, although my understanding is that if the child
process is 'bash' (including a script run by bash), then it will have a
non-exported copy of the var set correctly. Or rather, it would/should
if this was working at all.



[snip]

My conclusions:

Both rxvt and xterm do their job properly.


Hmm... then I guess Konsole (using ssh) is broken?
Here is what I got from an SSH session using Konsole:

$ stty -a | head -n 1 ; echo $LINES $COLUMNS
speed 38400 baud; rows 71; columns 197; line = 0;

(change the window size)
$ stty -a | head -n 1 ; echo $LINES $COLUMNS
speed 38400 baud; rows 69; columns 196; line = 0;

(change the window size back)
$ stty -a | head -n 1 ; echo $LINES $COLUMNS
speed 38400 baud; rows 71; columns 197; line = 0;

$

...as you can see, in this instance they never worked at all. Seems 
there is an issue with bash being told to update these vars. It doesn't 
work when bash starts up, nor does it work when Konsole is resized, but 
apparently it works if rxvt/xterm is resized (I assume you are running 
both programs locally?).



The export is not needed (LINES and COLUMNS are local variables).
The stty does not set these vars. (both tested separately, not shown).


Right.


The bash variables are not set until the window change size
(until bash gets the SIGWINCH signal ? ).

Since it seems to work fine (almost), I guess the problem is with
cygwin1.dll 1.5.19.


Yup, must be something like that.


BTW. On linux (locally compiled bash) the LINES & COLUMNS are set
 even before changing window size.


I tried (all testing done with Konsole):
- local Linux box
- remote Linux box via ssh
- remote Solaris box via ssh
- remote HP-UX box via telnet
...and all worked as expected.

--
Matthew
Lions and tigers and HIPPOS! Everyone needs a hippo!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Larry Hall (Cygwin)

Robin Walker wrote:

--On 05 June 2006 08:23 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

--On 04 June 2006 18:18 -0400 "Larry Hall (Cygwin)" wrote:


Robin Walker wrote:

In the Windows Application Log there are, for each failed connection
attempt, entries of the form:

sshd: PID : fatal: fork of unprivileged child failed.


Did you try a recent snapshot?


I mean a recent Cygwin snapshot of the pending 1.5.20 release.  See



Instant success with 20060604 version of cygwin1.dll

Thank you!!



I'm glad I could help.

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

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



w32-shell-execute function definition is void

2006-06-05 Thread Mark Fisher

i cannot seem to be able to use/find w32-shell-execute.
i'm using emacs v21.3.50.1, but it was the same under a
previous version (v21.2.13).

i've tried moving my .emacs and starting up clean, but it
is just always comes back with the function definition
being void if i try to excecute anything that uses this
function. Typing "M-x w32" and hitting tab comes back
empty (No match).

i tried compiling the source version of 21.3.50.2 but i
get the errors mentioned elsewhere with bootstrap-emacs
causing a segmentation fault after altering the souce
for the emacs/d_ino issue against cygwin 1.5.19-4,
but browsing the source i can see the w32-shell-execute
method is in the source, but i just don't seem to be able
to ever get it to be recognised.

I mostly use emacs-X11, but i've just tested it with the non
x11 binary distribution from installing with setup.exe and that
has the same problem.

can anyone help me understand why this fails?
is there something i'm missing about the cywin build of emacs?

thanks,
mark

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd: fork of unprivileged child failed

2006-06-05 Thread Robin Walker

--On 05 June 2006 14:23 +0100 Robin Walker wrote:


Instant success with 20060604 version of cygwin1.dll


I spoke too soon.  When I restored "UsePrivilegeSeparation yes" and 
restarted Windows, ssh connections failed again.  This time the client log 
was:


C:\Documents and Settings\rdhw>ssh -vv 127.0.0.1
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/rdhw/.ssh/identity type -1
debug1: identity file /home/rdhw/.ssh/id_rsa type -1
debug1: identity file /home/rdhw/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent

... and there it hung, for ever.  There were three sshd processes also 
doing nothing.  No errors appeared in the Application Event Log.


--
Robin Walker (Junior Bursar), Queens' College, Cambridge CB3 9ET, UK
[EMAIL PROTECTED]  http://www.queens.cam.ac.uk/  Tel:+44 1223 335528

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Populating /var/run/utmp?

2006-06-05 Thread mwoehlke
I would like to use 'w' on my Cygwin installation. I found 
http://cygwin.com/ml/cygwin/2001-09/msg01177.html, but it only seems to 
work on one of my computers:


$ echo $CYGWIN
binmode tty ntsec
$ w
 13:03:11 up 5 days, 22:30,  0 users,  load average: 0.00, 0.00, 0.00
USER TTYLOGIN@   IDLE   JCPU   PCPU WHAT
$

Is there a different work-around other than setting CYGWIN=tty? (Note 
that I am having the same *symptom*, /var/run/utmp is empty).


--
Matthew
Lions and tigers and HIPPOS! Everyone needs a hippo!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Populating /var/run/utmp?

2006-06-05 Thread Brian Dessent
mwoehlke wrote:

> I would like to use 'w' on my Cygwin installation. I found
> http://cygwin.com/ml/cygwin/2001-09/msg01177.html, but it only seems to
> work on one of my computers:
> 
> $ echo $CYGWIN
> binmode tty ntsec
> $ w
>   13:03:11 up 5 days, 22:30,  0 users,  load average: 0.00, 0.00, 0.00
> USER TTYLOGIN@   IDLE   JCPU   PCPU WHAT
> $

'w' works fine for me without having "tty" in $CYGWIN.  But that's
because I use rxvt.  If I set CYGWIN=tty and then start "bash -li" then
"w" also shows the logged on user.  Are you sure you're not trying to
set CYGWIN=tty after the first shell has already initialized?  It won't
work if you do that, it has to be set before.

(BTW, adding "ntsec" to $CYGWIN is a waste of time, as this has been the
default for many years.)

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Populating /var/run/utmp?

2006-06-05 Thread mwoehlke

Brian Dessent wrote:

mwoehlke wrote:


I would like to use 'w' on my Cygwin installation. I found
http://cygwin.com/ml/cygwin/2001-09/msg01177.html, but it only seems to
work on one of my computers: [snip]


Are you sure you're not trying to
set CYGWIN=tty after the first shell has already initialized?  It won't
work if you do that, it has to be set before.


Hmm... no I'm not sure :-). I am going to try with CYGWIN=tty set in the 
registry (ala Control Panel->System->Advanced->E10t Variables)... that 
seems to work for "on the glass" sessions but I will need to restart 
sshd to test those, and I'm currently using some of those sessions.


Seems to work on *one* computer, anyway.

Thanks...

--
Matthew
Lions and tigers and HIPPOS! Everyone needs a hippo!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsh with command hangs, rlogin works

2006-06-05 Thread Lars Björnfot
Andrew DeFaria wrote:
> Apparently /dev isn't a file or directory on 2003!

That's very strange as syslogd-config creates the dir and then
tests if it exists.

> Executing syslog hello in another window just gives me a command
> prompt back. Nothing gets written to /var/log/messages!

Normal with no output to the shell.
If no output to messages file then you can try raising the priority (-p).
Also check setting the level in /etc/syslogd.conf.

> Jun 5 07:45:01 SONS-SC-CC kernel: in.rshd[8132]: segfault at 0003
rip 0022E4E5 rsp 0022E454 error 4

This line proves that syslogd works. Also that we have the same
problem (in.rshd segfault).


> [ccadmin] sons-sc-cc:echo "localhost" > /etc/hosts.equiv
> [ccadmin] sons-sc-cc:rsh localhost
> Switching to user ccadmin failed!
>
> (snip) Yet in the first case above it manages to do that. How?

Beats me. It does not happen to me. But I haven't had time to
try it on 2003 yet.

> login: no shell: /bin/bash: Permission denied

Beats me again... sorry.

The only thing I can think of is serious problems with Windows ACL
settings, like in the parent (or grand parent's) folder having a
bad setting that applies recursively...

Or problems with mount points, so that you don't really have /
where you thing (like when /dev does not exist). Does the mounts
exists for all the users?

Or the user is obsoleted in /etc/password (there is a mkpasswd
command one occationally has to run).

Lars



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Rxvt resize problem

2006-06-05 Thread Cheetah

I just upgraded my cygwin rxvt package from what I think was a
2.7.10-something version to 20050409-2, and am now experiencing some
problems with terminal resizing.

Prior to the upgrade, changing the font size in rxvt would
occaisonally lead to it repositioning the window off screen, but only
very occaisonally.  Now it does it every time.  I've also noticed that
it does this if I resize the terminal with "echo -ne
'\e[8;${rows};${cols}t'".

Using Spy++, I determined that the window is being positioned at
+32767+32767, which I suppose is suggestive.  Searching through the
rxvt source for SHRT_MAX, 32767, and some other things that came to
mind didn't produce any hits.

I'm using rxvt in native win32 mode, not via an X server.

--
   -- Cheetah

PS: Please CC me on replies

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] Updated: apr1-1.2.7-1 and libapr1, aprutil1-1.2.7-1 and libaprutil1

2006-06-05 Thread Max Bowsher
APR and APR-util, portability and miscellaneous utility libraries,
have been updated in the Cygwin net distribution to version 1.2.7-1.

This is a routine upstream patch release update.

Max Bowsher.

-- 

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.

If you have questions or comments, please send them to the Cygwin
mailing list at: cygwin@cygwin.com .  I would appreciate it if you would
use this mailing list rather than emailing me directly.

If you want to make a point or ask a question, the Cygwin mailing list
is the appropriate place.  This includes ideas and comments about the
setup utility or Cygwin in general.

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

[EMAIL PROTECTED]

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

http://sources.redhat.com/lists.html#unsubscribe-simple

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




signature.asc
Description: OpenPGP digital signature


Warning to use mkpasswd

2006-06-05 Thread Mister Fred Ma

Using an administrator account, I installed cygwin & sshd for all
users on Windows XP.  The administrator account is local to the
machine, while my nonadministrator account is a domain power user
account.  When I launch a cygwin bash shell as administrator, things
are fine.  When I launch it as nonadministrator, I get the message

  Your group is currently "mkpasswd".  This indicates that
  the /etc/passwd (and possibly /etc/group) files should be rebuilt.
  See the man pages for mkpasswd and mkgroup then, for example, run
  mkpasswd -l [-d] > /etc/passwd
  mkgroup  -l [-d] > /etc/group
  Note that the -d switch is necessary for domain users.

Here is what I did to create /etc/passwd and /etc/group.

As administrator, I did

  mkpasswd -l >| /etc/passwd
  mkgroup -l >| /etc/group

As nonadministrator, I then did

  mkpasswd -d | ssh [EMAIL PROTECTED] "cat >> /etc/passwd"
  mkgroup -d | ssh [EMAIL PROTECTED] "cat >> /etc/group"

As an indication of proper functionality, I noted that I can
successfully log in using

  ssh [EMAIL PROTECTED]
  ssh [EMAIL PROTECTED]

Is there anything further I can do to avoid the warning message
at the start of this posting?  As a possible clue, I noticed that
when I log onto Windows as nonAdministrator and start cygwin bash,
my home diretory ~ is

  /c/Documents and Settings/NonAdminAccount

Here, c:\ is mounted as /c.  When I ssh into
[EMAIL PROTECTED], however, ~ becomes /home/NonAdminAccount,
which is c:\cygwin\home\NonAdminAccount.

Fred
--
cygcheck -cvs output, as queried from NonAdminAccount
--
Cygwin Package Information
Last downloaded files to: C:\Documents and
Settings\AdminAccount\Desktop\Goodies\Cygwin
Last downloaded files from: http://mirror.cpsc.ucalgary.ca/mirror/cygwin.com

Package  VersionStatus
_update-info-dir 00399-1OK
a2ps 4.13-1 OK
alternatives 1.3.20a-2  OK
ash  20040127-3 OK
aspell   0.50.3-1   OK
aspell-en0.51.0-1   OK
atk  1.9.1-1OK
atk-runtime  1.9.1-1OK
base-files   3.7-1  OK
base-passwd  2.2-1  OK
bash 3.1-6  OK
binutils 20050610-1 OK
bzip21.0.3-1OK
cabextract   1.1-1  OK
Empty package clear
clear1.0-2  OK
coreutils5.94-1 OK
cron 3.0.1-19   OK
crypt1.1-1  OK
ctags5.5-4  OK
cvs  1.11.17-1  OK
cygrunsrv1.16-1 OK
cygutils 1.3.0-1OK
cygwin   1.5.19-4   OK
cygwin-doc   1.4-3  OK
ddd  3.3.9-1OK
diffutils2.8.7-1OK
ed   0.2-1  OK
editrights   1.01-1 OK
enscript 1.6.4-1OK
epstool  3.08-1 OK
expat1.95.8-1   OK
fftw33.0.1-2OK
file 4.16-1 OK
findutils4.2.27-1   OK
fontconfig   2.2.2-1OK
freeglut 2.2.0-1OK
freetype22.1.9-1OK
gawk 3.1.5-4OK
Empty package gcc
gcc  3.4.4-1OK
gcc-core 3.4.4-1OK
gcc-g++  3.4.4-1OK
gcc-mingw-core   20050522-1 OK
gcc-mingw-g++20050522-1 OK
gdb  20041228-3 OK
gdbm 1.8.3-7OK
gettext  0.14.5-1   OK
ghostscript  8.50-1 OK
ghostscript-base 8.50-1 OK
ghostscript-x11  8.50-1 OK
glib22.6.6-2OK
glib2-runtime2.6.6-2OK
gnuplot  4.0.0-1OK
GraphicsMagick   1.0.6-1OK
grep 2.5.1a-2   OK
groff1.18.1-2   OK
gtk2-x11 2.6.10-1   OK
gtk2-x11-runtime 2.6.10-1   OK
gv   3.6.1-1OK
gvim 6.4-1  OK
gzip 1.3.5-2OK
ImageMagick  6.0.4-1OK
jasper   1.701.0-1  OK
jbigkit  1.5-3  OK
lapack   3.0-5  OK
lcms 1.14-1 OK
less 381-1  OK
lesstif  0.93.94-2  OK
libaspell15  0.50.3-1   OK
libbz2_1 1.0.3-1OK
libcharset1  1.9.2-2OK
libdb4.2 

Re: Warning to use mkpasswd

2006-06-05 Thread Larry Hall (Cygwin)

Mister Fred Ma wrote:

Using an administrator account, I installed cygwin & sshd for all
users on Windows XP.  The administrator account is local to the
machine, while my nonadministrator account is a domain power user
account.  When I launch a cygwin bash shell as administrator, things
are fine.  When I launch it as nonadministrator, I get the message

  Your group is currently "mkpasswd".  This indicates that
  the /etc/passwd (and possibly /etc/group) files should be rebuilt.
  See the man pages for mkpasswd and mkgroup then, for example, run
  mkpasswd -l [-d] > /etc/passwd
  mkgroup  -l [-d] > /etc/group
  Note that the -d switch is necessary for domain users.

Here is what I did to create /etc/passwd and /etc/group.

As administrator, I did

  mkpasswd -l >| /etc/passwd
  mkgroup -l >| /etc/group

As nonadministrator, I then did

  mkpasswd -d | ssh [EMAIL PROTECTED] "cat >> /etc/passwd"
  mkgroup -d | ssh [EMAIL PROTECTED] "cat >> /etc/group"

As an indication of proper functionality, I noted that I can
successfully log in using

  ssh [EMAIL PROTECTED]
  ssh [EMAIL PROTECTED]

Is there anything further I can do to avoid the warning message
at the start of this posting?  As a possible clue, I noticed that
when I log onto Windows as nonAdministrator and start cygwin bash,
my home diretory ~ is

  /c/Documents and Settings/NonAdminAccount

Here, c:\ is mounted as /c.  When I ssh into
[EMAIL PROTECTED], however, ~ becomes /home/NonAdminAccount,
which is c:\cygwin\home\NonAdminAccount.



'ssh' uses the information in your '/etc/passwd' file to determine your
home directory.  You can use the '-h' flag to mkpasswd to set this as
you desire, if the default is not what you want.



Fred
--
cygcheck -cvs output, as queried from NonAdminAccount
--


Please don't append this information,

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

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/