timezone in freebsd-current

Jim McDonough jmcd at us.ibm.com
Thu Mar 25 13:50:55 GMT 2004






Hmm, what does "man tzset" say on freebsd-current?

This is not defined in samba, but is a Posix as well as BSD standard,
defined in time.h.

Sorry for the inconvenience, but I don't have any freebsd systems.  I'd
like this to work everywhere, and we need to know the offset from UTC...

----------------------------
Jim McDonough
IBM Linux Technology Center
Samba Team
6 Minuteman Drive
Scarborough, ME 04074
USA

jmcd at us.ibm.com
jmcd at samba.org

Phone: (207) 885-5565
IBM tie-line: 776-9984



                                                                           
             Andrzej Tobola                                                
             <san at iem.pw.edu.p                                             
             l>                                                         To 
                                       Jim McDonough/Portland/IBM at IBMUS    
             03/24/2004 10:20                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re; CVS Diff in samba_3_0 for Thu   
                                       Mar 18 19:21:49 2004                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





WIth yor patch I can't compile samba: on FreeBSD-current:

% make ...
....
Compiling passdb/login_cache.c
Compiling passdb/pdb_ldap.c
passdb/pdb_ldap.c: In function `ldapsam_get_entry_timestamp':
passdb/pdb_ldap.c:410: error: invalid operands to binary -
*** Error code 1

It seems that the problem is undefined variable timezone:

static time_t ldapsam_get_entry_timestamp(
        struct ldapsam_privates *ldap_state,
        LDAPMessage * entry)
{
        pstring temp;
        struct tm tm;

        if (!smbldap_get_single_pstring(
                    ldap_state->smbldap_state->ldap_struct, entry,
                    get_userattr_key2string(ldap_state->schema_ver,
                                           LDAP_ATTR_MOD_TIMESTAMP),
                    temp))
                return (time_t) 0;

        strptime(temp, "%Y%m%d%H%M%SZ", &tm);
        tzset();
        return (mktime(&tm) - timezone);
                             ^^^^^^^^^
}

There is no timezone in whole samba source (fgrep -r timezone samba)

Previous version (samba-3.0.2.a_1) compiles and works OK.

cheers,
-a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040325/68f2fee4/graycol.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic04707.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040325/68f2fee4/pic04707.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040325/68f2fee4/ecblank.gif


More information about the samba-technical mailing list