mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Don't return true on talloc fail.
Jeremy. (This used to be commit 21594cb34c683262ed4f743b68c35e586676ff75)
This commit is contained in:
parent
498e6786e4
commit
8b3004bcf9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user