modifyTimestamp on samba-3.0.3
Stefan (metze) Metzmacher
metze at samba.org
Thu May 6 09:27:41 GMT 2004
Jerry,
can ou apply this before 3.0.4 please
metze
j.lu.tiesse at unodinoicom.it schrieb:
> We cannot remove the \"modifyTimestamop\" from atrrib_map_v30[], because this
> attribute list will be used in ldapsam_getsampwnam to get the ldap entry
> which is used in init_sam_from_ldap. If an attribute is not in that entry,
> the call ldap_get_values will fail. This is why the bad_password_count didn\'t
> work on 3.0.3, in which the ldapsam_get_entry_timestamp will always fail.
>
> FIXME:
> --- passdb/pdb_ldap.c Wed May 5 16:07:04 2004
> +++ passdb/pdb_ldap.c.fix Thu May 6 09:41:50 2004
> @@ -81,7 +81,6 @@
> #define SAM_ACCOUNT struct sam_passwd
> #endif
>
> -#define MODIFY_TIMESTAMP_STRING \"modifyTimestamp\"
>
> #include \"smbldap.h\"
>
> @@ -400,8 +399,11 @@
> pstring temp;
> struct tm tm;
>
> - if (!smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct,
> - entry, MODIFY_TIMESTAMP_STRING, temp))
> + 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);
> --- include/smbldap.h Thu May 6 08:37:25 2004
> +++ include/smbldap.h.fix Thu May 6 08:38:21 2004
> @@ -94,8 +94,8 @@
> #define LDAP_ATTR_MUNGED_DIAL 37
> #define LDAP_ATTR_BAD_PASSWORD_TIME 38
> #define LDAP_ATTR_SID_LIST 40
> +#define LDAP_ATTR_MOD_TIMESTAMP 41
>
> typedef struct _attrib_map_entry {
> int attrib;
> --- lib/smbldap.c Wed May 5 18:06:15 2004
> +++ lib/smbldap.c.fix Thu May 6 08:44:09 2004
> @@ -101,6 +101,7 @@
> { LDAP_ATTR_BAD_PASSWORD_COUNT, \"sambaBadPasswordCount\" },
> { LDAP_ATTR_BAD_PASSWORD_TIME, \"sambaBadPasswordTime\" },
> { LDAP_ATTR_PWD_HISTORY, \"sambaPasswordHistory\" },
> + { LDAP_ATTR_MOD_TIMESTAMP, \"modifyTimestamp\" },
> { LDAP_ATTR_LIST_END, NULL }
>
>
>
> Jianliang Lu
> TieSse s.p.a. Ivrea (To) - Italy
> j.lu at tiesse.com luj at libero.it
> http://www.tiesse.com
>
--
metze
Stefan Metzmacher <metze at samba.org> www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20040506/ea558285/signature.bin
More information about the samba-technical
mailing list