git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d099f86
)
s4:dsdb/common/util.c - samdb_msg_add_string - the attribute name doesn't need to...
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Thu, 14 Oct 2010 20:41:06 +0000
(22:41 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Fri, 15 Oct 2010 06:45:01 +0000
(08:45 +0200)
This is done internally by the LDB library - look at "ldb_msg_add_empty".
source4/dsdb/common/util.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/common/util.c
b/source4/dsdb/common/util.c
index 18a8669f29bffd46827931edca5b4e30d3d04944..3dd5f78964f378d6b418a536c1d369aaf0453858 100644
(file)
--- a/
source4/dsdb/common/util.c
+++ b/
source4/dsdb/common/util.c
@@
-770,12
+770,11
@@
int samdb_find_or_add_attribute(struct ldb_context *ldb, struct ldb_message *msg
int samdb_msg_add_string(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
const char *attr_name, const char *str)
{
- char *s = talloc_strdup(mem_ctx, str);
- char *a = talloc_strdup(mem_ctx, attr_name);
- if (s == NULL || a == NULL) {
+ const char *s = talloc_strdup(mem_ctx, str);
+ if (s == NULL) {
return ldb_oom(sam_ldb);
}
- return ldb_msg_add_string(msg, a, s);
+ return ldb_msg_add_string(msg, a
ttr_name
, s);
}
/*