]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
idmap_hash: remove unused error checks
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Mar 2019 12:54:10 +0000 (13:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 10 Mar 2023 10:38:37 +0000 (10:38 +0000)
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>
source3/winbindd/idmap_hash/idmap_hash.c

index 99341bc6fab2706eafca4937196a4e515a7ded3b..ce324bfd2401433bed17ac48ff5dfee3c4165941 100644 (file)
@@ -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;