summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-05 18:05:59 -0800
committerJeremy Allison <jra@samba.org>2008-02-05 18:05:59 -0800
commit8b3004bcf90587d038f18b31b0133da4b0ad5fc9 (patch)
tree974caf214f483b388997c2b2fc64717b7d9b5292 /source3
parent498e6786e41c0ea417f65e18a60b24b99fb54671 (diff)
downloadsamba-8b3004bcf90587d038f18b31b0133da4b0ad5fc9.tar.gz
samba-8b3004bcf90587d038f18b31b0133da4b0ad5fc9.tar.bz2
samba-8b3004bcf90587d038f18b31b0133da4b0ad5fc9.zip
Don't return true on talloc fail.
Jeremy. (This used to be commit 21594cb34c683262ed4f743b68c35e586676ff75)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/lookup_sid.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 9f66eb934e..4341bc02cc 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -548,10 +548,16 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
if (*domain_name == NULL) {
*domain_name = talloc_strdup(
mem_ctx, unix_users_domain_name());
+ if (*domain_name == NULL) {
+ return false;
+ }
}
for (i=0; i<num_rids; i++) {
(*names)[i] = talloc_strdup(
(*names), uidtoname(rids[i]));
+ if ((*names)[i] == NULL) {
+ return false;
+ }
(*types)[i] = SID_NAME_USER;
}
return true;
@@ -561,10 +567,16 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
if (*domain_name == NULL) {
*domain_name = talloc_strdup(
mem_ctx, unix_groups_domain_name());
+ if (*domain_name == NULL) {
+ return false;
+ }
}
for (i=0; i<num_rids; i++) {
(*names)[i] = talloc_strdup(
(*names), gidtoname(rids[i]));
+ if ((*names)[i] == NULL) {
+ return false;
+ }
(*types)[i] = SID_NAME_DOM_GRP;
}
return true;