diff options
Diffstat (limited to 'source3/lib/ldb')
-rw-r--r-- | source3/lib/ldb/common/ldb_msg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/ldb/common/ldb_msg.c b/source3/lib/ldb/common/ldb_msg.c index 52c6b82484..a4ba045669 100644 --- a/source3/lib/ldb/common/ldb_msg.c +++ b/source3/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 0; + } + return ldb_msg_add_value(msg, attr_name, &val); } |