]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind.idl: Add wbint_NormalizeNameUnmap
authorSamuel Cabrero <scabrero@samba.org>
Fri, 25 Apr 2025 16:34:42 +0000 (18:34 +0200)
committerSamuel Cabrero <scabrero@samba.org>
Thu, 22 May 2025 12:41:38 +0000 (12:41 +0000)
normalize_name_unmap(), depending on the idmap config, can query LDAP
to unmap the username from its alias, e.g., map posix uid to samaccountname.

To avoid blocking this call should be done in the idmap child.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
librpc/idl/winbind.idl
source3/winbindd/winbindd_dual_srv.c

index 50b21a837d416f1f1a418a6419981572185a1d4e..fcd6622547505a0ecc1e1235725a248235c97233 100644 (file)
@@ -277,6 +277,11 @@ interface winbind
         [out,string,charset(UTF8)] char **mapped_name
     );
 
+    NTSTATUS wbint_NormalizeNameUnmap(
+        [in,string,charset(UTF8)] char *name,
+        [out,string,charset(UTF8)] char **unmapped_name
+    );
+
   /* Public methods available via IRPC */
 
     typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
index 80a51d50f3ecfe1e75a195efad01018351d28d4f..b1809809b13eaa046d7b109f06167b5d18b919e2 100644 (file)
@@ -2167,4 +2167,16 @@ NTSTATUS _wbint_NormalizeNameMap(struct pipes_struct *p,
        return status;
 }
 
+NTSTATUS _wbint_NormalizeNameUnmap(struct pipes_struct *p,
+                                  struct wbint_NormalizeNameUnmap *r)
+{
+       char *unmapped = NULL;
+       NTSTATUS status;
+
+       status = normalize_name_unmap(p->mem_ctx, r->in.name, &unmapped);
+       *r->out.unmapped_name = unmapped;
+
+       return status;
+}
+
 #include "librpc/gen_ndr/ndr_winbind_scompat.c"