ldap: init_sam_from_ldap hex/dec

Ignacio Coupeau icoupeau at unav.es
Mon Dec 24 04:30:05 GMT 2001


...perhaps in the code (HEAD and 2_2): 

passdb/pdb_ldap.c: BOOL init_sam_from_ldap ()
	the "base 16" in the "time" lines like:

        get_single_attribute(ldap_struct, entry, "logonTime", temp);
        logon_time = (time_t) strtol(temp, NULL, 16);

sould be changed to base 10:

        get_single_attribute(ldap_struct, entry, "logonTime", temp);
        logon_time = (time_t) strtol(temp, NULL, 10);

because in passdb/pdb_ldap.c: BOOL init_ldap_from_sam (), the
db_get_*_time

	always use a long int representation:

        slprintf (temp, sizeof (temp) - 1, "%li",
pdb_get_pass_last_set_time(sampass));
        make_a_mod(mods, ldap_state, "pwdLastSet", temp);


Ignacio
-- 
____________________________________________________
Ignacio Coupeau, Ph.D.     e-mail: icoupeau at unav.es
CTI, Director              fax:    948 425619
University of Navarra      voice:  948 425600
Pamplona, SPAIN            http://www.unav.es/cti/




More information about the samba-technical mailing list