public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 10:25 Nicolas Williams
       [not found] ` <01e401c19491$4d1d9e40$1b011212@mit.edu>
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Williams @ 2002-01-03 10:25 UTC (permalink / raw)
  To: krbdev, cygwin

I'm trying to build OpenSSH (2.9p2, for now) with Simon Wilkinson's
patches that implement the external-keyx / GSS-API extensions.

Specifically I wish to use Kerberos V as the GSS mechanism.

That means picking Heimdal or MIT krb5 as the Kerberos V implementation.

I started with MIT krb5, specifically Kfw (Kerberos for Windows).

Kfw is compiled with MSVC++ (all C).

*FAQ check: it is supposedly ok to mix Cygwin with MSVC++ built (C only) DLLs*

After writing the necessary autoconf checks for Kfw (library names
differ) and dealing with making sure that _WIN32 is defined where the
Kfw headers are included, I've gotten as far as getting a successful
link of ssh.exe. But it crashes with SIGSEGV and I'm still trying to
get a stack trace.

Looking at the dependencies of the Kfw DLLs I see that there is a
dependency on MSVCRT.DLL.

*FAQ check: MSVCRT.DLL and cygwin1.dll are mutually exclusive*

But the dependency on MSVCRT.DLL by the MIT Kfw DLLs is indirect.

QUESTION: Does the MSVCRT.DLL/cygwin1.dll mutual exclusivity apply in
          this case?

If so, then I'll give up on Kfw now and try Heimdal - unfortunately that
probably means giving up on Leash32.

QUESTION: Does the MIT krb5 stuff build on Cygwin? Kerbnet appears to
          have died some time ago...

Thanks,

Nico
--
-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 10:42 Jeffrey Altman
  2002-01-03 10:49 ` Nicolas Williams
  0 siblings, 1 reply; 12+ messages in thread
From: Jeffrey Altman @ 2002-01-03 10:42 UTC (permalink / raw)
  To: Nicolas Williams; +Cc: krbdev, cygwin

> Looking at the dependencies of the Kfw DLLs I see that there is a
> dependency on MSVCRT.DLL.
> 
> *FAQ check: MSVCRT.DLL and cygwin1.dll are mutually exclusive*
> 
> But the dependency on MSVCRT.DLL by the MIT Kfw DLLs is indirect.

What do you mean by "indirect"?  The KFW DLLs are linked to MSVCRT.DLL.

> QUESTION: Does the MSVCRT.DLL/cygwin1.dll mutual exclusivity apply in
>           this case?

More than likely the answer is 'yes'.  You can't mix C runtime
environments.  You would need to compile KRB5 and GSSAPI with Cygwin.

> If so, then I'll give up on Kfw now and try Heimdal - unfortunately that
> probably means giving up on Leash32.

It means giving up on Leash because when you build with Cygwin you
probably will not have support for the Credential Cache API.

> QUESTION: Does the MIT krb5 stuff build on Cygwin? Kerbnet appears to
>           have died some time ago...

SSH support including GSSAPI and linkage to MIT Kerberos is now in my
K95 test builds.




 Jeffrey Altman * Sr.Software Designer      C-Kermit 8.0 available now!!!
 The Kermit Project @ Columbia University   includes Telnet, FTP and HTTP
 http://www.kermit-project.org/             secured with Kerberos, SRP, and 
 kermit-support@columbia.edu                OpenSSL. Interfaces with OpenSSH

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 10:56 Jeffrey Altman
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey Altman @ 2002-01-03 10:56 UTC (permalink / raw)
  To: Nicolas Williams; +Cc: krbdev, cygwin

> > > But the dependency on MSVCRT.DLL by the MIT Kfw DLLs is indirect.
> > 
> > What do you mean by "indirect"?  The KFW DLLs are linked to MSVCRT.DLL.
>
> That the resulting OpenSSH Makefile does not reference it...

That is irrelevant to the problem.  The problem is that the two C Run
Time environments trip over each other since they both attempt to hook
the same OS routines.

You will also have a problem if memory allocated in one is free'd
realloc'd by the other.


> > SSH support including GSSAPI and linkage to MIT Kerberos is now in my
> > K95 test builds.
> 
> Did you build Kfw with Cygwin?

I do not use Cygwin.  I compile with MSVC.



 Jeffrey Altman * Sr.Software Designer      C-Kermit 8.0 available now!!!
 The Kermit Project @ Columbia University   includes Telnet, FTP and HTTP
 http://www.kermit-project.org/             secured with Kerberos, SRP, and 
 kermit-support@columbia.edu                OpenSSL. Interfaces with OpenSSH

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 12:10 Jeffrey Altman
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey Altman @ 2002-01-03 12:10 UTC (permalink / raw)
  To: Danilo Almeida; +Cc: Nicolas Williams, krbdev, cygwin

Danilio

There are other issues that can become problems when you are using
runtime environments from different vendors.  Both runtime is going to
try to simulate Unix style signal handling by installing Exception
Handlers.  When mixing debug and non-debug dlls on Windows this is not
a problem because the rest of the environment is the same.

This will not be true when mixing CygWin and MSVCRT.DLL.  

- Jeff


