FIX to RE: Cannot get net ads join to work under Solaris 8
Clive.Elsum at csiro.au
Clive.Elsum at csiro.au
Sun Nov 17 08:34:01 GMT 2002
Andrew,
Another suggestion which appears to work without a kludge is a very minor
mod to the code originally contributed by Roger Beeman <beeman at cisco.com>,
with the help of Mark Baushke <mdb at cisco.com> and the rest of the Gurus at
CISCO. Further improved by Roger with assistance from Edward J. Sabol based
on input by Jamie Zawinski.
Setting this as a timegm replacement within lib/replace.c overcomes the need
to reset TIMEZONE.
time_t timegm(struct tm *t)
{
time_t tl, tb;
struct tm *tg;
tl = mktime (t);
if (tl == -1)
{
t->tm_hour--;
tl = mktime (t);
if (tl == -1)
return -1; /* can't deal with output from strptime */
tl += 3600;
}
tg = gmtime (&tl);
tg->tm_isdst = 0;
tb = mktime (tg);
if (tb == -1)
{
tg->tm_hour--;
tb = mktime (tg);
if (tb == -1)
return -1; /* can't deal with output from gmtime */
tb += 3600;
}
return (tl - (tb - tl));
---------------------------------------------------------------------
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 csiro.au
---------------------------------------------------------------------
More information about the samba-technical
mailing list