/[smeserver]/rpms/cpu/sme8/cpu-1.4.3-mod-delete.patch
ViewVC logotype

Contents of /rpms/cpu/sme8/cpu-1.4.3-mod-delete.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Nov 6 03:56:49 2010 UTC (14 years ago) by slords
Branch: MAIN
CVS Tags: cpu-1_4_3-8_el5_sme
* Fri Nov 5 2010 Shad L. Lords <slords@mail.com> 1.4.3-8.sme
- If empty value is passed in assume that means delete [SME: 6342]

1 diff -up cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete cpu-1.4.3/src/plugins/ldap/ld.c
2 --- cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete 2010-11-05 21:41:38.000000000 -0600
3 +++ cpu-1.4.3/src/plugins/ldap/ld.c 2010-11-05 21:45:29.000000000 -0600
4 @@ -285,19 +285,26 @@ ldapBuildListStr (int mod_op, char *mod_
5 if (mod_type == NULL || strlen(mod_type) == strspn(mod_type, " "))
6 return mods;
7
8 - if (value == NULL || strlen(value) == strspn(value, " "))
9 - return mods;
10 -
11 mods = ldapAddList (mods);
12
13 - temp = (char **) malloc (sizeof (char *) * 2);
14 - bzero (temp, sizeof (char *) * 2);
15 - temp[0] = value;
16 - temp[1] = NULL;
17 + if (value == NULL || strlen(value) == strspn(value, " "))
18 + {
19 + mods[list_size]->mod_op = LDAP_MOD_DELETE;
20 + mods[list_size]->mod_type = strdup (mod_type);
21 + mods[list_size]->mod_values = NULL;
22 + }
23 + else
24 + {
25 + temp = (char **) malloc (sizeof (char *) * 2);
26 + bzero (temp, sizeof (char *) * 2);
27 + temp[0] = value;
28 + temp[1] = NULL;
29 +
30 + mods[list_size]->mod_op = mod_op;
31 + mods[list_size]->mod_type = strdup (mod_type);
32 + mods[list_size]->mod_values = temp;
33 + }
34
35 - mods[list_size]->mod_op = mod_op;
36 - mods[list_size]->mod_type = strdup (mod_type);
37 - mods[list_size]->mod_values = temp;
38 list_size++;
39 return mods;
40 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed