s4-samba3sid: fixed error returns when res->count != 1 and oom
authorAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 01:54:42 +0000 (12:54 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 02:03:08 +0000 (13:03 +1100)
source4/dsdb/samdb/ldb_modules/samba3sid.c

index bb4b58be3ffb38f09c55a1625bdbbc1752aaf98f..76848eb258d966fe228bd553658c602b20bef51c 100644 (file)
@@ -69,7 +69,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
                                       ": Expected exactly 1 domain object - got %u",
                                       res->count);
                talloc_free(tmp_ctx);
-               return ret;
+               return LDB_ERR_OPERATIONS_ERROR;
        }
        msg = res->msgs[0];
 
@@ -84,7 +84,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
                                       ": No sambaSID in %s",
                                       ldb_dn_get_linearized(msg->dn));
                talloc_free(tmp_ctx);
-               return ret;
+               return LDB_ERR_OPERATIONS_ERROR;
        }
 
        /* choose the highest of the 3 - see pdb_ldap.c for an
@@ -102,7 +102,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
                                       ": No sambaNextRid in %s",
                                       ldb_dn_get_linearized(msg->dn));
                talloc_free(tmp_ctx);
-               return ret;
+               return LDB_ERR_OPERATIONS_ERROR;
        }
 
        /* sambaNextRid is actually the previous RID .... */