From 1e6e5b299c235b513095a76a4cd9fffc41e8fc9c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 17 Jun 2002 18:36:36 +0000 Subject: beginning to sync up for 2.2.5 release.... --- source/nsswitch/winbindd_rpc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source/nsswitch/winbindd_rpc.c') diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 684ce5ac288..edf445a0ec9 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -23,6 +23,24 @@ #include "winbindd.h" +/******************************************************************* + Duplicate a UNISTR2 string into a UNIX codepage null terminated char* + using a talloc context +********************************************************************/ + +static char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str) +{ + char *s; + int maxlen = (str->uni_str_len+1)*4; + if (!str->buffer) + return NULL; + s = (char *)talloc(ctx, maxlen); /* convervative */ + if (!s) + return NULL; + unistr2_to_unix(s, str, maxlen); + return s; +} + /* Query display info for a domain. This returns enough information plus a bit extra to give an overview of domain users for the User Manager application. */ @@ -92,6 +110,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, } for (j=0;j