Following on from this in the replacement for timegm within /lib/replace.c
Solaris returns the TIMEZONE (in our case) as Australia/Victoria. This is
done
during installation.
I expect that SAMBA is looking for some variant of GMT or UTC not
Australia/Victoria.
As a very simple workaround I simply changed the putenv call to force TZ=GMT
and all 
works happily.
 

 time_t timegm(struct tm *tm)
{
        time_t ret;
        char *tz;
        char *tzvar;

        tz = getenv("TZ");

  /*    putenv("TZ=");
        putenv("TZ=GMT");
        tzset();
        ret = mktime(tm);


Clive Elsum

---------------------------------------------------------------------
Clive Elsum BAppSc, RHCE
Systems Engineer - Information Technology Group
CSIRO Atmospheric Research
PMB 1, Aspendale, Victoria, Australia  3195
Phone : (+61 3) 9239 4509
Fax:    (+61 3) 9239 4444
E-mail [EMAIL PROTECTED]
---------------------------------------------------------------------


-----Original Message-----
From: Andrew Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 November 2002 7:18 AM
To: David Collier-Brown -- Customer Engineering
Cc: Andrew Bartlett; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Cannot get net ads join to work under Solaris 8


On Sat, 2002-11-16 at 06:09, David Collier-Brown -- Customer Engineering
wrote:
> Andrew Bartlett wrote:
> > Well, it just means that we need to find a real replacement for
> > gmtime().  Any chance you could have a look at that function, and see if
> > you can figure out why the current replacement doesn't work?
> 
>       Huh?  My Solaris box has gmtime and gmtime_r, the 
>       reentrant variant. 
> 
>       In principle, gmtime creates a struct tm, in
>       Coordinated Universal Time (UTC), just as if
>       you called localtime when machine was set to 
>       GMT. 

Actually, we got confused - the function that Samba replaced, which I
suspected could be a problem is 'timegm'.  

Either way, there is a but in there somewhere, as it doesn't work for a
non-GMT timezone.

Andrew Bartlett

-- 
Andrew Bartlett                                 [EMAIL PROTECTED]
Manager, Authentication Subsystems, Samba Team  [EMAIL PROTECTED]
Student Network Administrator, Hawker College   [EMAIL PROTECTED]
http://samba.org     http://build.samba.org     http://hawkerc.net

Reply via email to