> Nico,
> 
> Mixing CRTs can work.  It depends on whether the code in question does not
> expose CRT APIs.  In general, krb5 tends to be pretty good about it...or at
> least, I have tried to clean up some of the problems in that area.  (On
> Windows, you might have a krb5 dll using the debug CRT while the app uses a
> non-debug CRT.)
> 
> If the OpenSSH code is misusing the gssapi (i.e., using free directly
> instead of calling apropriate gssapi routines), then you'll have problems.
> Otherwise, I tend to think that you should generally be ok.  The KfW code
> will use MSVCRT while the OpenSSH code uses cygwin.  Since each is
> encapsulated in separate DLLs, they can call same-name CRT functions from
> different DLLs w/o any problems.  Again, the problem happens if MSVCRT
> allocated memory (opens a file, whatever) and cygwin tries to deallocate (or
> use the file handle opened by MSVCRT, etc).  That should not happen with
> well-designed APIs that do not use CRT abstractions in the API.
> 
> - Danilio
> 
> ----- Original Message -----
> From: "Nicolas Williams" <Nicolas.Williams@ubsw.com>
> To: <krbdev@MIT.EDU>; <cygwin@cygwin.com>
> Sent: Thursday, January 03, 2002 1:24 PM
> Subject: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on
> Cygwin...
> 
> 
> I'm trying to build OpenSSH (2.9p2, for now) with Simon Wilkinson's
> patches that implement the external-keyx / GSS-API extensions.
> 
> Specifically I wish to use Kerberos V as the GSS mechanism.
> 
> That means picking Heimdal or MIT krb5 as the Kerberos V implementation.
> 
> I started with MIT krb5, specifically Kfw (Kerberos for Windows).
> 
> Kfw is compiled with MSVC++ (all C).
> 
> *FAQ check: it is supposedly ok to mix Cygwin with MSVC++ built (C only)
> DLLs*
> 
> After writing the necessary autoconf checks for Kfw (library names
> differ) and dealing with making sure that _WIN32 is defined where the
> Kfw headers are included, I've gotten as far as getting a successful
> link of ssh.exe. But it crashes with SIGSEGV and I'm still trying to
> get a stack trace.
> 
> Looking at the dependencies of the Kfw DLLs I see that there is a
> dependency on MSVCRT.DLL.
> 
> *FAQ check: MSVCRT.DLL and cygwin1.dll are mutually exclusive*
> 
> But the dependency on MSVCRT.DLL by the MIT Kfw DLLs is indirect.
> 
> QUESTION: Does the MSVCRT.DLL/cygwin1.dll mutual exclusivity apply in
>           this case?
> 
> If so, then I'll give up on Kfw now and try Heimdal - unfortunately that
> probably means giving up on Leash32.
> 
> QUESTION: Does the MIT krb5 stuff build on Cygwin? Kerbnet appears to
>           have died some time ago...
> 
> Thanks,
> 
> Nico
> 
> 
> 



 Jeffrey Altman * Sr.Software Designer      C-Kermit 8.0 available now!!!
 The Kermit Project @ Columbia University   includes Telnet, FTP and HTTP
 http://www.kermit-project.org/             secured with Kerberos, SRP, and 
 kermit-support@columbia.edu                OpenSSL. Interfaces with OpenSSH

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 12:32 Jeffrey Altman
  2002-01-03 12:37 ` Nicolas Williams
  0 siblings, 1 reply; 12+ messages in thread
From: Jeffrey Altman @ 2002-01-03 12:32 UTC (permalink / raw)
  To: Nicolas Williams; +Cc: Danilo Almeida, krbdev, cygwin

Or just try to compile Krb5 with Cygwin.

> Then again, tracing this with GDB makes me believe Jeff... :/
> 
> Oh well. I'll have to give Heimdal a try then...
> 
> Nico


 Jeffrey Altman * Sr.Software Designer      C-Kermit 8.0 available now!!!
 The Kermit Project @ Columbia University   includes Telnet, FTP and HTTP
 http://www.kermit-project.org/             secured with Kerberos, SRP, and 
 kermit-support@columbia.edu                OpenSSL. Interfaces with OpenSSH

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin...
@ 2002-01-03 13:38 Jeffrey Altman
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey Altman @ 2002-01-03 13:38 UTC (permalink / raw)
  To: Nicolas Williams; +Cc: Danilo Almeida, krbdev, cygwin

> On Thu, Jan 03, 2002 at 03:32:01PM -0500, Jeffrey Altman wrote:
> > Or just try to compile Krb5 with Cygwin.
> 
> Has anyone done this in recent times? I have a feeling it won't work.
> But, hey, I could try. Still, Leash32 won't work, so I'll still need to
> find a GUI kinit.

No, you have to compile krb5 with the appropriate modifications to use
the Credential Cache API so it can use the cache stored in
krbcc32s.exe



 Jeffrey Altman * Sr.Software Designer      C-Kermit 8.0 available now!!!
 The Kermit Project @ Columbia University   includes Telnet, FTP and HTTP
 http://www.kermit-project.org/             secured with Kerberos, SRP, and 
 kermit-support@columbia.edu                OpenSSL. Interfaces with OpenSSH

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2002-01-03 21:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03 10:25 MIT Kfw SDK w/ Cygwin? Trying to build OpenSSH w/ GSS-API on Cygwin Nicolas Williams
     [not found] ` <01e401c19491$4d1d9e40$1b011212@mit.edu>
2002-01-03 12:18   ` Nicolas Williams
2002-01-03 12:24     ` Nicolas Williams
2002-01-03 12:38     ` Douglas E. Engert
2002-01-03 12:52       ` Nicolas Williams
2002-01-03 10:42 Jeffrey Altman
2002-01-03 10:49 ` Nicolas Williams
2002-01-03 10:56 Jeffrey Altman
2002-01-03 12:10 Jeffrey Altman
2002-01-03 12:32 Jeffrey Altman
2002-01-03 12:37 ` Nicolas Williams
2002-01-03 13:38 Jeffrey Altman

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