diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-10-01 14:16:49 -0500 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-10-22 19:18:20 -0500 |
| commit | 5d3044948075b1b7a82e5b180b83c9a941160b6d (patch) | |
| tree | 63375f017753ce68ec7d74e7cdc25c9e95611df1 | |
| parent | 231ec5d9397a54f05e9ed83327627e53f315f556 (diff) | |
| download | libtdeldap-5d304494.tar.gz libtdeldap-5d304494.zip | |
Clear binary attribute data on modify if replacement binary data length is 0
| -rw-r--r-- | src/libtdeldap.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index 7c973cc..676c217 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -984,6 +984,14 @@ void add_single_binary_attribute_operation(LDAPMod **mods, int *i, TQString attr mods[*i]->mod_bvalues = values; (*i)++; } + else { + char **values = (char**)malloc(sizeof(char*)); + values[0] = NULL; + mods[*i]->mod_op = LDAP_MOD_REPLACE; + mods[*i]->mod_type = strdup(attr.ascii()); + mods[*i]->mod_values = values; + (*i)++; + } } void add_multiple_attributes_operation(LDAPMod **mods, int *i, TQString attr, TQStringList strings) { |
