38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
diff -up cpu-1.4.3/src/plugins/ldap/user.c.gid-not-supp cpu-1.4.3/src/plugins/ldap/user.c
|
|
--- cpu-1.4.3/src/plugins/ldap/user.c.gid-not-supp 2010-11-07 21:51:45.000000000 -0700
|
|
+++ cpu-1.4.3/src/plugins/ldap/user.c 2010-11-07 22:01:26.000000000 -0700
|
|
@@ -402,33 +402,6 @@ ldapUserCheck (int mod_op, LDAP * ld)
|
|
}
|
|
}
|
|
}
|
|
- if (globalLdap->gid)
|
|
- {
|
|
- tcn = cfg_get_str ("LDAP", "GROUP_CN_STRING");
|
|
- if (tcn == NULL)
|
|
- tcn = strdup ("cn");
|
|
- strsize = strlen (globalLdap->gid) +
|
|
- strlen (gf) + strlen (tcn) + 8;
|
|
- filter2 = (char *) malloc (sizeof (char) * strsize);
|
|
- if (filter2 == NULL)
|
|
- return -1;
|
|
- bzero (filter2, strsize);
|
|
- snprintf (filter2, strsize, "(&%s (%s=%s))",
|
|
- gf, tcn, globalLdap->gid);
|
|
- if (ldap_search_st
|
|
- (ld, globalLdap->group_base, LDAP_SCOPE_SUBTREE, filter2,
|
|
- attrs, 0, &globalLdap->timeout, res) != LDAP_SUCCESS)
|
|
- {
|
|
- CPU_ldapPerror (ld, globalLdap,
|
|
- "ldapUserCheck: ldap_search_st");
|
|
- return -1;
|
|
- }
|
|
- ldapres = ldap_count_entries (ld, res[0]);
|
|
- if (ldapres > 0)
|
|
- {
|
|
- ldap_modify_s (ld, ldap_get_dn (ld, res[0]), tmod);
|
|
- }
|
|
- }
|
|
free (gf);
|
|
}
|
|
if (globalLdap->first_name)
|