svn commit: samba r19073 - in branches/SAMBA_3_0/source/groupdb: .
vlendec at samba.org
vlendec at samba.org
Wed Oct 4 19:40:29 GMT 2006
Author: vlendec
Date: 2006-10-04 19:40:25 +0000 (Wed, 04 Oct 2006)
New Revision: 19073
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19073
Log:
mapping_dn can fail
Modified:
branches/SAMBA_3_0/source/groupdb/mapping_ldb.c
Changeset:
Modified: branches/SAMBA_3_0/source/groupdb/mapping_ldb.c
===================================================================
--- branches/SAMBA_3_0/source/groupdb/mapping_ldb.c 2006-10-04 19:32:55 UTC (rev 19072)
+++ branches/SAMBA_3_0/source/groupdb/mapping_ldb.c 2006-10-04 19:40:25 UTC (rev 19073)
@@ -139,10 +139,14 @@
}
msg = ldb_msg_new(ldb);
- if (msg == NULL) return False;
+ if (msg == NULL) {
+ return False;
+ }
msg->dn = mapping_dn(msg, &map->sid);
- if (msg->dn == NULL) goto failed;
+ if (msg->dn == NULL) {
+ goto failed;
+ }
if (ldb_msg_add_string(msg, "objectClass", "groupMap") != LDB_SUCCESS ||
ldb_msg_add_string(msg, "sid",
@@ -303,6 +307,9 @@
}
dn = mapping_dn(ldb, sid);
+ if (dn == NULL) {
+ return False;
+ }
ret = ldb_delete(ldb, dn);
talloc_free(dn);
@@ -466,6 +473,9 @@
}
msg.dn = mapping_dn(tmp_ctx, alias);
+ if (msg.dn == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
msg.num_elements = 1;
msg.elements = ⪙
el.flags = operation;
@@ -524,6 +534,9 @@
*num = 0;
dn = mapping_dn(ldb, alias);
+ if (dn == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, attrs, &res);
talloc_steal(dn, res);
More information about the samba-cvs
mailing list