git.samba.org
/
tprouty
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
498e678
)
Don't return true on talloc fail.
author
Jeremy Allison
<jra@samba.org>
Wed, 6 Feb 2008 02:05:59 +0000
(18:05 -0800)
committer
Jeremy Allison
<jra@samba.org>
Wed, 6 Feb 2008 02:05:59 +0000
(18:05 -0800)
Jeremy.
(This used to be commit
21594cb34c683262ed4f743b68c35e586676ff75
)
source3/passdb/lookup_sid.c
patch
|
blob
|
history
diff --git
a/source3/passdb/lookup_sid.c
b/source3/passdb/lookup_sid.c
index 9f66eb934e46622337a1c1259bd9b5eedef5608f..4341bc02ccf6e4d0d281c8435e657be7db3f0df4 100644
(file)
--- 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) {
*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]));
}
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;
(*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) {
*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]));
}
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;
(*types)[i] = SID_NAME_DOM_GRP;
}
return true;