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>
[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;
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"