From: Stefan Metzmacher Date: Thu, 21 Mar 2019 12:54:10 +0000 (+0100) Subject: idmap_hash: remove unused error checks X-Git-Tag: talloc-2.4.1~1420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cfcff3101fce94b365eccde114432dfa980bbd0;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- 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;