diff options
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/ldb_msg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index 92c537a8fa..9fbb2cdf3e 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -227,6 +227,11 @@ int ldb_msg_add_string(struct ldb_message *msg, val.data = discard_const_p(uint8_t, str); val.length = strlen(str); + if (val.length == 0) { + /* allow empty strings as non-existant attributes */ + return LDB_SUCCESS; + } + return ldb_msg_add_value(msg, attr_name, &val); } |