Apply metze's change correctly this time. Playing 'patch' by
authorVolker Lendecke <vlendec@samba.org>
Tue, 25 Mar 2003 07:54:34 +0000 (07:54 +0000)
committerVolker Lendecke <vlendec@samba.org>
Tue, 25 Mar 2003 07:54:34 +0000 (07:54 +0000)
hand can be somewhat error-prone..

Volker
(This used to be commit 12fabd07148c21f5481cb750f1cfdab2e8112e4b)

source3/passdb/pdb_ldap.c

index a7a168fe64b96fc413d331101ac123d7a5d4db9c..c54095b25060a251db0c157dbfdffbe7267cba90 100644 (file)
@@ -2187,6 +2187,12 @@ static BOOL init_group_from_ldap(struct ldapsam_privates *ldap_state,
                                  temp)) {
                DEBUG(3, ("Attribute displayName not found\n"));
                temp[0] = '\0';
+               if (!get_single_attribute(ldap_state->ldap_struct, entry, "cn",
+                                         temp)) {
+                       DEBUG(0, ("Attributes cn not found either "
+                                 "for gidNumber(%i)\n",map->gid));
+                       return False;
+               }
        }
        fstrcpy(map->nt_name, temp);
 
@@ -2194,12 +2200,6 @@ static BOOL init_group_from_ldap(struct ldapsam_privates *ldap_state,
                                  temp)) {
                DEBUG(3, ("Attribute description not found\n"));
                temp[0] = '\0';
-               if (!get_single_attribute(ldap_state->ldap_struct, entry, "cn",
-                                         temp)) {
-                       DEBUG(0, ("Attributes cn not found either "
-                                 "for gidNumber(%i)\n",map->gid));
-                       return False;
-               }
        }
        fstrcpy(map->comment, temp);