ldap: init_sam_from_ldap hex/dec

Gerald Carter jerry at samba.org
Thu Jan 24 08:11:09 GMT 2002


On Mon, 24 Dec 2001, Ignacio Coupeau wrote:

> ...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);


I'll fix this before the 2.2.3 release.  Thanks.














chau, jerry

 ---------------------------------------------------------------------
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "Sam's Teach Yourself Samba in 24 Hours" 2ed.      ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--





More information about the samba-technical mailing list