Mailing List Archive



Back to the month index Back to the list index

Jens Vonderheide (vonderheide@rz.rwth-aachen.de)
Thu, 13 Nov 1997 14:00:28 +0100


Date: Thu, 13 Nov 1997 14:00:28 +0100
From: Jens Vonderheide <vonderheide@rz.rwth-aachen.de>
Subject: msqlTimeToUnixTime
Message-id: <346AF9EC.28E4@rz.rwth-aachen.de>

Hi,

I am using mSQL 2.0.3 on a Sun Ultra 1 running Solaris 2.6. My problem
is that msqlTimeToUnixTime is off by one hour. E.g.
msqlTimeToUnixTime("00:00:00") return -3600, ("01:00:00") returns 0.

Jens Vonderheide
Network Operations Center
University of Technology Aachen, Germany
From paul@cyber2.cyberchn.com.hk Thu Nov 13 09:41:47 1997
Received: from cyber2.cyberchn.com.hk (paul@[202.80.11.2])
        by services.bunyip.com (8.8.5/8.8.5) with ESMTP id JAA03381
        for <msql-list@services.bunyip.com>; Thu, 13 Nov 1997 09:41:44 -0500 (EST)
Received: (from Received: (from paul@localhost) by cyber2.cyberchn.com.hk (8.7.3/8.6.9) id WAA19376; Thu, 13 Nov 1997 22:36:39 +0800
Date: Thu, 13 Nov 1997 22:36:35 +0800 (HKT)
From: paul lee <paul@cyber2.cyberchn.com.hk>
To: msql-list@services.bunyip.com
Subject: Re: bug in acl parsing in msql2.0.3
In-Reply-To: <199711111654.AA012657246@dutind4.twi.tudelft.nl>
Message-ID: <Pine.LNX.3.91.971113221522.19199C-100000@cyber2.cyberchn.com.hk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dear all,

I came across same problem too. I've got a C problem working fine with
version 2.0.1 no longer worked during the debug mentioned.

BTW, I observed 2 additional problem with the user nobody.
1. I've got another CGI program written in C and the web server is
apache 1.2.1. The CGI program was called under nobody. It caused an error of
"Unknown username, Who are you"
The problem is cleared if the program is set to 4755 and the owner is root.

2. Problem with mod_auth_msql.c module and user nobody
It was observed that if the mod_auth_msql.c is set to connect to localhost,
msql generates error, cannnot connect to localhost error. The problem can
be cleared in 2 ways.
a) apache is run under another user except nobody
b) the host is specified as the domain name i.e. using tcp/ip rather
than /dev/msql.

I wonder these are also bugs with msql.

Thanks for your advice and help

Regards
Paul Lee
Cyber Channel Int'l Ltd

On Tue, 11 Nov 1997, Kees Lemmens wrote:

> Forwarded message:
> >From lemmens@dutind4.twi.tudelft.nl Tue Nov 11 17:51:02 MET 1997
> From: Kees Lemmens <lemmens@dutind4.twi.tudelft.nl>
> Message-Id: <199711111650.AA012387044@dutind4.twi.tudelft.nl>
> Subject: bug in acl parsing in msql2.0.3
> To: bugs@Hughes.com.au
> Date: Tue, 11 Nov 1997 17:50:44 +0100 (MET)
> Cc: msql-list@services.bunyip.com
> X-Mailer: ELM [version 2.4 PL24]
> Mime-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Content-Length: 2571
>
> Hi all of you,
>
> I just discovered an unpleasant bug in the msql2d.0.3 daemon that causes
> problems in PARSING the MSQL.ACL file with respect to remote hostnames. This
> makes it very difficult to use msql from a remote system as the hostname
> check will fail, unless you open your database to the whole world, which is
> definitely not the best solution IMHO ;-)
>
> The problem is caused by the fact that the gethostbyname() function is NOT
> "reentrant" : all information is stored in a static area that is overwritten
> after every next call.
> If it is called twice - as is done in msqld.c - the first pointer is lost
> and cannot be used for any comparisons, although msqld.c tries to do so
> anyway and thus the hostname match will fail.
>
> I fixed the problem by saving the ip-adress and hostname in a temporary
> buffer instead and then the code works fine.
>
> Hereafter follows the diff file for my patches with the original msqld.c :
>
> =========================================================================
> 894a895
> > char *h_addr,*h_name; /* MOD K.Lemmens */
> 909a911,916
> > /* Start additions K. Lemmens */
> > h_name = (char *)malloc(strlen(hp->h_name)+1);
> > h_addr = (char *)malloc(strlen(hp->h_addr_list[0])+1);
> > strcpy(h_name,hp->h_name);
> > strcpy(h_addr,hp->h_addr_list[0]);
> > /* End additions K. Lemmens */
> 911,912c918,923
> < gethostbyname(hp->h_name);
> < if (bcmp(hp->h_addr_list[0],
> ---
> > /* original : gethostbyname(hp->h_name); */
> > gethostbyname(h_name); /* Modified K. Lemmens */
> >
> > /* original : if (bcmp(hp->h_addr_list[0], */
> > if (bcmp(h_addr, /* Modified K. Lemmens */
> >
> 956c967,968
> < strdup((char *)hp->h_name);
> ---
> > /* strdup((char *)hp->h_name); */
> > strdup((char *)h_name); /* Modified K.Lemmens */
> 958c970,971
> < hp->h_name);
> ---
> > /* hp->h_name); */
> > h_name); /* Modified K.Lemmens */
> 959a973,974
> > free(h_name); /* Modified K.Lemmens */
> > free(h_addr); /* idem */
> ==============================================================================
>
> Hope this will help other people as well: it took me about 3 hours searching
> before I found out what 2was wrong !!
>
> best regards,
> --
> Kees Lemmens; Department of Applied Analysis,
> Fac. Tech. Maths & Comp. Science, Delft University of Technology,
> PO Box: 5031, NL-2600 GA, Delft, The Netherlands.
> Email: > Email: C.W.J.Lemmens@dv.twi.tudelft.nl.
> Phone : +31-15-2787224, Fax : +31-15-2787209
>
> WWW : http://ta.twi.tudelft.nl/DV/Staff/C.W.J.Lemmens.html
> An. FTP: ftp://ta.twi.tudelft.nl/pub/dv/lemmens/
>
>
> --
> Kees Lemmens; Department of Applied Analysis,
> Fac. Tech. Maths & Comp. Science, Delft University of Technology,
> PO Box: 5031, NL-2600 GA, Delft, The Netherlands.
> Email: > Email: C.W.J.Lemmens@dv.twi.tudelft.nl.
> Phone : +31-15-2787224, Fax : +31-15-2787209
>
> WWW : http://ta.twi.tudelft.nl/DV/Staff/C.W.J.Lemmens.html
> An. FTP: ftp://ta.twi.tudelft.nl/pub/dv/lemmens/
>
From buret@trotek.ec-lyon.fr Thu Nov 13 09:44:07 1997
Received: from trotek05.trotek.ec-lyon.fr (trotek05.trotek.ec-lyon.fr [156.18.19.5])
        by services.bunyip.com (8.8.5/8.8.5) with ESMTP id JAA03329
        for <msql-list@services.bunyip.com>; Thu, 13 Nov 1997 09:38:43 -0500 (EST)
Received: from trotek68.trotek.ec-lyon.fr by trotek05.trotek.ec-lyon.fr with SMTP
        (1.38.110.45/16.2_LM) id AA236731903; Thu, 13 Nov 1997 15:38:23 +0100
Date: Thu, 13 Nov 1997 15:38:23 +0100
Reply-To: <buret@trotek.ec-lyon.fr>
Message-Id: <2.2f.16.19971113154127.62e7bb50@trotek05.trotek.ec-lyon.fr>
X-Sender: buret@trotek05.trotek.ec-lyon.fr
X-Mailer: Windows Eudora Pro Version 2.2f (16)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: msql-list@services.bunyip.com
From: =?iso-8859-1?Q?Buret_Fran=E7ois_=3Cburet=40trotek.ec=2Dlyon.fr=3E?=@trotek.ec-lyon.fr
Subject: winmsql

I am beginning with mini sql server (version 2.0). I have found an ODBC driver
(gorta.dll) to work with this server from Windows and I have read somewhere
(gorta faq file) that this driver needs the winmsql.dll library. Where can I
found it ?

Thanks

--
***********************************************************************
Francois BURET : CEGELY -- Centre de Genie Electrique de Lyon --
                   Ecole Centrale de Lyon / CNRS UPRESA 5005
                   36, av. Guy de Collongue 
                   BP 163 / 69131 ECULLY Cedex

e-mail: buret@trotek.ec-lyon.fr fax: (+33) 04 78 43 37 17 ***********************************************************************