This adds 'ldap delete dn' as the recommended parameter
authorVolker Lendecke <vlendec@samba.org>
Sun, 23 Mar 2003 09:04:25 +0000 (09:04 +0000)
committerVolker Lendecke <vlendec@samba.org>
Sun, 23 Mar 2003 09:04:25 +0000 (09:04 +0000)
for the 'ldap del only sam attr' functionality. So
we are compatiple to the current SuSE patches as well
as to TNG... ;-)

Volker

docs/docbook/manpages/smb.conf.5.sgml
source/param/loadparm.c
source/passdb/pdb_ldap.c

index 7aaa18957876d0d51ba12d2a24475269d15d0d6d..0f5e751a64f687d683218657b99a5a468e6d373a 100644 (file)
@@ -656,6 +656,7 @@ alias|alias|alias|alias...
                <listitem><para><link linkend="LARGEREADWRITE"><parameter>large readwrite</parameter></link></para></listitem>
                
                <listitem><para><link linkend="LDAPADMINDN"><parameter>ldap admin dn</parameter></link></para></listitem>
+               <listitem><para><link linkend="LDAPDELETEDN"><parameter>ldap delete dn</parameter></link></para></listitem>
                <listitem><para><link linkend="LDAPDELONLYSAMATTR"><parameter>ldap del only sam attr</parameter></link></para></listitem>
                <listitem><para><link linkend="LDAPFILTER"><parameter>ldap filter</parameter></link></para></listitem>
                 <listitem><para><link linkend="LDAPPORT"><parameter>ldap port</parameter></link></para></listitem>
@@ -3437,13 +3438,22 @@ df $1 | tail -1 | awk '{print $2" "$4}'
                </para>
        
                <varlistentry>
-               <term><anchor id="LDAPDELONLYSAMATTR"/>ldap del only sam attr (G)</term>
+               <term><anchor id="LDAPDELETEDN"/>ldap del only sam attr (G)</term>
                <listitem><para> This parameter specifies whether a delete
-               operation in the ldapsam deletes only the Samba-specific
-               attributes or the complete LDAP entry.
+               operation in the ldapsam deletes the complete entry or only the attributes
+               specific to Samba.
                </para>
        
-               <para>Default : <emphasis>ldap del only sam attr = yes</emphasis></para>
+               <para>Default : <emphasis>ldap delete dn = no</emphasis></para>
+               </listitem>
+               </varlistentry>
+
+
+               <varlistentry>
+               <term><anchor id="LDAPDELONLYSAMATTR"/>ldap del only sam attr (G)</term>
+               <listitem><para> Inverted synonym for <link linked="LDAPDELETEDN"><parameter>
+               ldap delete dn</parameter></link>.</para>
+               </para>
                </listitem>
                </varlistentry>
 
index 0aa5f08be77dc99f4007d3e0ce0039798990d011..d17db1638119a081b5af1f2c502f98405bb87138 100644 (file)
@@ -230,7 +230,7 @@ typedef struct
        BOOL ldap_trust_ids;
        char *szAclCompat;
        int ldap_passwd_sync; 
-       BOOL ldap_del_only_sam;
+       BOOL ldap_delete_dn;
        BOOL bMsAddPrinterWizard;
        BOOL bDNSproxy;
        BOOL bWINSsupport;
@@ -1043,7 +1043,8 @@ static struct parm_struct parm_table[] = {
        {"ldap ssl", P_ENUM, P_GLOBAL, &Globals.ldap_ssl, NULL, enum_ldap_ssl, FLAG_ADVANCED | FLAG_DEVELOPER},
        {"ldap passwd sync", P_ENUM, P_GLOBAL, &Globals.ldap_passwd_sync, NULL, enum_ldap_passwd_sync, FLAG_ADVANCED | FLAG_DEVELOPER},
        {"ldap trust ids", P_BOOL, P_GLOBAL, &Globals.ldap_trust_ids, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
-       {"ldap del only sam attr", P_BOOL, P_GLOBAL, &Globals.ldap_del_only_sam, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
+       {"ldap delete dn", P_BOOL, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
+       {"ldap del only sam attr", P_BOOLREV, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
 
        {"Miscellaneous Options", P_SEP, P_SEPARATOR},
        {"add share command", P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
@@ -1428,7 +1429,7 @@ static void init_globals(void)
        string_set(&Globals.szLdapAdminDn, "");
        Globals.ldap_ssl = LDAP_SSL_ON;
        Globals.ldap_passwd_sync = LDAP_PASSWD_SYNC_OFF;
-       Globals.ldap_del_only_sam = True;
+       Globals.ldap_delete_dn = False;
 
 /* these parameters are set to defaults that are more appropriate
    for the increasing samba install base:
@@ -1660,7 +1661,7 @@ FN_GLOBAL_STRING(lp_ldap_admin_dn, &Globals.szLdapAdminDn)
 FN_GLOBAL_INTEGER(lp_ldap_ssl, &Globals.ldap_ssl)
 FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, &Globals.ldap_passwd_sync)
 FN_GLOBAL_BOOL(lp_ldap_trust_ids, &Globals.ldap_trust_ids)
-FN_GLOBAL_BOOL(lp_ldap_del_only_sam, &Globals.ldap_del_only_sam)
+FN_GLOBAL_BOOL(lp_ldap_delete_dn, &Globals.ldap_delete_dn)
 FN_GLOBAL_STRING(lp_add_share_cmd, &Globals.szAddShareCommand)
 FN_GLOBAL_STRING(lp_change_share_cmd, &Globals.szChangeShareCommand)
 FN_GLOBAL_STRING(lp_delete_share_cmd, &Globals.szDeleteShareCommand)
index f137d27cffaf3b692b060a4fc3d1dfbae17ecde8..f4d04561c119653520aef0f5f6c984d2c3e5c2f7 100644 (file)
@@ -848,7 +848,7 @@ static void make_a_mod (LDAPMod *** modlist, int modop, const char *attribute, c
 
 /*******************************************************************
  Delete complete object or objectclass and attrs from
- object found in search_result depending on lp_ldap_del_only_sam
+ object found in search_result depending on lp_ldap_delete_dn
 ******************************************************************/
 static NTSTATUS ldapsam_delete_entry(struct ldapsam_privates *ldap_state,
                                     LDAPMessage *result,
@@ -871,7 +871,7 @@ static NTSTATUS ldapsam_delete_entry(struct ldapsam_privates *ldap_state,
        entry = ldap_first_entry(ldap_state->ldap_struct, result);
        dn    = ldap_get_dn(ldap_state->ldap_struct, entry);
 
-       if (!lp_ldap_del_only_sam()) {
+       if (lp_ldap_delete_dn()) {
                NTSTATUS ret = NT_STATUS_OK;
                rc = ldapsam_delete(ldap_state, dn);