diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-14 22:36:07 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-15 08:45:14 +0200 |
commit | 9310da1e2b483cbf9899ad1ebcdfd07f7c0eeac0 (patch) | |
tree | a0d0a9c201decd158152a36a08a37a6ae21c83d4 /source4 | |
parent | 9e69b22e70a6e119255e8e3d37964e6ae16ade09 (diff) | |
download | samba-9310da1e2b483cbf9899ad1ebcdfd07f7c0eeac0.tar.gz samba-9310da1e2b483cbf9899ad1ebcdfd07f7c0eeac0.tar.bz2 samba-9310da1e2b483cbf9899ad1ebcdfd07f7c0eeac0.zip |
s4:samdb_create_foreign_security_principal - proof error code of "samdb_msg_add_string"
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index dbf7d3ec62..d0fc3b1b0e 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2344,9 +2344,12 @@ NTSTATUS samdb_create_foreign_security_principal(struct ldb_context *sam_ctx, TA return NT_STATUS_NO_MEMORY; } - samdb_msg_add_string(sam_ctx, msg, msg, - "objectClass", - "foreignSecurityPrincipal"); + ret = samdb_msg_add_string(sam_ctx, msg, msg, + "objectClass", "foreignSecurityPrincipal"); + if (ret != LDB_SUCCESS) { + talloc_free(sidstr); + return NT_STATUS_NO_MEMORY; + } /* create the alias */ ret = ldb_add(sam_ctx, msg); |