[patch samba_2_2] LDAP_MOD_ADD structural
Gerald (Jerry) Carter
jerry at samba.org
Thu Aug 15 08:05:49 GMT 2002
On Wed, 14 Aug 2002, Ignacio Coupeau wrote:
> A possible patch to add a new account "smbpasswd -a <new_user>" in the
> ldap. As the ldap v3 (openldap 2.1.3) requires a structural object, the
> patch provides "objectclass: account", as Luke Howard sugest in the list:
>
> >In the case where there is no existing entry, then SAMBA should
> >probably use the "account" structural object class which only
> >requires the "uid" attribute. See section 5.3 of RFC 2307.
>
> The "account" object don't require any aditional attribute.
>
> The patch:
> ----
> diff -u passdb/pdb_ldap.c passdb/pdb_ldap.c-DIST-020705
> --- passdb/pdb_ldap.c Wed Aug 14 20:02:42 2002
> +++ passdb/pdb_ldap.c-DIST-020705 Fri Jul 5 14:54:32 2002
> @@ -1104,7 +1104,6 @@
> if (ldap_op == LDAP_MOD_REPLACE) {
> rc = ldap_modify_s(ldap_struct, dn, mods);
> } else {
> - make_a_mod(&mods, LDAP_MOD_ADD, "objectclass", "account");
> rc = ldap_add_s(ldap_struct, dn, mods);
> }
Seems fair. Added to SAMBA_2_2. Please test. Thanks.
cheers, 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