diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-03-21 13:54:10 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2023-03-30 15:10:10 +0000 |
commit | 5a754810dead1225554b5a9c5c5265079ae5c0a9 (patch) | |
tree | 0e2cce93d5bee3467ea1519f1718e7a2b70bfe1c | |
parent | 1e6eeb8efb21a836c08d203d379817598d6ea447 (diff) | |
download | samba-5a754810dead1225554b5a9c5c5265079ae5c0a9.tar.gz |
idmap_hash: remove unused error checks
id_map_ptrs_init() is used in the callers in order to
set everything up as expected.
Other backends also just trust the caller.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15319
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2cfcff3101fce94b365eccde114432dfa980bbd0)
-rw-r--r-- | source3/winbindd/idmap_hash/idmap_hash.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/source3/winbindd/idmap_hash/idmap_hash.c b/source3/winbindd/idmap_hash/idmap_hash.c index 99341bc6fab..ce324bfd240 100644 --- a/source3/winbindd/idmap_hash/idmap_hash.c +++ b/source3/winbindd/idmap_hash/idmap_hash.c @@ -199,11 +199,6 @@ static NTSTATUS unixids_to_sids(struct idmap_domain *dom, NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; int i; - if (!ids) { - nt_status = NT_STATUS_INVALID_PARAMETER; - BAIL_ON_NTSTATUS_ERROR(nt_status); - } - /* initialize the status to avoid suprise */ for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; @@ -219,13 +214,6 @@ static NTSTATUS unixids_to_sids(struct idmap_domain *dom, separate_hashes(ids[i]->xid.id, &h_domain, &h_rid); - /* Make sure the caller allocated memor for us */ - - if (!ids[i]->sid) { - nt_status = NT_STATUS_INVALID_PARAMETER; - BAIL_ON_NTSTATUS_ERROR(nt_status); - } - /* If the domain hash doesn't find a SID in the table, skip it */ @@ -250,11 +238,6 @@ static NTSTATUS sids_to_unixids(struct idmap_domain *dom, NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; int i; - if (!ids) { - nt_status = NT_STATUS_INVALID_PARAMETER; - BAIL_ON_NTSTATUS_ERROR(nt_status); - } - /* initialize the status to avoid suprise */ for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; |