Cannot get net ads join to work under Solaris 8

Clive.Elsum at Clive.Elsum at
Sun Nov 17 07:39:00 GMT 2002

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
during installation.
I expect that SAMBA is looking for some variant of GMT or UTC not
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=");
        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 Clive.Elsum at

-----Original Message-----
From: Andrew Bartlett [mailto:abartlet at]
Sent: Saturday, 16 November 2002 7:18 AM
To: David Collier-Brown -- Customer Engineering
Cc: Andrew Bartlett; Clive.Elsum at;
samba-technical at
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
> 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                                 abartlet at
Manager, Authentication Subsystems, Samba Team  abartlet at
Student Network Administrator, Hawker College   abartlet at

More information about the samba-technical mailing list