]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libwbclient: prepare wbcCtxLookupName() for dealing with WBC_SID_NAME_UNKNOWN
authorRalph Boehme <slow@samba.org>
Fri, 16 Feb 2024 15:38:11 +0000 (16:38 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 26 Jul 2024 10:06:31 +0000 (10:06 +0000)
This changes the wbcErr from WBC_ERR_DOMAIN_NOT_FOUND to WBC_ERR_NOT_MAPPED.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
nsswitch/libwbclient/wbc_sid.c

index fd82510295039b10cc754723ceee048cd613a7d4..747addb1f5b23f1f2dcb7b01139c6d030b08799d 100644 (file)
@@ -218,11 +218,14 @@ wbcErr wbcCtxLookupName(struct wbcContext *ctx,
                                        &response);
        BAIL_ON_WBC_ERROR(wbc_status);
 
+       *name_type = (enum wbcSidType)response.data.sid.type;
+       if (*name_type == WBC_SID_NAME_UNKNOWN) {
+               return WBC_ERR_NOT_MAPPED;
+       }
+
        wbc_status = wbcStringToSid(response.data.sid.sid, sid);
        BAIL_ON_WBC_ERROR(wbc_status);
 
-       *name_type = (enum wbcSidType)response.data.sid.type;
-
        wbc_status = WBC_ERR_SUCCESS;
 
  done: