delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/05/14/14:32:24

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Mon, 14 May 2001 22:29:43 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.45) Personal
Reply-To: egor duda <cygwin-developers AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <32565739.20010514222943@logos-m.ru>
To: cygdev <cygwin-developers AT cygwin DOT com>
Subject: Re: secur32.dll not present on winnt 4.0 sp 5
In-reply-To: <20010514181527.U5386@cygbert.vinschen.de>
References: <72348772478 DOT 20010514174143 AT logos-m DOT ru>
<20010514161552 DOT B29465 AT cygbert DOT vinschen DOT de>
<132352071682 DOT 20010514183642 AT logos-m DOT ru>
<20010514181527 DOT U5386 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0

Hi!

Monday, 14 May, 2001 Corinna Vinschen vinschen AT redhat DOT com wrote:

CV> On Mon, May 14, 2001 at 06:36:42PM +0400, egor duda wrote:
>> Monday, 14 May, 2001 Corinna Vinschen vinschen AT redhat DOT com wrote:
>> CV> On Mon, May 14, 2001 at 05:41:43PM +0400, egor duda wrote:
>> >> for now, is it possible to conditionalize LSA stuff so that it has
>> >> been called only if secure32.dll is available?
>> 
>> CV> I have just checked in a patch. Could you please try if that
>> CV> works for you? It tests whether Secur32.dll could be loaded
>> CV> or not.
>> 
>> doesn't it fire api_fatal () in std_dll_init if LoadLibrary fails?

CV> No. The symbols are loaded with LoadDLLfuncEx(name, n, dllname, notimp)
CV> with notimp set to 1. That results in the call returning 0 and 
CV> GetLastError is set to ERROR_PROC_NOT_FOUND. I'm now checking for
CV> that and returning INVALID_HANDLE then.

no, the problem is not with LoadDllFuncEx(), but with LoadDllInit()

here's (a bit formatted) fragment from autoload.ii:

HANDLE __attribute__((section(".data_cygwin_nocopy"))) secur32_handle = __null ;
  LONG __attribute__((section(".data_cygwin_nocopy"))) secur32_here = -1L;
  int   secur32_init ()
  __asm__ ("secur32_init");
  {
    return std_dll_init (  secur32_handle, "secur32.dll",   secur32_here) ;
  }
...
__asm__ (".section .data_cygwin_nocopy,\"w\"");
__asm__ ("secur32_init_holder: .long secur32_init_and_load");
__asm__ (".text");
__asm__ ("secur32_init_and_load:");
__asm__ ("movl $cygwin_dll_func_load, secur32_init_holder");
__asm__ ("call secur32_init"); ;
__asm__ ("jmp cygwin_dll_func_load"); 

so, std_dll_init is being called and when it fails to find dll, it calls
api_fatal(). 

the problem is not that some functions are not available from dll, but
dll itself is not available.

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019